‪GamecraftModdingAPI  ‪v1.8.0
‪The unofficial Gamecraft modding API
GamecraftModdingAPI.Blocks.SignalEngine Class Reference

‪Engine which executes signal actions More...

Inheritance diagram for GamecraftModdingAPI.Blocks.SignalEngine:
GamecraftModdingAPI.Engines.IApiEngine GamecraftModdingAPI.Engines.IFactoryEngine GamecraftModdingAPI.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)
 
ref ChannelDataStruct GetChannelDataStruct (EGID portID, out bool exists)
 
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)
 
EGID MatchBlockInputToPort (Block block, byte portUsage, out bool exists)
 
EGID MatchBlockInputToPort (EGID block, byte portUsage, out bool exists)
 
EGID MatchBlockOutputToPort (Block block, byte portUsage, out bool exists)
 
EGID MatchBlockOutputToPort (EGID block, byte portUsage, out bool exists)
 
ref WireEntityStruct MatchBlocksToWire (EGID startBlock, EGID endBlock, out bool exists, byte startPort=byte.MaxValue, byte endPort=byte.MaxValue)
 
ref WireEntityStruct MatchPortToWire (EGID portID, 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 = "GamecraftModdingAPISignalGameEngine" [get]
 

Detailed Description

Engine which executes signal actions

Member Function Documentation

◆ AddSignal() [1/2]

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

◆ AddSignal() [2/2]

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

◆ CreateNewWire()

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

◆ Dispose()

void GamecraftModdingAPI.Blocks.SignalEngine.Dispose ( )
inline

◆ Exists< T >()

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

◆ GetChannelDataStruct()

ref ChannelDataStruct GamecraftModdingAPI.Blocks.SignalEngine.GetChannelDataStruct ( EGID  portID,
out bool  exists 
)
inline

◆ GetComponent< T >()

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

◆ GetElectricBlocks()

EGID [] GamecraftModdingAPI.Blocks.SignalEngine.GetElectricBlocks ( )
inline

◆ GetPort()

ref PortEntityStruct GamecraftModdingAPI.Blocks.SignalEngine.GetPort ( EGID  port)
inline

◆ GetPortByOffset() [1/2]

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

◆ GetPortByOffset() [2/2]

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

◆ GetSignal() [1/2]

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

◆ GetSignal() [2/2]

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

◆ GetSignalIDs()

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

◆ GetSignalInputs()

EGID [] GamecraftModdingAPI.Blocks.SignalEngine.GetSignalInputs ( EGID  blockID)
inline

◆ GetSignalOutputs()

EGID [] GamecraftModdingAPI.Blocks.SignalEngine.GetSignalOutputs ( EGID  blockID)
inline

◆ GetWire()

ref WireEntityStruct GamecraftModdingAPI.Blocks.SignalEngine.GetWire ( EGID  wire)
inline

◆ MatchBlockInputToPort() [1/2]

EGID GamecraftModdingAPI.Blocks.SignalEngine.MatchBlockInputToPort ( Block  block,
byte  portUsage,
out bool  exists 
)
inline

◆ MatchBlockInputToPort() [2/2]

EGID GamecraftModdingAPI.Blocks.SignalEngine.MatchBlockInputToPort ( EGID  block,
byte  portUsage,
out bool  exists 
)
inline

◆ MatchBlockOutputToPort() [1/2]

EGID GamecraftModdingAPI.Blocks.SignalEngine.MatchBlockOutputToPort ( Block  block,
byte  portUsage,
out bool  exists 
)
inline

◆ MatchBlockOutputToPort() [2/2]

EGID GamecraftModdingAPI.Blocks.SignalEngine.MatchBlockOutputToPort ( EGID  block,
byte  portUsage,
out bool  exists 
)
inline

◆ MatchBlocksToWire()

ref WireEntityStruct GamecraftModdingAPI.Blocks.SignalEngine.MatchBlocksToWire ( EGID  startBlock,
EGID  endBlock,
out bool  exists,
byte  startPort = byte.MaxValue,
byte  endPort = byte.MaxValue 
)
inline

◆ MatchPortToWire()

ref WireEntityStruct GamecraftModdingAPI.Blocks.SignalEngine.MatchPortToWire ( EGID  portID,
EGID  blockID,
out bool  exists 
)
inline

◆ Ready()

void GamecraftModdingAPI.Blocks.SignalEngine.Ready ( )
inline

◆ SetSignal() [1/2]

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

◆ SetSignal() [2/2]

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

◆ WiredToInput()

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

◆ WiredToOutput()

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

Member Data Documentation

◆ HIGH

const float GamecraftModdingAPI.Blocks.SignalEngine.HIGH = 1.0f
static

◆ IsInGame

bool GamecraftModdingAPI.Blocks.SignalEngine.IsInGame = false

◆ isRemovable

bool GamecraftModdingAPI.Blocks.SignalEngine.isRemovable => false

◆ NEGATIVE_HIGH

const float GamecraftModdingAPI.Blocks.SignalEngine.NEGATIVE_HIGH = -1.0f
static

◆ POSITIVE_HIGH

const float GamecraftModdingAPI.Blocks.SignalEngine.POSITIVE_HIGH = 1.0f
static

◆ ZERO

const float GamecraftModdingAPI.Blocks.SignalEngine.ZERO = 0.0f
static

Property Documentation

◆ entitiesDB

EntitiesDB GamecraftModdingAPI.Blocks.SignalEngine.entitiesDB
set

◆ Factory

IEntityFactory GamecraftModdingAPI.Blocks.SignalEngine.Factory
getset

◆ Name

string GamecraftModdingAPI.Blocks.SignalEngine.Name = "GamecraftModdingAPISignalGameEngine"
get

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