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

BeltUnderlaysSystem

Extends:

GameSystemGameSystemWithFilter → BeltUnderlaysSystem

Static Method Summary

Static Public Methods
public static

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

Method Summary

Public Methods
public

Checks if a given tile is connected and has an acceptor

public

Checks if a given tile is connected and has an ejector

public

computeBeltUnderlayType(entity: Entity, underlayTile: import("../components/belt_underlays").BeltUnderlayTile): enumClippedBeltUnderlayType

Computes the flag for a given tile

public

Draws a given chunk

public

Called when an area changed - Resets all caches in the given area

public

update()

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 staleArea: * source

public underlayBeltSprites: *[] source

Public Methods

public checkIsAcceptorConnected(tile: Vector, fromDirection: enumDirection): boolean source

Checks if a given tile is connected and has an acceptor

Params:

NameTypeAttributeDescription
tile Vector
fromDirection enumDirection

Return:

boolean

public checkIsEjectorConnected(tile: Vector, toDirection: enumDirection): boolean source

Checks if a given tile is connected and has an ejector

Params:

NameTypeAttributeDescription
tile Vector
toDirection enumDirection

Return:

boolean

public computeBeltUnderlayType(entity: Entity, underlayTile: import("../components/belt_underlays").BeltUnderlayTile): enumClippedBeltUnderlayType source

Computes the flag for a given tile

Params:

NameTypeAttributeDescription
entity Entity
underlayTile import("../components/belt_underlays").BeltUnderlayTile

Return:

enumClippedBeltUnderlayType

The type of the underlay

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

Draws a given chunk

Params:

NameTypeAttributeDescription
parameters DrawParameters
chunk MapChunkView

public recomputeStaleArea(area: Rectangle) source

Called when an area changed - Resets all caches in the given area

Params:

NameTypeAttributeDescription
area Rectangle

public update() source

Updates the game system, override to perform logic

Override:

GameSystem#update