Skip to content

industries

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

Notes

State and config of the industries game script (expansion and closure of industries).

IndustriesState

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

global record IndustriesState

Notes

State of the industries game script.

Fields

Name Type Description
toSpawn integer
industryFailedExtensions {Engine.Entity : FailedExpansion} Industry -> last failed expansion.

IndustriesState.FailedExpansion

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

record FailedExpansion

Notes

A failed expansion of an industry.

Used in the base game: 2 times in 1 file

base/content/gui/gui/entity_window/industry/industry.tl:55

local function getFailedExpansion() : IndustriesState.FailedExpansion

Fields

Name Type Description
triangles {{Vec2f, Vec2f, Vec2f}} Triangles of the area that blocked the expansion.
tick integer Update count at which the expansion failed.

IndustriesConfig

record global base/tealdef/game_mechanics/industries/industries.d.tl:12

global record IndustriesConfig

Notes

Config of the industries game script (game_script_config resource industries_config.res).

Fields

Name Type Description
extendTimeSpanYears number Game years between expansion attempts (0.5).
unusedTimeSpanYears number Game years without consumed or shipped goods after which an industry may close (5).
closureCountdownTimeSpanYears number Game years from the closure notice until the industry despawns (2); the closure is cancelled if the industry is used again.