diff --git a/planet/Objects.ocd/Items.ocd/Resources.ocd/Seeds.ocd/Script.c b/planet/Objects.ocd/Items.ocd/Resources.ocd/Seeds.ocd/Script.c index a5c5e6008..3298dd36f 100644 --- a/planet/Objects.ocd/Items.ocd/Resources.ocd/Seeds.ocd/Script.c +++ b/planet/Objects.ocd/Items.ocd/Resources.ocd/Seeds.ocd/Script.c @@ -32,6 +32,8 @@ protected func Hit() return 1; } +public func IsMillIngredient() { return true; } + local Collectible = 1; local Name = "$Name$"; local Description = "$Description$"; diff --git a/planet/Objects.ocd/Structures.ocd/Windmill.ocd/DefCore.txt b/planet/Objects.ocd/Structures.ocd/Windmill.ocd/DefCore.txt index 4107203b5..ef3dbd41d 100644 --- a/planet/Objects.ocd/Structures.ocd/Windmill.ocd/DefCore.txt +++ b/planet/Objects.ocd/Structures.ocd/Windmill.ocd/DefCore.txt @@ -9,12 +9,12 @@ Height=96 Offset=-25,-48 Vertices=5 VertexX=0,25,15,-15,-25 -VertexY=-47,-20,48,48,-20 +VertexY=-47,-20,47,47,-20 VertexFriction=50,50,100,100,50 Value=150 Mass=2500 Components=Rock=6;Wood=2; -Collection=-10,35,15,15 +Collection=-18,35,15,15 Exclusive=1 BlastIncinerate=100 Construction=1 diff --git a/planet/Objects.ocd/Structures.ocd/Windmill.ocd/Script.c b/planet/Objects.ocd/Structures.ocd/Windmill.ocd/Script.c index f77b661d7..eccbd5329 100644 --- a/planet/Objects.ocd/Structures.ocd/Windmill.ocd/Script.c +++ b/planet/Objects.ocd/Structures.ocd/Windmill.ocd/Script.c @@ -9,11 +9,16 @@ local wind_anim; +protected func Construction() +{ + SetProperty("MeshTransformation", Trans_Rotate(-30,0,1,0)); + return _inherited(...); +} + protected func Initialize() { - SetProperty("MeshTransformation", Trans_Rotate(RandomX(-15,15),0,1,0)); - wind_anim = PlayAnimation("Spin", 5, Anim_Const(0), Anim_Const(1000)); // Set initial position + wind_anim = PlayAnimation("Spin", 5, Anim_Const(0), Anim_Const(1000)); Wind2Turn(); return _inherited(...); } @@ -101,19 +106,26 @@ protected func Collection() public func FxCrushingTimer(object target, proplist effect, int time) { - CreateParticle("Axe_WoodChip", -5, 40, 5 - Random(11), RandomX(6,13) * -1, 20, RGB(255,255,255), this); + CreateParticle("Axe_WoodChip", -12, 40, 5 - Random(11), RandomX(6,13) * -1, 20, RGB(255,255,255), this); return 1; } public func OnProductEjection(object product) { - product->SetPosition(GetX() + 30, GetY() + 40); + product->SetPosition(GetX() + 25, GetY() + 40); product->SetSpeed(0, -17); product->SetR(30 - Random(59)); Sound("Pop"); return; } +protected func RejectCollect(id item, object collect) +{ + if(collect->~IsMillIngredient()) return false; + else + return true; +} + func Definition(def) { SetProperty("PictureTransformation", Trans_Mul(Trans_Translate(2000,0,7000),Trans_Rotate(-20,1,0,0),Trans_Rotate(30,0,1,0)), def); }