Перейти к основному содержанию

EnergyNode

Hierarchy

Index

Constructors

constructor

Properties

privateaddEntry

addEntry: any

privateaddReceiver

addReceiver: any
@param

receiver node

@returns

true if link to the node was added, false if it already exists

baseEnergy

baseEnergy: string

blocksMap

blocksMap: object

currentIn

currentIn: number

currentOut

currentOut: number

currentPower

currentPower: number

dimension

dimension: number

energyIn

energyIn: number

energyOut

energyOut: number

energyPower

energyPower: number

energyTypes

energyTypes: object

entries

entries: EnergyNode[]

id

id: number

initialized

initialized: boolean

maxValue

maxValue: number

receivers

receivers: EnergyNode[]

privateremoveEntry

removeEntry: any

privateremoveReceiver

removeReceiver: any
@param

receiver node

@returns

true if link to the node was removed, false if it already removed

removed

removed: boolean

Methods

add

  • add(amount: number, power?: number): number
  • Parameters

    • amount: number
    • optionalpower: number

    Returns number

addAll

  • addAll(amount: number, power?: number): void
  • @deprecated

    Parameters

    • amount: number
    • optionalpower: number

    Returns void

addConnection

  • Adds output connection to specified node


    Parameters

    Returns void

addCoords

  • addCoords(x: number, y: number, z: number): void
  • Parameters

    • x: number
    • y: number
    • z: number

    Returns void

addEnergyType

addPacket

  • addPacket(energyName: string, amount: number, size?: number): number
  • Parameters

    • energyName: string
    • amount: number
    • optionalsize: number

    Returns number

canConductEnergy

  • canConductEnergy(coord1: Vector, coord2: Vector, side: number): boolean
  • Parameters

    • coord1: Vector
    • coord2: Vector
    • side: number

    Returns boolean

canExtractEnergy

  • canExtractEnergy(side: number, type: string): boolean
  • Parameters

    • side: number
    • type: string

    Returns boolean

canReceiveEnergy

  • canReceiveEnergy(side: number, type: string): boolean
  • Parameters

    • side: number
    • type: string

    Returns boolean

destroy

  • destroy(): void
  • Returns void

init

  • init(): void
  • Returns void

isCompatible

isConductor

  • isConductor(type: string): boolean
  • Parameters

    • type: string

    Returns boolean

onOverload

  • onOverload(packetSize: number): void
  • Parameters

    • packetSize: number

    Returns void

receiveEnergy

removeConnection

  • Removes output connection to specified node


    Parameters

    Returns void

removeCoords

  • removeCoords(x: number, y: number, z: number): void
  • Parameters

    • x: number
    • y: number
    • z: number

    Returns void

resetConnections

  • resetConnections(): void
  • Returns void

tick

  • tick(): void
  • Returns void

toString

  • toString(): string
  • Returns string

transferEnergy

  • transferEnergy(amount: number, packet: EnergyPacket): number