Skip to content

industry_workers

Source: base/tealdef/industries/industry_workers.d.tl

Notes

State of the ::/industries/industry_workers.gs game script, which records the workers that reach each industry by line.

IndustriesWorkersState

record global base/tealdef/industries/industry_workers.d.tl:3

global record IndustriesWorkersState

Notes

State of the industry_workers game script.

Fields

Name Type Description
industriesState {Engine.Entity : IndustryState} Worker state per industry entity.

IndustriesWorkersState.IndustryState

record base/tealdef/industries/industry_workers.d.tl:4

record IndustryState

Notes

Worker visits of one industry.

Used in the base game: 2 times in 1 file

base/content/industries/industry_productivity_util.tl:5

function industry_productivity_util.getIndustryWorkersState(entity : Engine.Entity) : IndustriesWorkersState.IndustryState

Fields

Name Type Description
lastVisitors {Visitor} Recent visitors, newest first; at most 20, none older than workersTimeIntervalMax.
pendingVisitors {Visitor} Arrivals not yet processed by the next update.

IndustriesWorkersState.IndustryState.Visitor

record base/tealdef/industries/industry_workers.d.tl:5

record Visitor

Notes

One worker who arrived at the industry.

Used in the base game: 5 times in 3 files

base/content/industries/industry_productivity_util.tl:23

function industry_productivity_util.getVisitors(entity : Engine.Entity) : {IndustriesWorkersState.IndustryState.Visitor}
base/content/industries/industry_workers.script.tl:45
table.sort(pendingVisitors, function(a : IndustriesWorkersState.IndustryState.Visitor, b : IndustriesWorkersState.IndustryState.Visitor) : boolean
base/content/gui/gui/entity_window/entity_window_util.tl:1609
table.sort(visitors, function(a : IndustriesWorkersState.IndustryState.Visitor, b : IndustriesWorkersState.IndustryState.Visitor) : boolean

Fields

Name Type Description
time integer Game time of the arrival.
entity EntityUtil.EntityAndRevision The sim person, with revision.