mission_types¶
Source: base/tealdef/mission/mission_types.d.tl
Notes
MissionOutline: helpers that build zone polygons and circles for mission tasks.
MissionOutline¶
record global base/tealdef/mission/mission_types.d.tl:3
global record MissionOutline
Load: local mission_outline = ug_require "::/mission/mission_outline.tl"
Notes
Helpers that build zone shapes (polygons around the origin, circles) for mission tasks.
Functions
boundingCircle(positions : {{number, number, number}}, extension : number) : MissionInterface.PosRadius base/tealdef/mission/mission_types.d.tl:4
Call as mission_outline.boundingCircle
Notes
Builds a circle around a set of points, centred on their centroid.
| Parameter | Type | Description |
|---|---|---|
positions |
{{number, number, number}} |
Points {x, y, z}. |
extension |
number |
Extra radius in metres. |
Returns MissionInterface.PosRadius: 2D circle.
Used in the base game: 3 times in 2 files
mods/release/urbangames_campaign_mission_03/content/mission/mission/mission_story.tl:827
mods/release/urbangames_campaign_mission_04/content/mission/mission/mission_story.tl:962
busStationOutline() : PolygonUtil.Polygon base/tealdef/mission/mission_types.d.tl:5
Call as mission_outline.busStationOutline
Notes
Returns the outline of a street bus stop (polygon around the origin, metres).
Returns PolygonUtil.Polygon
streetDepotOutline() : PolygonUtil.Polygon base/tealdef/mission/mission_types.d.tl:6
Call as mission_outline.streetDepotOutline
Notes
Returns the outline of a street depot (polygon around the origin, metres).
Returns PolygonUtil.Polygon
Used in the base game: 3 times in 2 files
mods/release/urbangames_campaign_mission_02/content/mission/mission/mission_story.tl:731
polygon = polygon_util.transform(api.type.Mat4f.rotZTransl(params.streetDepotAngle, api.type.Vec3f.new(params.streetDepotZone.pos[1], params.streetDepotZone.pos
mods/release/urbangames_campaign_mission_01/content/mission/mission/mission_story.tl:766
warehouseOutline() : PolygonUtil.Polygon base/tealdef/mission/mission_types.d.tl:7
Call as mission_outline.warehouseOutline
Notes
Returns the outline of a warehouse (polygon around the origin, metres).
Returns PolygonUtil.Polygon
railStationHeadOutline() : PolygonUtil.Polygon base/tealdef/mission/mission_types.d.tl:8
Call as mission_outline.railStationHeadOutline
Notes
Returns the outline of a rail station head (polygon around the origin, metres).
Returns PolygonUtil.Polygon
railStationOutline() : PolygonUtil.Polygon base/tealdef/mission/mission_types.d.tl:9
Call as mission_outline.railStationOutline
Notes
Returns the outline of a rail station (polygon around the origin, metres).
Returns PolygonUtil.Polygon
railDepotOutline() : PolygonUtil.Polygon base/tealdef/mission/mission_types.d.tl:10
Call as mission_outline.railDepotOutline
Notes
Returns the outline of a rail depot (polygon around the origin, metres).
Returns PolygonUtil.Polygon
cargoStationOutline() : PolygonUtil.Polygon base/tealdef/mission/mission_types.d.tl:11
Call as mission_outline.cargoStationOutline
Notes
Returns the outline of a cargo station (136 x 48 m rectangle around the origin).
Returns PolygonUtil.Polygon
getPosRadiusFromEntityWithBoundingVolume(entity : Engine.Entity, radius : number) : MissionInterface.PosRadius base/tealdef/mission/mission_types.d.tl:12
Call as mission_outline.getPosRadiusFromEntityWithBoundingVolume
Notes
Builds a circle with the given radius at the centre of an entity's bounding volume.
| Parameter | Type | Description |
|---|---|---|
entity |
Engine.Entity |
Entity. |
radius |
number |
Radius in metres. |
Returns MissionInterface.PosRadius: 2D circle; an empty table if the entity does not exist, nil if it has no bounding volume.