‪TechbloxModdingAPI  ‪v2.2.0
‪The unofficial Techblox modding API
TechbloxModdingAPI.Blocks.Engines.SignalEngine Class Reference

Engine which executes signal actions More...

Inheritance diagram for TechbloxModdingAPI.Blocks.Engines.SignalEngine:
TechbloxModdingAPI.Engines.IApiEngine TechbloxModdingAPI.Engines.IFactoryEngine TechbloxModdingAPI.Engines.IApiEngine

Public Member Functions

float AddSignal (EGID blockID, float signal, out uint signalID, bool clamp=true, bool input=true)
 
float AddSignal (uint signalID, float signal, bool clamp=true, bool input=true)
 
WireEntityStruct CreateNewWire (EGID startBlock, byte startPort, EGID endBlock, byte endPort)
 
void Dispose ()
 
bool Exists< T > (EGID egid)
 
OptionalRef< ChannelDataStruct > GetChannelDataStruct (EGID portID)
 
ref T GetComponent< T > (EGID egid)
 
EGID[] GetElectricBlocks ()
 
ref PortEntityStruct GetPort (EGID port)
 
ref PortEntityStruct GetPortByOffset (Block block, byte portNumber, bool input)
 
ref PortEntityStruct GetPortByOffset (BlockPortsStruct bps, byte portNumber, bool input)
 
float GetSignal (EGID blockID, out uint signalID, bool input=true)
 
float GetSignal (uint signalID, bool input=true)
 
uint[] GetSignalIDs (EGID blockID, bool input=true)
 
EGID[] GetSignalInputs (EGID blockID)
 
EGID[] GetSignalOutputs (EGID blockID)
 
ref WireEntityStruct GetWire (EGID wire)
 
OptionalRef< PortEntityStruct > MatchBlockIOToPort (Block block, byte portUsage, bool output)
 
OptionalRef< PortEntityStruct > MatchBlockIOToPort (EGID block, byte portUsage, bool output)
 
EGID MatchBlocksToWire (EGID startBlock, EGID endBlock, byte startPort=byte.MaxValue, byte endPort=byte.MaxValue)
 
ref WireEntityStruct MatchPortToWire (PortEntityStruct port, EGID blockID, out bool exists)
 
void Ready ()
 
bool SetSignal (EGID blockID, float signal, out uint signalID, bool input=true)
 
bool SetSignal (uint signalID, float signal, bool input=true)
 
EGID[] WiredToInput (EGID block, byte port)
 
EGID[] WiredToOutput (EGID block, byte port)
 

Public Attributes

bool IsInGame = false
 
bool isRemovable => false
 

Static Public Attributes

const float HIGH = 1.0f
 
const float NEGATIVE_HIGH = -1.0f
 
const float POSITIVE_HIGH = 1.0f
 
const float ZERO = 0.0f
 

Properties

EntitiesDB entitiesDB [set]
 
IEntityFactory Factory [get, set]
 
string Name = "TechbloxModdingAPISignalGameEngine" [get]
 

Detailed Description

Engine which executes signal actions

Member Function Documentation

◆ AddSignal() [1/2]

float TechbloxModdingAPI.Blocks.Engines.SignalEngine.AddSignal ( EGID  blockID,
float  signal,
out uint  signalID,
bool  clamp = true,
bool  input = true 
)
inline

◆ AddSignal() [2/2]

float TechbloxModdingAPI.Blocks.Engines.SignalEngine.AddSignal ( uint  signalID,
float  signal,
bool  clamp = true,
bool  input = true 
)
inline

◆ CreateNewWire()

WireEntityStruct TechbloxModdingAPI.Blocks.Engines.SignalEngine.CreateNewWire ( EGID  startBlock,
byte  startPort,
EGID  endBlock,
byte  endPort 
)
inline

◆ Dispose()

void TechbloxModdingAPI.Blocks.Engines.SignalEngine.Dispose ( )
inline

◆ Exists< T >()

bool TechbloxModdingAPI.Blocks.Engines.SignalEngine.Exists< T > ( EGID  egid)
inline
Type Constraints
T :struct 
T :IEntityComponent 

◆ GetChannelDataStruct()

OptionalRef<ChannelDataStruct> TechbloxModdingAPI.Blocks.Engines.SignalEngine.GetChannelDataStruct ( EGID  portID)
inline

◆ GetComponent< T >()

ref T TechbloxModdingAPI.Blocks.Engines.SignalEngine.GetComponent< T > ( EGID  egid)
inline
Type Constraints
T :unmanaged 
T :IEntityComponent 

◆ GetElectricBlocks()

EGID [] TechbloxModdingAPI.Blocks.Engines.SignalEngine.GetElectricBlocks ( )
inline

◆ GetPort()

ref PortEntityStruct TechbloxModdingAPI.Blocks.Engines.SignalEngine.GetPort ( EGID  port)
inline

◆ GetPortByOffset() [1/2]

ref PortEntityStruct TechbloxModdingAPI.Blocks.Engines.SignalEngine.GetPortByOffset ( Block  block,
byte  portNumber,
bool  input 
)
inline

◆ GetPortByOffset() [2/2]

ref PortEntityStruct TechbloxModdingAPI.Blocks.Engines.SignalEngine.GetPortByOffset ( BlockPortsStruct  bps,
byte  portNumber,
bool  input 
)
inline

◆ GetSignal() [1/2]

float TechbloxModdingAPI.Blocks.Engines.SignalEngine.GetSignal ( EGID  blockID,
out uint  signalID,
bool  input = true 
)
inline

◆ GetSignal() [2/2]

float TechbloxModdingAPI.Blocks.Engines.SignalEngine.GetSignal ( uint  signalID,
bool  input = true 
)
inline

◆ GetSignalIDs()

uint [] TechbloxModdingAPI.Blocks.Engines.SignalEngine.GetSignalIDs ( EGID  blockID,
bool  input = true 
)
inline

◆ GetSignalInputs()

EGID [] TechbloxModdingAPI.Blocks.Engines.SignalEngine.GetSignalInputs ( EGID  blockID)
inline

◆ GetSignalOutputs()

EGID [] TechbloxModdingAPI.Blocks.Engines.SignalEngine.GetSignalOutputs ( EGID  blockID)
inline

◆ GetWire()

ref WireEntityStruct TechbloxModdingAPI.Blocks.Engines.SignalEngine.GetWire ( EGID  wire)
inline

◆ MatchBlockIOToPort() [1/2]

OptionalRef<PortEntityStruct> TechbloxModdingAPI.Blocks.Engines.SignalEngine.MatchBlockIOToPort ( Block  block,
byte  portUsage,
bool  output 
)
inline

◆ MatchBlockIOToPort() [2/2]

OptionalRef<PortEntityStruct> TechbloxModdingAPI.Blocks.Engines.SignalEngine.MatchBlockIOToPort ( EGID  block,
byte  portUsage,
bool  output 
)
inline

◆ MatchBlocksToWire()

EGID TechbloxModdingAPI.Blocks.Engines.SignalEngine.MatchBlocksToWire ( EGID  startBlock,
EGID  endBlock,
byte  startPort = byte.MaxValue,
byte  endPort = byte.MaxValue 
)
inline

◆ MatchPortToWire()

ref WireEntityStruct TechbloxModdingAPI.Blocks.Engines.SignalEngine.MatchPortToWire ( PortEntityStruct  port,
EGID  blockID,
out bool  exists 
)
inline

◆ Ready()

void TechbloxModdingAPI.Blocks.Engines.SignalEngine.Ready ( )
inline

◆ SetSignal() [1/2]

bool TechbloxModdingAPI.Blocks.Engines.SignalEngine.SetSignal ( EGID  blockID,
float  signal,
out uint  signalID,
bool  input = true 
)
inline

◆ SetSignal() [2/2]

bool TechbloxModdingAPI.Blocks.Engines.SignalEngine.SetSignal ( uint  signalID,
float  signal,
bool  input = true 
)
inline

◆ WiredToInput()

EGID [] TechbloxModdingAPI.Blocks.Engines.SignalEngine.WiredToInput ( EGID  block,
byte  port 
)
inline

◆ WiredToOutput()

EGID [] TechbloxModdingAPI.Blocks.Engines.SignalEngine.WiredToOutput ( EGID  block,
byte  port 
)
inline

Member Data Documentation

◆ HIGH

const float TechbloxModdingAPI.Blocks.Engines.SignalEngine.HIGH = 1.0f
static

◆ IsInGame

bool TechbloxModdingAPI.Blocks.Engines.SignalEngine.IsInGame = false

◆ isRemovable

bool TechbloxModdingAPI.Blocks.Engines.SignalEngine.isRemovable => false

◆ NEGATIVE_HIGH

const float TechbloxModdingAPI.Blocks.Engines.SignalEngine.NEGATIVE_HIGH = -1.0f
static

◆ POSITIVE_HIGH

const float TechbloxModdingAPI.Blocks.Engines.SignalEngine.POSITIVE_HIGH = 1.0f
static

◆ ZERO

const float TechbloxModdingAPI.Blocks.Engines.SignalEngine.ZERO = 0.0f
static

Property Documentation

◆ entitiesDB

EntitiesDB TechbloxModdingAPI.Blocks.Engines.SignalEngine.entitiesDB
set

◆ Factory

IEntityFactory TechbloxModdingAPI.Blocks.Engines.SignalEngine.Factory
getset

◆ Name

string TechbloxModdingAPI.Blocks.Engines.SignalEngine.Name = "TechbloxModdingAPISignalGameEngine"
get

The documentation for this class was generated from the following file: