EnergyNode
Hierarchy
- EnergyNode
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
energyType: EnergyType
dimension: number
Returns EnergyNode
Properties
privateaddEntry
privateaddReceiver
baseEnergy
blocksMap
currentIn
currentOut
currentPower
dimension
energyIn
energyOut
energyPower
energyTypes
entries
id
initialized
maxValue
receivers
privateremoveEntry
privateremoveReceiver
removed
Methods
add
Parameters
amount: number
optionalpower: number
Returns number
addAll
Parameters
amount: number
optionalpower: number
Returns void
addConnection
Adds output connection to specified node
Parameters
node: EnergyNode
receiver node
Returns void
addCoords
Parameters
x: number
y: number
z: number
Returns void
addEnergyType
Parameters
energyType: EnergyType
Returns void
addPacket
Parameters
energyName: string
amount: number
optionalsize: number
Returns number
canConductEnergy
Parameters
coord1: Vector
coord2: Vector
side: number
Returns boolean
canExtractEnergy
Parameters
side: number
type: string
Returns boolean
canReceiveEnergy
Parameters
side: number
type: string
Returns boolean
destroy
Returns void
init
Returns void
isCompatible
Parameters
node: EnergyNode
Returns boolean
isConductor
Parameters
type: string
Returns boolean
onOverload
Parameters
packetSize: number
Returns void
receiveEnergy
Parameters
amount: number
packet: EnergyPacket
Returns number
removeConnection
Removes output connection to specified node
Parameters
node: EnergyNode
receiver node
Returns void
removeCoords
Parameters
x: number
y: number
z: number
Returns void
resetConnections
Returns void
tick
Returns void
toString
Returns string
transferEnergy
Parameters
amount: number
packet: EnergyPacket
Returns number
receiver node
true if link to the node was added, false if it already exists