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

WiredPinsSystem

Extends:

GameSystemGameSystemWithFilter → WiredPinsSystem

Static Method Summary

Static Public Methods
public static

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

pinSprites: {"undefined": *}

Method Summary

Public Methods
public

checkEntityPinsCollide(entity: Entity, offset: Vector=): boolean

Checks if the pins of the given entity collide on the wires layer

public

Draws a given entity

public

Called to free space for the given entity

public

prePlacementCheck(entity: Entity, offset: Vector): *

Performs pre-placement checks

Inherited Summary

From class GameSystem
public static

Returns static id

public

root: *

public

draw(parameters: DrawParameters)

Override, do not call this directly, use startDraw()

public

Should refresh all caches

public

startDraw(parameters: DrawParameters)

public

update()

Updates the game system, override to perform logic

From class GameSystemWithFilter
public

All entities which match the current components

public
public
public
public
public

Recomputes all target entities after the game has loaded

public
public
public
public

Static Public Methods

public static getId(): string source

Returns static id

Override:

GameSystem#getId

Return:

string

Public Constructors

public constructor() source

Constructs a new game system with the given component filter. It will process all entities which have all of the passed components

Override:

GameSystemWithFilter#constructor

Public Members

public pinSprites: {"undefined": *} source

Public Methods

public checkEntityPinsCollide(entity: Entity, offset: Vector=): boolean source

Checks if the pins of the given entity collide on the wires layer

Params:

NameTypeAttributeDescription
entity Entity
offset Vector=

Optional, move the entity by the given offset first

Return:

boolean

True if the pins collide

public drawChunk_WiresForegroundLayer(parameters: DrawParameters, chunk: MapChunkView) source

Draws a given entity

Params:

NameTypeAttributeDescription
parameters DrawParameters
chunk MapChunkView

public freeEntityAreaBeforeBuild(entity: Entity) source

Called to free space for the given entity

Params:

NameTypeAttributeDescription
entity Entity

public prePlacementCheck(entity: Entity, offset: Vector): * source

Performs pre-placement checks

Params:

NameTypeAttributeDescription
entity Entity
offset Vector

Return:

*