mission_task_transfer_ownership¶
Source: base/tealdef/mission/tasks/transfer_ownership/mission_task_transfer_ownership.d.tl
Notes
Task that gives lines and constructions to the player or takes them away.
MissionTaskTransferOwnership¶
record global base/tealdef/mission/tasks/transfer_ownership/mission_task_transfer_ownership.d.tl:3
global record MissionTaskTransferOwnership is MissionInterface.TaskScript<MissionTaskTransferOwnership.State, MissionTaskTransferOwnership.Params>
Load: local transfer_ownership = ug_require "::/mission/tasks/transfer_ownership/transfer_ownership.tl"
Notes
Task (transfer_ownership) that gives lines and constructions to the player or moves them to a newly spawned AI player, then completes.
Example
-- urbangames_campaign_mission_01
taskScript = transfer_ownership as MissionInterface.TaskScript<any, any>,
taskParams = {
removeLineFromPlayer = params.entityList_nonPlayerOwnedLines,
removeEntityFromPlayer = { params.entity_relevantHarbor, params.entity_newOrleansRoadDepot },
assignEntityToPlayer = { params.entity_stationHotel, params.entity_newOrleansPort },
},
followup = { { taskKey = "transfer_ownership_depots" } },
MissionTaskTransferOwnership.Params¶
record base/tealdef/mission/tasks/transfer_ownership/mission_task_transfer_ownership.d.tl:4
record Params
Notes
Params of the task.
Used in the base game: 2 times in 2 files
base/content/mission/mission/tasks/transfer_ownership/transfer_ownership.tl:4
mods/release/urbangames_campaign_mission_01/content/mission/mission/mission_story.tl:1059
Fields
| Name | Type | Description |
|---|---|---|
assignLineToPlayer |
{Engine.Entity} |
Lines given to the player, with their vehicles and stops. |
removeLineFromPlayer |
{Engine.Entity} |
Lines moved to an AI player, with their vehicles and stops. |
assignEntityToPlayer |
{Engine.Entity} |
Entities (and their constructions, stations, station groups) given to the player. |
removeEntityFromPlayer |
{Engine.Entity} |
Entities (and their constructions, stations, station groups) moved to an AI player. |
Functions
getTransferLineAndPlayerOwnership(readOnlyApi : MissionInterface.MissionTaskReadOnlyApi) : {Engine.Entity}, boolean base/tealdef/mission/tasks/transfer_ownership/mission_task_transfer_ownership.d.tl:9
Second return value, if true: assign, else: remove
Returns {Engine.Entity}, boolean
getTransferEntityAndPlayerOwnership(readOnlyApi : MissionInterface.MissionTaskReadOnlyApi) : {Engine.Entity}, boolean base/tealdef/mission/tasks/transfer_ownership/mission_task_transfer_ownership.d.tl:10
Second return value, if true: assign, else: remove
Returns {Engine.Entity}, boolean
MissionTaskTransferOwnership.State¶
record base/tealdef/mission/tasks/transfer_ownership/mission_task_transfer_ownership.d.tl:12
record State
Notes
State of the task.
Used in the base game: 1 time in 1 file
base/content/mission/mission/tasks/transfer_ownership/transfer_ownership.tl:3
Fields
| Name | Type | Description |
|---|---|---|
isComplete |
boolean |
The transfer was done. |