diff --git a/planet/Objects.ocd/Items.ocd/Resources.ocd/Coal.ocd/Script.c b/planet/Objects.ocd/Items.ocd/Resources.ocd/Coal.ocd/Script.c index df9c8c48f..26bba5387 100644 --- a/planet/Objects.ocd/Items.ocd/Resources.ocd/Coal.ocd/Script.c +++ b/planet/Objects.ocd/Items.ocd/Resources.ocd/Coal.ocd/Script.c @@ -14,7 +14,12 @@ protected func Hit(x, y) } public func IsFuel() { return true; } -public func GetFuelAmount() { return GetCon(); } +public func GetFuelAmount(bool get_partial) +{ + if (get_partial) + return GetCon(); + return 100; +} local Collectible = 1; local Name = "$Name$"; diff --git a/planet/Objects.ocd/Items.ocd/Resources.ocd/Moss.ocd/Script.c b/planet/Objects.ocd/Items.ocd/Resources.ocd/Moss.ocd/Script.c index 8ed4627af..d330ca3c0 100644 --- a/planet/Objects.ocd/Items.ocd/Resources.ocd/Moss.ocd/Script.c +++ b/planet/Objects.ocd/Items.ocd/Resources.ocd/Moss.ocd/Script.c @@ -113,7 +113,7 @@ private func FindNearWater() /*-- Status --*/ public func IsFuel() { return !wetness; } -public func GetFuelAmount() { return 100; } +public func GetFuelAmount(bool get_partial) { return 100; } local Collectible = 1; local Name = "$Name$"; diff --git a/planet/Objects.ocd/Items.ocd/Resources.ocd/Wood.ocd/Script.c b/planet/Objects.ocd/Items.ocd/Resources.ocd/Wood.ocd/Script.c index 90d4883c0..1ac0f528b 100644 --- a/planet/Objects.ocd/Items.ocd/Resources.ocd/Wood.ocd/Script.c +++ b/planet/Objects.ocd/Items.ocd/Resources.ocd/Wood.ocd/Script.c @@ -8,11 +8,16 @@ protected func Hit() func Incineration() { - SetClrModulation (RGB(48, 32, 32)); + SetClrModulation(RGB(48, 32, 32)); } public func IsFuel() { return true; } -public func GetFuelAmount() { return 50; } +public func GetFuelAmount(bool get_partial) +{ + if (get_partial) + return GetCon() / 2; + return 50; +} public func IsSawmillProduct() { return true; } local Collectible = 1; diff --git a/planet/Objects.ocd/Items.ocd/Tools.ocd/Ropebridge.ocd/BridgeLoosePlank.ocd/Script.c b/planet/Objects.ocd/Items.ocd/Tools.ocd/Ropebridge.ocd/BridgeLoosePlank.ocd/Script.c index 4d5027555..65f9cae4a 100644 --- a/planet/Objects.ocd/Items.ocd/Tools.ocd/Ropebridge.ocd/BridgeLoosePlank.ocd/Script.c +++ b/planet/Objects.ocd/Items.ocd/Tools.ocd/Ropebridge.ocd/BridgeLoosePlank.ocd/Script.c @@ -12,7 +12,7 @@ func Incineration() } public func IsFuel() { return true; } -public func GetFuelAmount() { return 30; } +public func GetFuelAmount(bool get_partial) { return 30; } // Main bridge object is saved func SaveScenarioObject() { return false; } diff --git a/planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c b/planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c index d872997da..70fe08e03 100644 --- a/planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c +++ b/planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c @@ -411,7 +411,7 @@ public func CheckFuel(id product, bool remove) var fuel_amount = 0; // Find fuel in this producer. for (var fuel in FindObjects(Find_Container(this), Find_Func("IsFuel"))) - fuel_amount += fuel->~GetFuelAmount(); + fuel_amount += fuel->~GetFuelAmount(false); if (fuel_amount < FuelNeed(product)) return false; else if (remove) @@ -420,7 +420,7 @@ public func CheckFuel(id product, bool remove) fuel_amount = 0; for (var fuel in FindObjects(Find_Container(this), Find_Func("IsFuel"))) { - fuel_amount += fuel->~GetFuelAmount(); + fuel_amount += fuel->~GetFuelAmount(false); fuel->RemoveObject(); if (fuel_amount >= FuelNeed(product)) break; diff --git a/planet/Objects.ocd/Structures.ocd/SteamEngine.ocd/Script.c b/planet/Objects.ocd/Structures.ocd/SteamEngine.ocd/Script.c index 6cc60086b..fa6a1ab7e 100644 --- a/planet/Objects.ocd/Structures.ocd/SteamEngine.ocd/Script.c +++ b/planet/Objects.ocd/Structures.ocd/SteamEngine.ocd/Script.c @@ -91,7 +91,7 @@ public func OnPowerProductionStart(int amount) if (!fuel) return false; // Extract the fuel amount from the new piece of fuel. - fuel_amount += fuel->~GetFuelAmount() * 18; + fuel_amount += fuel->~GetFuelAmount(true) * 18; fuel->RemoveObject(); } // There is enough fuel so start producing power and notify network of this. @@ -134,7 +134,7 @@ protected func Working() return; } // Extract the fuel amount from the new piece of fuel. - fuel_amount += fuel->~GetFuelAmount() * 18; + fuel_amount += fuel->~GetFuelAmount(true) * 18; fuel->RemoveObject(); } // Smoke from the exhaust shaft.