mission_framework_util_entity¶
Source: base/tealdef/mission/mission_framework/mission_framework_util_entity.d.tl
Notes
Commands that change ownership of, build, upgrade or bulldoze entities during a mission.
MissionFrameworkUtilEntity¶
record global base/tealdef/mission/mission_framework/mission_framework_util_entity.d.tl:3
global record MissionFrameworkUtilEntity
Notes
Commands that change ownership of, build, upgrade or bulldoze entities.
Functions
setPlayer(Engine.Entity, Engine.Entity) base/tealdef/mission/mission_framework/mission_framework_util_entity.d.tl:4
Notes
Sets the owner of one entity.
| Parameter | Type | Description |
|---|---|---|
#1 |
Engine.Entity |
Entity. |
#2 |
Engine.Entity |
Player entity (-1 for none). |
setPlayerForBaseEdge(Engine.Entity, Engine.Entity) base/tealdef/mission/mission_framework/mission_framework_util_entity.d.tl:5
Notes
Sets the owner of a street/track edge and of its edge objects.
| Parameter | Type | Description |
|---|---|---|
#1 |
Engine.Entity |
Edge entity. |
#2 |
Engine.Entity |
Player entity. |
setPlayerForConstruction(Engine.Entity, Engine.Entity) base/tealdef/mission/mission_framework/mission_framework_util_entity.d.tl:6
Notes
Sets the owner of a construction and of its frozen edges, depots (with their vehicles), stations, station groups and industries.
| Parameter | Type | Description |
|---|---|---|
#1 |
Engine.Entity |
Construction entity. |
#2 |
Engine.Entity |
Player entity. |
setPlayerForAnyEntity(Engine.Entity, Engine.Entity) base/tealdef/mission/mission_framework/mission_framework_util_entity.d.tl:7
Notes
Sets the owner of a construction, a subconstruction (via its construction) or an asset group.
| Parameter | Type | Description |
|---|---|---|
#1 |
Engine.Entity |
Entity. |
#2 |
Engine.Entity |
Player entity. |
upgradeConstruction(Engine.Entity, table, string, string) base/tealdef/mission/mission_framework/mission_framework_util_entity.d.tl:8
Notes
Replaces a construction with a new one at the same place (unowned), keeping file, params or name where not given.
| Parameter | Type | Description |
|---|---|---|
#1 |
Engine.Entity |
Construction entity to replace. |
#2 |
table |
New construction params (nil keeps the old ones). |
#3 |
string |
New construction file (nil keeps the old one). |
#4 |
string |
New name (nil keeps the old one). |
buildConstruction(table, string, Mat4f, string, function(Engine.Entity)) base/tealdef/mission/mission_framework/mission_framework_util_entity.d.tl:9
Notes
Builds an unowned construction.
| Parameter | Type | Description |
|---|---|---|
#1 |
table |
Construction params (a seed is derived from the position if missing). |
#2 |
string |
Construction file. |
#3 |
Mat4f |
Transformation. |
#4 |
string |
Name. |
#5 |
function(Engine.Entity) |
Called with the new construction entity, or nil on failure. |
bulldoze(Engine.Entity) base/tealdef/mission/mission_framework/mission_framework_util_entity.d.tl:10
Notes
Removes a construction.
| Parameter | Type | Description |
|---|---|---|
#1 |
Engine.Entity |
Construction entity. |