mission_task_empty_stocks¶
Source: base/tealdef/mission/tasks/transport_cargo/mission_task_empty_stocks.d.tl
Notes
Task that waits until industry stocks are emptied, optionally within a time limit.
MissionTaskEmptyStocks¶
record global base/tealdef/mission/tasks/transport_cargo/mission_task_empty_stocks.d.tl:3
global record MissionTaskEmptyStocks is MissionInterface.TaskScript<MissionTaskEmptyStocks.State, MissionTaskEmptyStocks.Params>
Load: local empty_stocks = ug_require "::/mission/tasks/transport_cargo/empty_stocks.tl"
Notes
Task (empty_stocks) that completes when all target stocks are empty, or when the countdown runs out. Shows the amount removed and, for several targets, how many are empty.
MissionTaskEmptyStocks.Params¶
record base/tealdef/mission/tasks/transport_cargo/mission_task_empty_stocks.d.tl:4
record Params
Notes
Params of the task.
Used in the base game: 3 times in 2 files
base/content/mission/mission/tasks/transport_cargo/empty_stocks.tl:7
mods/release/urbangames_campaign_mission_06/content/mission/mission/mission_story.tl:199
Fields
| Name | Type | Description |
|---|---|---|
targets |
{Engine.Entity} |
note: targets need to be stockList entities |
simTimeMinutesToComplete |
integer |
Time limit in simulation minutes (game time). |
countdown |
boolean |
Ends the task when the time limit runs out and shows the remaining time. |
Functions
getTargets(readOnlyApi : MissionInterface.MissionTaskReadOnlyApi) : {Engine.Entity} base/tealdef/mission/tasks/transport_cargo/mission_task_empty_stocks.d.tl:6
Notes
Returns the stock-list entities when targets is not set; called until it returns a list.
| Parameter | Type | Description |
|---|---|---|
readOnlyApi |
MissionInterface.MissionTaskReadOnlyApi |
Read-only mission API. |
Returns {Engine.Entity}: Stock-list entities.
MissionTaskEmptyStocks.State¶
record base/tealdef/mission/tasks/transport_cargo/mission_task_empty_stocks.d.tl:11
record State
Notes
State of the task.
Used in the base game: 3 times in 2 files
base/content/mission/mission/tasks/transport_cargo/empty_stocks.tl:6
mods/release/urbangames_campaign_mission_06/content/mission/mission/mission_story.tl:199
Fields
| Name | Type | Description |
|---|---|---|
targets |
{Engine.Entity} |
Stock-list entities watched. |
result |
{Engine.Entity : boolean} |
Stock-list entity -> has been empty. |
currentSimTimeMs |
integer |
Game time (ms) of the last update. |
initialSimTimeMs |
integer |
Game time (ms) at which the time limit started. |
endSimTimeMs |
integer |
Game time (ms) at which the time limit ends. |
initialTotalStored |
integer |
Total stored amount at the first update. |