diff --git a/planet/Material.ocg/Gold.ocm b/planet/Material.ocg/Gold.ocm index 66ace1035..9bc84df06 100644 --- a/planet/Material.ocg/Gold.ocm +++ b/planet/Material.ocg/Gold.ocm @@ -5,7 +5,7 @@ Density=50 Friction=100 BlastFree=1 Blast2Object=Nugget -Blast2ObjectRatio=100 +Blast2ObjectRatio=150 MaxAirSpeed=100 MaxSlide=1 Placement=50 diff --git a/planet/Objects.ocd/Clonk.ocd/Animations.ocd/Script.c b/planet/Objects.ocd/Clonk.ocd/Animations.ocd/Script.c index 47c793f81..e9785b087 100644 --- a/planet/Objects.ocd/Clonk.ocd/Animations.ocd/Script.c +++ b/planet/Objects.ocd/Clonk.ocd/Animations.ocd/Script.c @@ -526,6 +526,21 @@ func StartStand() During scaling the clonk adjusts his rotation to the ground.. When he is a the top, he uses a extra animation. When the wall doesn't have a platform for the feet he just scales using his arms. --*/ +/* Renders the clonk unable to scale */ +func DisableScale() +{ + if (!this.ActMap.Scale) return; + this.Scale = this.ActMap.Scale; + this.ActMap.Scale = nil; +} +/* Reenabled hangling */ +func EnableScale() +{ + if (!this.Scale) return; + this.ActMap.Scale = this.Scale; + this.Scale = nil; +} + func StartScale() { if(!GetEffect("IntScale", this)) @@ -759,11 +774,24 @@ func FxFallTimer(object target, effect, int timer) Adjust the speed sinusoidal. Plays two different stand animations according to the position the clonk stops. --*/ +/* Renders the clonk unable to hangle */ +func DisableHangle() +{ + if (!this.ActMap.Hangle) return; + this.Hangle = this.ActMap.Hangle; + this.ActMap.Hangle = nil; +} +/* Reenabled hangling */ +func EnableHangle() +{ + if (!this.Hangle) return; + this.ActMap.Hangle = this.Hangle; + this.Hangle = nil; +} + /* Replaces the named action by an instance with a different speed */ func PushActionSpeed(string action, int n) { - if (ActMap == this.Prototype.ActMap) - ActMap = { Prototype = this.Prototype.ActMap }; ActMap[action] = { Prototype = ActMap[action], Speed = n }; if (this.Action == ActMap[action].Prototype) this.Action = ActMap[action]; diff --git a/planet/Objects.ocd/Clonk.ocd/Script.c b/planet/Objects.ocd/Clonk.ocd/Script.c index e89b37583..dc0be0396 100644 --- a/planet/Objects.ocd/Clonk.ocd/Script.c +++ b/planet/Objects.ocd/Clonk.ocd/Script.c @@ -32,6 +32,10 @@ protected func Construction() { _inherited(...); + // Modifiable ActMap + if (ActMap == this.Prototype.ActMap) + ActMap = { Prototype = this.Prototype.ActMap }; + SetAction("Walk"); SetDir(Random(2)); // Broadcast for rules diff --git a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/DefCore.txt b/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/DefCore.txt index cbaa9ac7b..4c930a0ca 100644 --- a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/DefCore.txt +++ b/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/DefCore.txt @@ -2,12 +2,12 @@ id=Nugget Version=4,10,0,0 Category=C4D_Object -Width=8 -Height=8 -Offset=-4,-4 +Width=12 +Height=12 +Offset=-6,-6 Vertices=3 -VertexX=0,2,-2 -VertexY=1,-1,-1 +VertexX=0,4,-4 +VertexY=3,-3,-3 VertexFriction=40,40,40 Value=5 Mass=12 diff --git a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/GoldNugget.skeleton b/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/GoldNugget.skeleton new file mode 100644 index 000000000..9b1a148aa Binary files /dev/null and b/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/GoldNugget.skeleton differ diff --git a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics.8.png b/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics.8.png deleted file mode 100644 index 95a42cb0a..000000000 Binary files a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics.8.png and /dev/null differ diff --git a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics.mesh b/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics.mesh new file mode 100644 index 000000000..ef871566f Binary files /dev/null and b/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics.mesh differ diff --git a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics1.8.png b/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics1.8.png deleted file mode 100644 index c5cf9df16..000000000 Binary files a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics1.8.png and /dev/null differ diff --git a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics2.8.png b/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics2.8.png deleted file mode 100644 index 25d5e5d28..000000000 Binary files a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics2.8.png and /dev/null differ diff --git a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics3.8.png b/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics3.8.png deleted file mode 100644 index 121ac841c..000000000 Binary files a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics3.8.png and /dev/null differ diff --git a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics4.8.png b/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics4.8.png deleted file mode 100644 index 7e9875569..000000000 Binary files a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Graphics4.8.png and /dev/null differ diff --git a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Scene.material b/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Scene.material new file mode 100644 index 000000000..99d52cf2a --- /dev/null +++ b/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Scene.material @@ -0,0 +1,14 @@ +material GoldNugget +{ + receive_shadows on + technique + { + pass + { + ambient 0.500000 0.500000 0.500000 1.000000 + diffuse 0.649770 0.594821 0.122168 1.000000 + specular 0.652682 0.652682 0.652682 1.000000 18.000000 + emissive 0.348690 0.319202 0.065559 1.000000 + } + } +} diff --git a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Script.c b/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Script.c index 743c6205f..c68ba9b39 100644 --- a/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Script.c +++ b/planet/Objects.ocd/Items.ocd/Resources.ocd/Nugget.ocd/Script.c @@ -1,11 +1,9 @@ /*--- Nugget ---*/ -protected func Construction() -{ - var graphic = Random(5); - if(graphic) - SetGraphics(Format("%d",graphic)); -} +#include Library_CarryHeavy + +public func GetCarryMode(clonk) { return CARRY_BothHands; } +public func GetCarryPhase() { return 800; } protected func Hit(x, y) { @@ -16,7 +14,9 @@ protected func Hit(x, y) public func IsFoundryIngredient() { return true; } public func IsValuable(){ return true; } - -local Collectible = 1; +func Definition(def) { + SetProperty("PictureTransformation", Trans_Mul(Trans_Rotate(30,0,0,1),Trans_Rotate(-30,1,0,0),Trans_Scale(1300)),def); +} local Name = "$Name$"; -local Description = "$Description$"; \ No newline at end of file +local Description = "$Description$"; +local Touchable = 2; \ No newline at end of file diff --git a/planet/Objects.ocd/Libraries.ocd/CarryHeavy.ocd/Script.c b/planet/Objects.ocd/Libraries.ocd/CarryHeavy.ocd/Script.c index 3e7a8d111..d105da11a 100644 --- a/planet/Objects.ocd/Libraries.ocd/CarryHeavy.ocd/Script.c +++ b/planet/Objects.ocd/Libraries.ocd/CarryHeavy.ocd/Script.c @@ -125,12 +125,32 @@ func FxIntLiftHeavyStop(object clonk, proplist effect, int reason, bool tmp) // ------------------- // Carrying the object // ------------------- +func FxIntCarryHeavyStart(object clonk, proplist effect, int temp) +{ + if (temp) return; + clonk->DisableScale(); + clonk->DisableHangle(); + var throw = clonk.ThrowSpeed; + if (throw < 150) return; // I know this may be bad in some situations and result in normal throwing speed + // If so, see it as an easter egg exploit! + clonk.ThrowSpeed -= 150; + effect.throw = throw - clonk.ThrowSpeed; +} + func FxIntCarryHeavyTimer(object clonk, proplist effect, int timer) { //Delete this effect if not contained in the clonk anymore if(Contained() != clonk) return -1; } +func FxIntCarryHeavyStop(object clonk, proplist effect, int reason, bool temp) +{ + if (temp) return; + clonk->EnableScale(); + clonk->EnableHangle(); + clonk.ThrowSpeed += effect.throw; +} + // ------------------ // Dropping the object // ------------------