From 0ecd30ad9e54105d033a59f260d46e586cd4abfe Mon Sep 17 00:00:00 2001 From: Maikel de Vries Date: Wed, 7 Jan 2015 20:05:17 +0100 Subject: [PATCH] dynamite after fusing not collectible, but can be put into containers --- .../Items.ocd/Tools.ocd/Dynamite.ocd/Script.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/planet/Objects.ocd/Items.ocd/Tools.ocd/Dynamite.ocd/Script.c b/planet/Objects.ocd/Items.ocd/Tools.ocd/Dynamite.ocd/Script.c index b8477eacd..fba0fc49d 100644 --- a/planet/Objects.ocd/Items.ocd/Tools.ocd/Dynamite.ocd/Script.c +++ b/planet/Objects.ocd/Items.ocd/Tools.ocd/Dynamite.ocd/Script.c @@ -71,10 +71,13 @@ private func Place(object clonk, int x, int y, bool box) public func Fuse() { - if(GetAction() != "Fuse") + if (GetAction() != "Fuse") { - if(!FindObject(Find_Category(C4D_StaticBack), Find_Func("IsFuse"), Find_ActionTargets(this))) Sound("Fuse"); + if (!FindObject(Find_Category(C4D_StaticBack), Find_Func("IsFuse"), Find_ActionTargets(this))) + Sound("Fuse"); SetAction("Fuse"); + // Object can't be collected anymore when it fuses. + this.Collectible = false; } } @@ -101,7 +104,7 @@ protected func Incineration() { Extinguish(); Fuse(); } protected func RejectEntrance() { - return GetAction() == "Fuse" || GetAction() == "Ready"; + return GetAction() == "Ready"; } // Controle of the Dynamite box @@ -113,11 +116,15 @@ public func SetReady() public func SetFuse() { SetAction("Fuse"); + // Object can't be collected anymore when it fuses. + this.Collectible = false; } public func Reset() { SetAction("Idle"); + // Object can be collected again. + this.Collectible = true; } private func Fusing()