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

EUCableGrid

Hierarchy

Index

Constructors

constructor

  • new EUCableGrid(energyType: EnergyType, maxValue: number, blockID: number, region: BlockSource): EUCableGrid
  • Parameters

    • energyType: EnergyType
    • maxValue: number
    • blockID: number
    • region: BlockSource

    Returns EUCableGrid

Properties

baseEnergy

baseEnergy: string

blockID

blockID: number

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

optionalmaxSafetyVoltage

maxSafetyVoltage?: number

maxValue

maxValue: number

receivers

receivers: EnergyNode[]

region

region: BlockSource

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

addBurnParticles

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

    • x: number
    • y: number
    • z: 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

  • Parameters

    Returns void

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

dealElectrocuteDamage

  • dealElectrocuteDamage(damage: number): void
  • Parameters

    • damage: number

    Returns void

destroy

  • destroy(): void
  • Returns void

getCoordsFromString

  • getCoordsFromString(coordKey: string): Vector
  • Parameters

    • coordKey: string

    Returns Vector

init

  • init(): void
  • Returns void

isCompatible

  • Parameters

    Returns boolean

isConductor

  • isConductor(type: string): boolean
  • Parameters

    • type: string

    Returns boolean

mergeGrid

onOverload

  • onOverload(voltage: number): void
  • Parameters

    • voltage: number

    Returns void

rebuildFor6Sides

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

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

    Returns void

rebuildRecursive

  • rebuildRecursive(x: number, y: number, z: number, side?: number): void
  • Parameters

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

    Returns void

receiveEnergy

  • Parameters

    Returns number

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
  • Parameters

    Returns number