Permalink
Browse files

Added method for getting the connected object

  • Loading branch information...
gitMarky committed Dec 27, 2018
1 parent cd38671 commit a29d6f005c96be977f024ddac08f93c332b35420
Showing with 16 additions and 0 deletions.
  1. +16 −0 planet/Objects.ocd/Libraries.ocd/LiquidControl.ocd/PipeControl.ocd/Script.c
@@ -235,6 +235,22 @@ public func GetDrainPipe() { return lib_pipe_control.drain_pipe;}
public func GetSourcePipe() { return lib_pipe_control.source_pipe;}
public func GetNeutralPipe() { return lib_pipe_control.neutral_pipe;}

public func GetConnectedObject(object pipe, bool strict)
{
if (pipe)
{
return pipe->GetConnectedObject(this);
}
if (strict)
{
return nil;
}
else
{
return this;
}
}

public func SetAirPipe(object air_pipe)
{
lib_pipe_control.air_pipe = air_pipe;

0 comments on commit a29d6f0

Please sign in to comment.