From 00b1b3778795cf5e69f59d27371d3029837274a3 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 27 Dec 2018 21:21:53 +0100 Subject: [PATCH] Renamed Library_Tank to Library_PipeControl The library did not depend on the Library_LiquidContainer script at all, removed that include and added it to the previous includers. Removed the IsLiquidTank() identifier, because it was unused. --- planet/Experimental.ocd/LiquidTank.ocd/Script.c | 3 ++- .../LiquidControl.ocd/LiquidTank.ocd/DefCore.txt | 2 +- .../LiquidControl.ocd/LiquidTank.ocd/Script.c | 16 +++++++--------- .../Structures.ocd/Foundry.ocd/Script.c | 3 ++- .../Objects.ocd/Structures.ocd/Pump.ocd/Script.c | 4 ++-- .../Structures.ocd/SteamEngine.ocd/Script.c | 3 ++- .../Vehicles.ocd/Locomotive.ocd/Script.c | 3 ++- .../RapidRefining.ocs/RefineryDrain.ocd/Script.c | 3 ++- 8 files changed, 20 insertions(+), 17 deletions(-) diff --git a/planet/Experimental.ocd/LiquidTank.ocd/Script.c b/planet/Experimental.ocd/LiquidTank.ocd/Script.c index 41596fef3..bb2617a60 100644 --- a/planet/Experimental.ocd/LiquidTank.ocd/Script.c +++ b/planet/Experimental.ocd/LiquidTank.ocd/Script.c @@ -8,7 +8,8 @@ #include Library_Structure #include Library_Ownable -#include Library_Tank +#include Library_LiquidContainer +#include Library_PipeControl public func Initialize() diff --git a/planet/Objects.ocd/Libraries.ocd/LiquidControl.ocd/LiquidTank.ocd/DefCore.txt b/planet/Objects.ocd/Libraries.ocd/LiquidControl.ocd/LiquidTank.ocd/DefCore.txt index 0f06786e3..572c7f47d 100644 --- a/planet/Objects.ocd/Libraries.ocd/LiquidControl.ocd/LiquidTank.ocd/DefCore.txt +++ b/planet/Objects.ocd/Libraries.ocd/LiquidControl.ocd/LiquidTank.ocd/DefCore.txt @@ -1,5 +1,5 @@ [DefCore] -id=Library_Tank +id=Library_PipeControl Version=8,0 Category=C4D_StaticBack HideInCreator=true diff --git a/planet/Objects.ocd/Libraries.ocd/LiquidControl.ocd/LiquidTank.ocd/Script.c b/planet/Objects.ocd/Libraries.ocd/LiquidControl.ocd/LiquidTank.ocd/Script.c index 7e1f9fd7a..4ca60a164 100644 --- a/planet/Objects.ocd/Libraries.ocd/LiquidControl.ocd/LiquidTank.ocd/Script.c +++ b/planet/Objects.ocd/Libraries.ocd/LiquidControl.ocd/LiquidTank.ocd/Script.c @@ -1,17 +1,17 @@ /** - Liquid Tank - A structure that can contain liquids. Connecting pipes to the - structure can be allowed, but this has to be implemented by the + Pipe Control + + Provides the interface for adding pipes (source, drain, air) to an object. + + Connecting pipes has to be implemented by the object. This is controlled with the callbacks - QueryConnectPipe - OnPipeConnect - OnPipeDisconnect in that structure. - - @author Marky -*/ -#include Library_LiquidContainer + @author Maikel, Marky +*/ static const LIBRARY_TANK_Menu_Action_Add_Drain = "adddrain"; @@ -47,8 +47,6 @@ public func Construction() _inherited(...); } -public func IsLiquidTank() { return true; } - /*-- Menu Entries --*/ diff --git a/planet/Objects.ocd/Structures.ocd/Foundry.ocd/Script.c b/planet/Objects.ocd/Structures.ocd/Foundry.ocd/Script.c index 8ffde290e..d5b62f81c 100644 --- a/planet/Objects.ocd/Structures.ocd/Foundry.ocd/Script.c +++ b/planet/Objects.ocd/Structures.ocd/Foundry.ocd/Script.c @@ -9,7 +9,8 @@ #include Library_Ownable #include Library_Producer #include Library_LampPost -#include Library_Tank +#include Library_LiquidContainer +#include Library_PipeControl // Foundry does not need power. diff --git a/planet/Objects.ocd/Structures.ocd/Pump.ocd/Script.c b/planet/Objects.ocd/Structures.ocd/Pump.ocd/Script.c index eacb8896c..2162f1695 100644 --- a/planet/Objects.ocd/Structures.ocd/Pump.ocd/Script.c +++ b/planet/Objects.ocd/Structures.ocd/Pump.ocd/Script.c @@ -12,7 +12,8 @@ #include Library_Ownable #include Library_PowerConsumer #include Library_PowerProducer -#include Library_Tank +#include Library_LiquidContainer +#include Library_PipeControl #include Library_ResourceSelection static const PUMP_Menu_Action_Switch_On = "on"; @@ -38,7 +39,6 @@ local stored_material_amount; /** This object is a liquid pump, thus pipes can be connected. */ public func IsLiquidPump() { return true; } public func IsLiquidContainer() { return false; } -public func IsLiquidTank() { return false; } // The pump is rather complex for players. If anything happened, tell it to the player via the interaction menu. diff --git a/planet/Objects.ocd/Structures.ocd/SteamEngine.ocd/Script.c b/planet/Objects.ocd/Structures.ocd/SteamEngine.ocd/Script.c index 77b845846..b2a21ad3a 100644 --- a/planet/Objects.ocd/Structures.ocd/SteamEngine.ocd/Script.c +++ b/planet/Objects.ocd/Structures.ocd/SteamEngine.ocd/Script.c @@ -11,7 +11,8 @@ #include Library_Ownable #include Library_PowerProducer #include Library_Flag -#include Library_Tank +#include Library_LiquidContainer +#include Library_PipeControl local DefaultFlagRadius = 200; diff --git a/planet/Objects.ocd/Vehicles.ocd/Locomotive.ocd/Script.c b/planet/Objects.ocd/Vehicles.ocd/Locomotive.ocd/Script.c index 44d304a26..17ba71904 100644 --- a/planet/Objects.ocd/Vehicles.ocd/Locomotive.ocd/Script.c +++ b/planet/Objects.ocd/Vehicles.ocd/Locomotive.ocd/Script.c @@ -6,7 +6,8 @@ */ #include Library_ElevatorControl -#include Library_Tank +#include Library_LiquidContainer +#include Library_PipeControl local move_dir; diff --git a/planet/Worlds.ocf/RapidRefining.ocs/RefineryDrain.ocd/Script.c b/planet/Worlds.ocf/RapidRefining.ocs/RefineryDrain.ocd/Script.c index 229eb557f..59d04a91e 100644 --- a/planet/Worlds.ocf/RapidRefining.ocs/RefineryDrain.ocd/Script.c +++ b/planet/Worlds.ocf/RapidRefining.ocs/RefineryDrain.ocd/Script.c @@ -7,7 +7,8 @@ #include Library_Structure #include Library_Ownable -#include Library_Tank +#include Library_LiquidContainer +#include Library_PipeControl /*-- Pipeline --*/