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

MinerSystem

Extends:

GameSystemGameSystemWithFilter → MinerSystem

Static Method Summary

Static Public Methods
public static

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

Method Summary

Public Methods
public
public

findChainedMiner(entity: Entity): Entity | false

Finds the target chained miner for a given entity

public

Called whenever an entity got changed

public
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 needsRecompute: boolean source

Public Methods

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

Params:

NameTypeAttributeDescription
parameters DrawParameters
chunk MapChunkView

public findChainedMiner(entity: Entity): Entity | false source

Finds the target chained miner for a given entity

Params:

NameTypeAttributeDescription
entity Entity

Return:

Entity | false

The chained entity or null if not found

public onEntityChanged(entity: Entity) source

Called whenever an entity got changed

Params:

NameTypeAttributeDescription
entity Entity

public tryPerformMinerEject(entity: Entity, item: BaseItem): boolean source

Params:

NameTypeAttributeDescription
entity Entity
item BaseItem

Return:

boolean

public update() source

Updates the game system, override to perform logic

Override:

GameSystem#update