Home Reference Source
import {WireNetwork} from 'shapez.io/js/game/systems/wire.js'
public class | source

WireNetwork

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

allSlots: Array<{entity: Entity, slot: import("../components/wired_pins").WirePinSlot}>

All connected slots

public

The current value of this network

public

providers: Array<{entity: Entity, slot: import("../components/wired_pins").WirePinSlot}>

Who contributes to this network

public

receivers: Array<{entity: Entity, slot: import("../components/wired_pins").WirePinSlot}>

Who takes values from this network

public

All connected tunnels

public

Unique network identifier

public

Whether this network has a value conflict, that is, more than one sender has sent a value

public

Which wires are in this network

Method Summary

Public Methods
public

Returns whether this network currently has a value

Public Constructors

public constructor() source

Public Members

public allSlots: Array<{entity: Entity, slot: import("../components/wired_pins").WirePinSlot}> source

All connected slots

public currentValue: BaseItem source

The current value of this network

public providers: Array<{entity: Entity, slot: import("../components/wired_pins").WirePinSlot}> source

Who contributes to this network

public receivers: Array<{entity: Entity, slot: import("../components/wired_pins").WirePinSlot}> source

Who takes values from this network

public tunnels: Array<Entity> source

All connected tunnels

public uid: number source

Unique network identifier

public valueConflict: boolean source

Whether this network has a value conflict, that is, more than one sender has sent a value

public wires: Array<Entity> source

Which wires are in this network

Public Methods

public hasValue(): boolean source

Returns whether this network currently has a value

Return:

boolean