3076 lines
92 KiB
Markdown
3076 lines
92 KiB
Markdown
<!-- Source: https://wiki.transportfever3.com/script-doc/api/engine/system.html (fetched 2026-10-04) -->
|
|
|
|
[index](../../index.html) / [api](../../api.html) / [engine](../engine.html) / system
|
|
|
|
---
|
|
|
|
# Module api.engine.system[🔗](#api.engine.system)
|
|
|
|
Contains definitions for of api.engine.system
|
|
|
|
```
|
|
global record System animalMoveSystem: AnimalMoveSystem
|
|
aircraftMoveSystem: AircraftMoveSystem
|
|
baseParallelStripSystem: BaseParallelStripSystem
|
|
carriageListSystem: CarriageListSystem
|
|
catchmentAreaSystem: CatchmentAreaSystem
|
|
emissionGridSystem: EmissionGridSystem
|
|
gameScriptSystem: GameScriptSystem
|
|
landVehicleMoveSystem: LandVehicleMoveSystem
|
|
landmarkSystem: LandmarkSystem
|
|
lineSystem: LineSystem
|
|
octreeSystem: OctreeSystem
|
|
parcelSystem: ParcelSystem
|
|
railRoadCrossingSystem: RailRoadCrossingSystem
|
|
riverSystem: RiverSystem
|
|
runwaySystem: RunwaySystem
|
|
shipMoveSystem: ShipMoveSystem
|
|
signalSystem: SignalSystem
|
|
simCargoSystem: SimCargoSystem
|
|
simPersonSystem: SimPersonSystem
|
|
simPersonAtBuildingSystem: SimPersonAtBuildingSystem
|
|
simPersonAtTerminalSystem: SimPersonAtTerminalSystem
|
|
simPersonAtVehicleSystem: SimPersonAtVehicleSystem
|
|
simEntityAtStockSystem: SimEntityAtStockSystem
|
|
simEntityAtTerminalSystem: SimEntityAtTerminalSystem
|
|
simEntityAtVehicleSystem: SimEntityAtVehicleSystem
|
|
stationSystem: StationSystem
|
|
stationGroupSystem: StationGroupSystem
|
|
stockListSystem: StockListSystem
|
|
streetSystem: StreetSystem
|
|
streetConnectorSystem: StreetConnectorSystem
|
|
townBuildingSystem: TownBuildingSystem
|
|
tpNetLinkSystem: TpNetLinkSystem
|
|
transportNetworkSystem: TransportNetworkSystem
|
|
transportVehicleSystem: TransportVehicleSystem
|
|
vehicleDepotSystem: VehicleDepotSystem
|
|
gridCollision: GridCollision
|
|
end
|
|
global record AircraftMoveSystem getAirCraftInfo: function(vehicleEntity : Engine.Entity): AircraftInfo
|
|
isReserved: function(edgeId : EdgeId): boolean
|
|
forEach: function(Engine.Entity)
|
|
end
|
|
global record AnimalMoveSystem forEach: function(Engine.Entity)
|
|
end
|
|
global record BaseParallelStripSystem getStrips: function(edgeEntity : Engine.Entity): {Engine.Entity}
|
|
end
|
|
|
|
[Expand All] [Collapse All]
|
|
|
|
global record CarriageListSystem record CarriageInfo owningVehicle: Engine.Entity
|
|
index: integer
|
|
offset: number
|
|
reversed: boolean
|
|
crew: boolean
|
|
end
|
|
getVehicleInfo: function(vehicleEntity : Engine.Entity): CarriageInfo
|
|
getVehicleData: function(vehicleEntity : Engine.Entity): VehicleData
|
|
forEach: function(Engine.Entity)
|
|
end
|
|
global record CatchmentAreaSystem getEdge2stationsMap: function(): {EdgeId : {{Engine.Entity, integer}}}
|
|
getStation2edgesMap: function(): {Engine.Entity : {{EdgeId, integer}}}
|
|
getStation2stationsAndDistancesMap: function(): {Engine.Entity : {Engine.Entity : integer}}
|
|
getStationCatchables: function(stationEntity : Engine.Entity, cargo : boolean): {Engine.Entity}
|
|
end
|
|
global record EmissionGridSystem getInterpolatedEmission: function(pos : Vec2f, useAverage : boolean, type : Engine.Component.EmissionGrid.Type): number
|
|
getEmissionGridEntity: function(noise : boolean): Engine.Entity
|
|
end
|
|
global record GameScriptSystem getEntityForGameScript: function(name : string): Engine.Entity
|
|
end
|
|
global record GridCollision getGridCollisionSystem: function(index : integer): GridCollisionSystem
|
|
getPlayerInfrastructureCollisionSystem: function(): GridCollisionSystem
|
|
end
|
|
global record GridCollisionSystem getCollisionDataAt: function(GridCollisionSystem, Vec2f): number
|
|
end
|
|
global interface ISystem forEach: function(Engine.Entity)
|
|
end
|
|
global record LandVehicleMoveSystem getBlockedTrains: function(): {{Engine.Entity, Engine.Entity}}
|
|
getVehicleInfo: function(vehicleEntity : Engine.Entity): LandVehicleMoveInfo
|
|
isTrainWaitingForFreePath: function(trainEntity : Engine.Entity): boolean
|
|
forEach: function(Engine.Entity)
|
|
end
|
|
global record LandmarkSystem getLandmarkData: function(landmarkEntity : Engine.Entity): {EdgeId : number}
|
|
end
|
|
global record LineSystem getLines: function(): {Engine.Entity}
|
|
getLinesForPlayer: function(playerEntity : Engine.Entity): {Engine.Entity}
|
|
getLinesForWaypoint: function(waypointEntity : Engine.Entity): {Engine.Entity}
|
|
getLinesForWaypointLane: function(waypointEntity : Engine.Entity, signalIndex : integer): {{Engine.Entity, integer, integer}}
|
|
getLineStops: function(stationGroupEntity : Engine.Entity): {{Engine.Entity, integer}}
|
|
getLineStopsForStation: function(stationEntity : Engine.Entity): {{Engine.Entity, integer}}
|
|
getLineStopsForTerminal: function(stationEntity : Engine.Entity, terminal : integer): {{Engine.Entity, integer}}
|
|
getLinesForStationGroup: function(stationGroup : Engine.Entity): {Engine.Entity}
|
|
getProblemLines: function(playerEntity : Engine.Entity): {{Engine.Entity, LineProblem}}
|
|
getStationGroup2LineStopsMap: function(): {Engine.Entity : {{Engine.Entity, integer}}}
|
|
getTerminal2lineStops: function(): {{Engine.Entity, integer} : {{Engine.Entity, integer}}}
|
|
getBestLineAssignment: function(lineEntity : Engine.Entity, lineData : Engine.Component.Line, allowTerminalChanges : boolean): {StationTerminal}
|
|
end
|
|
global record OctreeSystem findIntersectingEntities: function(box : Box3f, callback : function(Engine.Entity, Engine.Component.BoundingVolume))
|
|
end
|
|
global record ParcelSystem getParcelData: function(segmentEntity : Engine.Entity): any
|
|
getSegment2ParcelData: function(): {Engine.Entity : <any type>}
|
|
end
|
|
global record RailRoadCrossingSystem getRailroadCrossingForEdge: function(edgeEntity : Engine.Entity): Engine.Entity
|
|
getRailroadCrossingForNode: function(nodeEntity : Engine.Entity): Engine.Entity
|
|
end
|
|
global record RiverSystem getWaterMeshEntities: function(Vec2i, Vec2i): {Engine.Entity}
|
|
end
|
|
global record RunwaySystem getLandingNodeIdMap: function(): {NodeId : Engine.Entity}
|
|
getTakeoffNodeIdMap: function(): {NodeId : Engine.Entity}
|
|
end
|
|
global record ShipMoveSystem getShipInfo: function(vehicleEntity : Engine.Entity): ShipInfo
|
|
forEach: function(Engine.Entity)
|
|
end
|
|
global record SignalSystem getSignal: function(edgeId : EdgeId, reversed : boolean): SignalId
|
|
end
|
|
global record SimCargoSystemend
|
|
global record SimEntityAtStockSystem getStock2SimEntityMap: function(): {{Engine.Entity, StockId} : {Engine.Entity}}
|
|
getStockCount: function(stockEntity : Engine.Entity, stockId : StockId): integer
|
|
getStockCountForCargoType: function(stockEntity : Engine.Entity, stockId : StockId, cargoTypeId : CargoTypeId): integer
|
|
getStockEntities: function(stockEntity : Engine.Entity, stockId : StockId): {{integer, Engine.Entity}}
|
|
getStockSimEntity: function(stockEntity : Engine.Entity, stockId : StockId): Engine.Entity
|
|
end
|
|
global record SimEntityAtTerminalSystem getLineStopSimEntitiesCount: function(entity : Engine.Entity, stopIndex : integer, cargoType : CargoTypeId): integer
|
|
getLineStopSimEntities: function(entity : Engine.Entity, stopIndex : integer, cargoType : CargoTypeId): {Engine.Entity}
|
|
end
|
|
global record SimEntityAtVehicleSystem getVehicle2Cargo2SimEntitesMap: function(): {Engine.Entity : {CargoTypeId : {Engine.Entity}}}
|
|
getVehicleSimEntitiesCount: function(vehicleEntity : Engine.Entity): integer
|
|
getVehicleSimEntitiesCountForCargoType: function(vehicleEntity : Engine.Entity, cargoType : CargoTypeId): integer
|
|
getVehiclesWithRoundTripCount: function(): {Engine.Entity : integer}
|
|
end
|
|
global record SimPersonAtBuildingSystem getSimPersonAtBuilding: function(simBuildingEntity : Engine.Entity): {Engine.Entity}
|
|
end
|
|
global record SimPersonAtTerminalSystem getEdgeInfoMap: function(): {EdgeId : <any type>}
|
|
getNumFreePlaces: function(edgeId : EdgeId): integer
|
|
getPos01: function(edgeId : EdgeId, place : integer): {number, number}
|
|
end
|
|
global record SimPersonAtVehicleSystem getVehiclePartInfoList: function(vehicleEntity : Engine.Entity): {VehiclePartInfo}
|
|
end
|
|
global record SimPersonSystem getCount: function(): integer
|
|
getDestination2SpMap: function(): {Engine.Entity : {Engine.Entity}}
|
|
getSimPersonsAtTerminalForTransportNetwork: function(tnEntity : Engine.Entity): {Engine.Entity}
|
|
getSimPersonsForDestination: function(destination : Engine.Entity): {Engine.Entity}
|
|
getSimPersonsForLine: function(lineEntity : Engine.Entity): {Engine.Entity}
|
|
getSimPersonsForTarget: function(targetEntity : Engine.Entity): {Engine.Entity}
|
|
getSimPersonsIdleForTransportNetwork: function(tnEntity : Engine.Entity): {Engine.Entity}
|
|
getSimPersonsMovingForTransportNetwork: function(tnEntity : Engine.Entity): {Engine.Entity}
|
|
end
|
|
global record StationGroupSystem getExpiredStationGroups: function(time : integer): {Engine.Entity}
|
|
getExpiryProgress: function(stationGroupEntity : Engine.Entity, time : integer): number
|
|
getStationGroup: function(stationEntity : Engine.Entity): Engine.Entity
|
|
getCarriers: function(stationGroup : Engine.Entity, station : integer, terminal : integer): {{Carrier}, {TransportMode}}
|
|
end
|
|
global record StationSystem getPersonNodeId2StationTerminalsMap: function(): {NodeId : {{Engine.Entity, integer}}}
|
|
getStation2TownMap: function(): {Engine.Entity : Engine.Entity}
|
|
getStations: function(townEntity : Engine.Entity): {Engine.Entity}
|
|
getStationTerminalForVehicleNode: function(nodeId : NodeId): {Engine.Entity, integer}
|
|
getStationTerminalsForPersonEdge: function(nodeId : EdgeId): {{Engine.Entity, integer}}
|
|
getStationTerminalsForPersonNode: function(nodeId : NodeId): {{Engine.Entity, integer}}
|
|
getTown2StationsMap: function(): {Engine.Entity : {Engine.Entity}}
|
|
getTown: function(stationEntity : Engine.Entity): Engine.Entity
|
|
getVehicleNodeId2StationTerminalsMap: function(): {NodeId : {{Engine.Entity, integer}}}
|
|
forEach: function(Engine.Entity)
|
|
end
|
|
global record StockListSystemend
|
|
global record StreetConnectorSystem getConstructionEntityForDepot: function(depotEntity : Engine.Entity): Engine.Entity
|
|
getConstructionEntityForEdge: function(edgeEntity : Engine.Entity): Engine.Entity
|
|
getConstructionEntityForIndustry: function(industryEntity : Engine.Entity): Engine.Entity
|
|
getConstructionEntityForNode: function(nodeEntity : Engine.Entity): Engine.Entity
|
|
getConstructionEntityForSubconstruction: function(subconstruction : Engine.Entity): Engine.Entity
|
|
getConstructionEntityForStation: function(stationEntity : Engine.Entity): Engine.Entity
|
|
getConstructionEntityForTownBuilding: function(townBuilding : Engine.Entity): Engine.Entity
|
|
getNode2StreetConnectorMap: function(): {Engine.Entity : Engine.Entity}
|
|
getStation2ConstructionMap: function(): {Engine.Entity : Engine.Entity}
|
|
forEachConstructionWithMetadata: function(metadataKey : string, constructionDescMeta : boolean, constructionInstanceMeta : boolean, fn : function(Engine.Entity, Engine.Component.Construction, ConstructionId), playerOwnedOnly : boolean)
|
|
getConstructionIdIfStaticMetadata: function(constructionEntity : Engine.Entity, metadataKey : string): {ConstructionId, ResName}
|
|
getConstructionClosestTown: function(constructionEntity : Engine.Entity): Engine.Entity
|
|
getTownClosestConstructions: function(townEntity : Engine.Entity): {Engine.Entity}
|
|
forEach: function(Engine.Entity)
|
|
end
|
|
global record StreetSystem getEdgeForEdgeObject: function(edgeEntity : Engine.Entity): Engine.Entity
|
|
getEdgeObject2EdgeMap: function(): {Engine.Entity : Engine.Entity}
|
|
getNode2SegmentMap: function(): {Engine.Entity : {Engine.Entity}}
|
|
getNode2StreetEdgeMap: function(): {Engine.Entity : {Engine.Entity}}
|
|
getNode2TrackEdgeMap: function(): {Engine.Entity : {Engine.Entity}}
|
|
isTownCrossingNode: function(Engine.Entity): boolean
|
|
getNodeSegments: function(nodeEntity : Engine.Entity): {Engine.Entity}
|
|
getNodeStreetSegments: function(nodeEntity : Engine.Entity): {Engine.Entity}
|
|
getNodeTrackSegments: function(nodeEntity : Engine.Entity): {Engine.Entity}
|
|
end
|
|
global record TownBuildingSystem getBuilding: function(parcelEntity : Engine.Entity): Engine.Entity
|
|
getCargoSupplyAndLimit: function(townEntity : Engine.Entity, LandUseType): {CargoTypeId : {number, number, integer}}
|
|
getLandUsePersonCapacities: function(townEntity : Engine.Entity): {integer}
|
|
getParcel2BuildingMap: function(): {Engine.Entity : Engine.Entity}
|
|
getPersonCapacity2townBuildingMap: function(): {Engine.Entity : Engine.Entity}
|
|
getTown2BuildingMap: function(): {Engine.Entity : {Engine.Entity}}
|
|
getTown2personCapacitiesMap: function(): {Engine.Entity : {integer}}
|
|
hasBuilding: function(parcelEntity : Engine.Entity): boolean
|
|
end
|
|
global record TpNetLinkSystem getEdgeId2linkEntities: function(): {EdgeId : {Engine.Entity}}
|
|
getLinkEntities: function(edgeId : EdgeId): {Engine.Entity}
|
|
end
|
|
global record TransportNetworkSystem getIntersections: function(tnEntity : Engine.Entity): {<any type>}
|
|
getTpNetData: function(): TpNetData
|
|
end
|
|
global record TransportVehicleSystem getDepotVehicles: function(depotEntity : Engine.Entity): {Engine.Entity}
|
|
getGoingToDepotVehicles: function(depotEntity : Engine.Entity): {Engine.Entity}
|
|
getInfo: function(transportVehicleEntity : Engine.Entity): any
|
|
getLine2VehicleMap: function(): {Engine.Entity : {Engine.Entity}}
|
|
getLineStopVehicles: function(lineEntity : Engine.Entity, stopIndex : number): {Engine.Entity}
|
|
checkLineStopForVehicleOverlength: function(lineEntity : Engine.Entity, stopIndex : number): {StationTerminal : boolean}
|
|
getLineVehicles: function(lineEntity : Engine.Entity): {Engine.Entity}
|
|
getNoPathVehicles: function(): {Engine.Entity}
|
|
getVehicleNames: function(carrier : Carrier): {string}
|
|
getVehicles: function(tnEntities : {Engine.Entity}, wholePath : boolean): {Engine.Entity}
|
|
getVehiclesWithState: function(state : TransportVehicleState): {Engine.Entity}
|
|
getVehiclesForMaintenanceStation: function(maintenanceStation : Engine.Entity): {Engine.Entity}
|
|
isVehicleMaintainedByStation: function(vehicle : Engine.Entity, maintenanceStation : Engine.Entity): boolean
|
|
getLineCargoInfo: function(lineEntity : Engine.Entity, cargoTypeId : CargoTypeId): LineCargoInfo
|
|
end
|
|
global record VehicleDepotSystem getDepotForInNodeId: function(nodeId : NodeId): Engine.Entity
|
|
forEach: function(Engine.Entity)
|
|
end
|
|
```
|
|
|
|
## Category: main[🔗](#category-main)
|
|
|
|
### System[🔗](#$api.engine.system~System)
|
|
|
|
```
|
|
global record System animalMoveSystem: AnimalMoveSystem
|
|
aircraftMoveSystem: AircraftMoveSystem
|
|
baseParallelStripSystem: BaseParallelStripSystem
|
|
carriageListSystem: CarriageListSystem
|
|
catchmentAreaSystem: CatchmentAreaSystem
|
|
emissionGridSystem: EmissionGridSystem
|
|
gameScriptSystem: GameScriptSystem
|
|
landVehicleMoveSystem: LandVehicleMoveSystem
|
|
landmarkSystem: LandmarkSystem
|
|
lineSystem: LineSystem
|
|
octreeSystem: OctreeSystem
|
|
parcelSystem: ParcelSystem
|
|
railRoadCrossingSystem: RailRoadCrossingSystem
|
|
riverSystem: RiverSystem
|
|
runwaySystem: RunwaySystem
|
|
shipMoveSystem: ShipMoveSystem
|
|
signalSystem: SignalSystem
|
|
simCargoSystem: SimCargoSystem
|
|
simPersonSystem: SimPersonSystem
|
|
simPersonAtBuildingSystem: SimPersonAtBuildingSystem
|
|
simPersonAtTerminalSystem: SimPersonAtTerminalSystem
|
|
simPersonAtVehicleSystem: SimPersonAtVehicleSystem
|
|
simEntityAtStockSystem: SimEntityAtStockSystem
|
|
simEntityAtTerminalSystem: SimEntityAtTerminalSystem
|
|
simEntityAtVehicleSystem: SimEntityAtVehicleSystem
|
|
stationSystem: StationSystem
|
|
stationGroupSystem: StationGroupSystem
|
|
stockListSystem: StockListSystem
|
|
streetSystem: StreetSystem
|
|
streetConnectorSystem: StreetConnectorSystem
|
|
townBuildingSystem: TownBuildingSystem
|
|
tpNetLinkSystem: TpNetLinkSystem
|
|
transportNetworkSystem: TransportNetworkSystem
|
|
transportVehicleSystem: TransportVehicleSystem
|
|
vehicleDepotSystem: VehicleDepotSystem
|
|
gridCollision: GridCollision
|
|
end
|
|
```
|
|
|
|
A system is a simulation object that controls entities with specific components or caches additional computed data
|
|
for entities after listening for component changes
|
|
|
|
### System.animalMoveSystem[🔗](#$api.engine.system~System.animalMoveSystem)
|
|
|
|
```
|
|
System.animalMoveSystem: AnimalMoveSystem
|
|
```
|
|
|
|
Controls animal simulation and movement
|
|
|
|
### System.aircraftMoveSystem[🔗](#$api.engine.system~System.aircraftMoveSystem)
|
|
|
|
```
|
|
System.aircraftMoveSystem: AircraftMoveSystem
|
|
```
|
|
|
|
Controls aircraft (helicopters and airplanes) simulation (reservation, pathing, ...) and movement
|
|
|
|
### System.baseParallelStripSystem[🔗](#$api.engine.system~System.baseParallelStripSystem)
|
|
|
|
```
|
|
System.baseParallelStripSystem: BaseParallelStripSystem
|
|
```
|
|
|
|
A cache of data that is computed from parallel strip data
|
|
|
|
### System.carriageListSystem[🔗](#$api.engine.system~System.carriageListSystem)
|
|
|
|
```
|
|
System.carriageListSystem: CarriageListSystem
|
|
```
|
|
|
|
A cache of data for carriage lists
|
|
|
|
### System.catchmentAreaSystem[🔗](#$api.engine.system~System.catchmentAreaSystem)
|
|
|
|
```
|
|
System.catchmentAreaSystem: CatchmentAreaSystem
|
|
```
|
|
|
|
### System.emissionGridSystem[🔗](#$api.engine.system~System.emissionGridSystem)
|
|
|
|
```
|
|
System.emissionGridSystem: EmissionGridSystem
|
|
```
|
|
|
|
### System.gameScriptSystem[🔗](#$api.engine.system~System.gameScriptSystem)
|
|
|
|
```
|
|
System.gameScriptSystem: GameScriptSystem
|
|
```
|
|
|
|
### System.landVehicleMoveSystem[🔗](#$api.engine.system~System.landVehicleMoveSystem)
|
|
|
|
```
|
|
System.landVehicleMoveSystem: LandVehicleMoveSystem
|
|
```
|
|
|
|
### System.landmarkSystem[🔗](#$api.engine.system~System.landmarkSystem)
|
|
|
|
```
|
|
System.landmarkSystem: LandmarkSystem
|
|
```
|
|
|
|
### System.lineSystem[🔗](#$api.engine.system~System.lineSystem)
|
|
|
|
```
|
|
System.lineSystem: LineSystem
|
|
```
|
|
|
|
Manages all line data
|
|
|
|
### System.octreeSystem[🔗](#$api.engine.system~System.octreeSystem)
|
|
|
|
```
|
|
System.octreeSystem: OctreeSystem
|
|
```
|
|
|
|
Efficient way to collect entities in a specific region of space
|
|
|
|
### System.parcelSystem[🔗](#$api.engine.system~System.parcelSystem)
|
|
|
|
```
|
|
System.parcelSystem: ParcelSystem
|
|
```
|
|
|
|
Manages parcels for towns, and provides inverse relation from segment to parcels
|
|
|
|
### System.railRoadCrossingSystem[🔗](#$api.engine.system~System.railRoadCrossingSystem)
|
|
|
|
```
|
|
System.railRoadCrossingSystem: RailRoadCrossingSystem
|
|
```
|
|
|
|
### System.riverSystem[🔗](#$api.engine.system~System.riverSystem)
|
|
|
|
```
|
|
System.riverSystem: RiverSystem
|
|
```
|
|
|
|
Create a vector field of waterfronts for street and construction alignment
|
|
|
|
### System.runwaySystem[🔗](#$api.engine.system~System.runwaySystem)
|
|
|
|
```
|
|
System.runwaySystem: RunwaySystem
|
|
```
|
|
|
|
### System.shipMoveSystem[🔗](#$api.engine.system~System.shipMoveSystem)
|
|
|
|
```
|
|
System.shipMoveSystem: ShipMoveSystem
|
|
```
|
|
|
|
### System.signalSystem[🔗](#$api.engine.system~System.signalSystem)
|
|
|
|
```
|
|
System.signalSystem: SignalSystem
|
|
```
|
|
|
|
### System.simCargoSystem[🔗](#$api.engine.system~System.simCargoSystem)
|
|
|
|
```
|
|
System.simCargoSystem: SimCargoSystem
|
|
```
|
|
|
|
### System.simPersonSystem[🔗](#$api.engine.system~System.simPersonSystem)
|
|
|
|
```
|
|
System.simPersonSystem: SimPersonSystem
|
|
```
|
|
|
|
### System.simPersonAtBuildingSystem[🔗](#$api.engine.system~System.simPersonAtBuildingSystem)
|
|
|
|
```
|
|
System.simPersonAtBuildingSystem: SimPersonAtBuildingSystem
|
|
```
|
|
|
|
### System.simPersonAtTerminalSystem[🔗](#$api.engine.system~System.simPersonAtTerminalSystem)
|
|
|
|
```
|
|
System.simPersonAtTerminalSystem: SimPersonAtTerminalSystem
|
|
```
|
|
|
|
### System.simPersonAtVehicleSystem[🔗](#$api.engine.system~System.simPersonAtVehicleSystem)
|
|
|
|
```
|
|
System.simPersonAtVehicleSystem: SimPersonAtVehicleSystem
|
|
```
|
|
|
|
### System.simEntityAtStockSystem[🔗](#$api.engine.system~System.simEntityAtStockSystem)
|
|
|
|
```
|
|
System.simEntityAtStockSystem: SimEntityAtStockSystem
|
|
```
|
|
|
|
### System.simEntityAtTerminalSystem[🔗](#$api.engine.system~System.simEntityAtTerminalSystem)
|
|
|
|
```
|
|
System.simEntityAtTerminalSystem: SimEntityAtTerminalSystem
|
|
```
|
|
|
|
### System.simEntityAtVehicleSystem[🔗](#$api.engine.system~System.simEntityAtVehicleSystem)
|
|
|
|
```
|
|
System.simEntityAtVehicleSystem: SimEntityAtVehicleSystem
|
|
```
|
|
|
|
### System.stationSystem[🔗](#$api.engine.system~System.stationSystem)
|
|
|
|
```
|
|
System.stationSystem: StationSystem
|
|
```
|
|
|
|
### System.stationGroupSystem[🔗](#$api.engine.system~System.stationGroupSystem)
|
|
|
|
```
|
|
System.stationGroupSystem: StationGroupSystem
|
|
```
|
|
|
|
### System.stockListSystem[🔗](#$api.engine.system~System.stockListSystem)
|
|
|
|
```
|
|
System.stockListSystem: StockListSystem
|
|
```
|
|
|
|
### System.streetSystem[🔗](#$api.engine.system~System.streetSystem)
|
|
|
|
```
|
|
System.streetSystem: StreetSystem
|
|
```
|
|
|
|
### System.streetConnectorSystem[🔗](#$api.engine.system~System.streetConnectorSystem)
|
|
|
|
```
|
|
System.streetConnectorSystem: StreetConnectorSystem
|
|
```
|
|
|
|
Caches relations between constructions and base edges
|
|
|
|
### System.townBuildingSystem[🔗](#$api.engine.system~System.townBuildingSystem)
|
|
|
|
```
|
|
System.townBuildingSystem: TownBuildingSystem
|
|
```
|
|
|
|
### System.tpNetLinkSystem[🔗](#$api.engine.system~System.tpNetLinkSystem)
|
|
|
|
```
|
|
System.tpNetLinkSystem: TpNetLinkSystem
|
|
```
|
|
|
|
### System.transportNetworkSystem[🔗](#$api.engine.system~System.transportNetworkSystem)
|
|
|
|
```
|
|
System.transportNetworkSystem: TransportNetworkSystem
|
|
```
|
|
|
|
### System.transportVehicleSystem[🔗](#$api.engine.system~System.transportVehicleSystem)
|
|
|
|
```
|
|
System.transportVehicleSystem: TransportVehicleSystem
|
|
```
|
|
|
|
Manages cargo loading and unloading, as well as arrival of any transport vehicle
|
|
|
|
### System.vehicleDepotSystem[🔗](#$api.engine.system~System.vehicleDepotSystem)
|
|
|
|
```
|
|
System.vehicleDepotSystem: VehicleDepotSystem
|
|
```
|
|
|
|
Manages door animation of depots
|
|
|
|
### System.gridCollision[🔗](#$api.engine.system~System.gridCollision)
|
|
|
|
```
|
|
System.gridCollision: GridCollision
|
|
```
|
|
|
|
A generic system representing a 2d grid in the world of miscelaneous data
|
|
|
|
## Category: globals[🔗](#category-globals)
|
|
|
|
### AircraftMoveSystem[🔗](#$api.engine.system~AircraftMoveSystem)
|
|
|
|
```
|
|
global record AircraftMoveSystem getAirCraftInfo: function(vehicleEntity : Engine.Entity): AircraftInfo
|
|
isReserved: function(edgeId : EdgeId): boolean
|
|
forEach: function(Engine.Entity)
|
|
end
|
|
```
|
|
|
|
Aircraft Move System.
|
|
System managing the movement of airplanes.
|
|
|
|
### AircraftMoveSystem.getAirCraftInfo[🔗](#$api.engine.system~AircraftMoveSystem.getAirCraftInfo)
|
|
|
|
```
|
|
function AircraftMoveSystem.getAirCraftInfo(vehicleEntity : Engine.Entity): AircraftInfo
|
|
```
|
|
|
|
Obtains Aircraft information for the given entity.
|
|
|
|
**Parameters**
|
|
|
|
* `vehicleEntity` :`Engine.Entity` — the entity id of the aircraft that should be inspected
|
|
|
|
**Returns**
|
|
|
|
1. `AircraftInfo`
|
|
|
|
### AircraftMoveSystem.isReserved[🔗](#$api.engine.system~AircraftMoveSystem.isReserved)
|
|
|
|
```
|
|
function AircraftMoveSystem.isReserved(edgeId : EdgeId): boolean
|
|
```
|
|
|
|
Checks if a given edge is reserved by an aircraft.
|
|
|
|
**Parameters**
|
|
|
|
* `edgeId` :`EdgeId` — the edgeId that should be inspected
|
|
|
|
**Returns**
|
|
|
|
1. `boolean` — true if reserved
|
|
|
|
### AircraftMoveSystem.forEach[🔗](#$api.engine.system~AircraftMoveSystem.forEach)
|
|
|
|
```
|
|
function AircraftMoveSystem.forEach(Engine.Entity)
|
|
```
|
|
|
|
Loops over all aircraft.
|
|
|
|
**Parameters**
|
|
|
|
* `Engine.Entity`
|
|
|
|
### AnimalMoveSystem[🔗](#$api.engine.system~AnimalMoveSystem)
|
|
|
|
```
|
|
global record AnimalMoveSystem forEach: function(Engine.Entity)
|
|
end
|
|
```
|
|
|
|
Animal Move System.
|
|
Manages animals.
|
|
|
|
### AnimalMoveSystem.forEach[🔗](#$api.engine.system~AnimalMoveSystem.forEach)
|
|
|
|
```
|
|
function AnimalMoveSystem.forEach(Engine.Entity)
|
|
```
|
|
|
|
Loops over all animals.
|
|
|
|
**Parameters**
|
|
|
|
* `Engine.Entity`
|
|
|
|
### BaseParallelStripSystem[🔗](#$api.engine.system~BaseParallelStripSystem)
|
|
|
|
```
|
|
global record BaseParallelStripSystem getStrips: function(edgeEntity : Engine.Entity): {Engine.Entity}
|
|
end
|
|
```
|
|
|
|
Base Parallel Strip System.
|
|
Contain information about parallel edge ranges.
|
|
|
|
### BaseParallelStripSystem.getStrips[🔗](#$api.engine.system~BaseParallelStripSystem.getStrips)
|
|
|
|
```
|
|
function BaseParallelStripSystem.getStrips(edgeEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Obtains all parallel strips of a base edge entity (there might be more than one parallel strip for each base edge).
|
|
|
|
**Parameters**
|
|
|
|
* `edgeEntity` :`Engine.Entity` — the entity of the edge that should be inspected
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### CarriageListSystem[🔗](#$api.engine.system~CarriageListSystem)
|
|
|
|
```
|
|
[Expand All] [Collapse All]
|
|
|
|
global record CarriageListSystem record CarriageInfo owningVehicle: Engine.Entity
|
|
index: integer
|
|
offset: number
|
|
reversed: boolean
|
|
crew: boolean
|
|
end
|
|
getVehicleInfo: function(vehicleEntity : Engine.Entity): CarriageInfo
|
|
getVehicleData: function(vehicleEntity : Engine.Entity): VehicleData
|
|
forEach: function(Engine.Entity)
|
|
end
|
|
```
|
|
|
|
Carriage list System.
|
|
Manages vehicles that are groups of multiple carriages.
|
|
|
|
### CarriageListSystem.CarriageInfo[🔗](#$api.engine.system~CarriageListSystem.CarriageInfo)
|
|
|
|
```
|
|
record CarriageListSystem.CarriageInfo owningVehicle: Engine.Entity
|
|
index: integer
|
|
offset: number
|
|
reversed: boolean
|
|
crew: boolean
|
|
end
|
|
```
|
|
|
|
### CarriageListSystem.CarriageInfo.owningVehicle[🔗](#$api.engine.system~CarriageListSystem.CarriageInfo.owningVehicle)
|
|
|
|
```
|
|
CarriageListSystem.CarriageInfo.owningVehicle: Engine.Entity
|
|
```
|
|
|
|
### CarriageListSystem.CarriageInfo.index[🔗](#$api.engine.system~CarriageListSystem.CarriageInfo.index)
|
|
|
|
```
|
|
CarriageListSystem.CarriageInfo.index: integer
|
|
```
|
|
|
|
### CarriageListSystem.CarriageInfo.offset[🔗](#$api.engine.system~CarriageListSystem.CarriageInfo.offset)
|
|
|
|
```
|
|
CarriageListSystem.CarriageInfo.offset: number
|
|
```
|
|
|
|
### CarriageListSystem.CarriageInfo.reversed[🔗](#$api.engine.system~CarriageListSystem.CarriageInfo.reversed)
|
|
|
|
```
|
|
CarriageListSystem.CarriageInfo.reversed: boolean
|
|
```
|
|
|
|
### CarriageListSystem.CarriageInfo.crew[🔗](#$api.engine.system~CarriageListSystem.CarriageInfo.crew)
|
|
|
|
```
|
|
CarriageListSystem.CarriageInfo.crew: boolean
|
|
```
|
|
|
|
### CarriageListSystem.getVehicleInfo[🔗](#$api.engine.system~CarriageListSystem.getVehicleInfo)
|
|
|
|
```
|
|
function CarriageListSystem.getVehicleInfo(vehicleEntity : Engine.Entity): CarriageInfo
|
|
```
|
|
|
|
Gets more information about a train carriage/engine.
|
|
|
|
**Parameters**
|
|
|
|
* `vehicleEntity` :`Engine.Entity` — the entity of the vehicle.
|
|
|
|
**Returns**
|
|
|
|
1. `CarriageInfo`
|
|
|
|
### CarriageListSystem.getVehicleData[🔗](#$api.engine.system~CarriageListSystem.getVehicleData)
|
|
|
|
```
|
|
function CarriageListSystem.getVehicleData(vehicleEntity : Engine.Entity): VehicleData
|
|
```
|
|
|
|
Gets more information about a train carriage/engine.
|
|
|
|
**Parameters**
|
|
|
|
* `vehicleEntity` :`Engine.Entity` — the entity of the vehicle.
|
|
|
|
**Returns**
|
|
|
|
1. `VehicleData`
|
|
|
|
### CarriageListSystem.forEach[🔗](#$api.engine.system~CarriageListSystem.forEach)
|
|
|
|
```
|
|
function CarriageListSystem.forEach(Engine.Entity)
|
|
```
|
|
|
|
Loops over all carriage lists.
|
|
|
|
**Parameters**
|
|
|
|
* `Engine.Entity`
|
|
|
|
### CatchmentAreaSystem[🔗](#$api.engine.system~CatchmentAreaSystem)
|
|
|
|
```
|
|
global record CatchmentAreaSystem getEdge2stationsMap: function(): {EdgeId : {{Engine.Entity, integer}}}
|
|
getStation2edgesMap: function(): {Engine.Entity : {{EdgeId, integer}}}
|
|
getStation2stationsAndDistancesMap: function(): {Engine.Entity : {Engine.Entity : integer}}
|
|
getStationCatchables: function(stationEntity : Engine.Entity, cargo : boolean): {Engine.Entity}
|
|
end
|
|
```
|
|
|
|
Catchment Area System.
|
|
Contains cached information about reachability of stations and destinations.
|
|
|
|
### CatchmentAreaSystem.getEdge2stationsMap[🔗](#$api.engine.system~CatchmentAreaSystem.getEdge2stationsMap)
|
|
|
|
```
|
|
function CatchmentAreaSystem.getEdge2stationsMap(): {EdgeId : {{Engine.Entity, integer}}}
|
|
```
|
|
|
|
Obtains a map mapping transport network edges to stations that can be reached from that edge.
|
|
|
|
**Returns**
|
|
|
|
1. `{EdgeId : {{Engine.Entity, integer}}}`
|
|
|
|
### CatchmentAreaSystem.getStation2edgesMap[🔗](#$api.engine.system~CatchmentAreaSystem.getStation2edgesMap)
|
|
|
|
```
|
|
function CatchmentAreaSystem.getStation2edgesMap(): {Engine.Entity : {{EdgeId, integer}}}
|
|
```
|
|
|
|
Obtains a map mapping stations to all reachable edges from that station (the actual catchment area of the station).
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : {{EdgeId, integer}}}`
|
|
|
|
### CatchmentAreaSystem.getStation2stationsAndDistancesMap[🔗](#$api.engine.system~CatchmentAreaSystem.getStation2stationsAndDistancesMap)
|
|
|
|
```
|
|
function CatchmentAreaSystem.getStation2stationsAndDistancesMap(): {Engine.Entity : {Engine.Entity : integer}}
|
|
```
|
|
|
|
Obtains a map, mapping station to all reachable stations in the catchment area, and, additionally, the distance of the
|
|
shortest path.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : {Engine.Entity : integer}}`
|
|
|
|
### CatchmentAreaSystem.getStationCatchables[🔗](#$api.engine.system~CatchmentAreaSystem.getStationCatchables)
|
|
|
|
```
|
|
function CatchmentAreaSystem.getStationCatchables(stationEntity : Engine.Entity, cargo : boolean): {Engine.Entity}
|
|
```
|
|
|
|
Obtains a list of all catchables (entities holding a StockList or PersonCapacity component) for the station.
|
|
|
|
**Parameters**
|
|
|
|
* `stationEntity` :`Engine.Entity` — the entity of the station
|
|
* `cargo` :`boolean` — wether to return cargo or passenger catchables
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### EmissionGridSystem[🔗](#$api.engine.system~EmissionGridSystem)
|
|
|
|
```
|
|
global record EmissionGridSystem getInterpolatedEmission: function(pos : Vec2f, useAverage : boolean, type : Engine.Component.EmissionGrid.Type): number
|
|
getEmissionGridEntity: function(noise : boolean): Engine.Entity
|
|
end
|
|
```
|
|
|
|
Emission grid system.
|
|
Manages emission grid data.
|
|
|
|
### EmissionGridSystem.getInterpolatedEmission[🔗](#$api.engine.system~EmissionGridSystem.getInterpolatedEmission)
|
|
|
|
```
|
|
function EmissionGridSystem.getInterpolatedEmission(pos : Vec2f, useAverage : boolean, type : Engine.Component.EmissionGrid.Type): number
|
|
```
|
|
|
|
Returns the interpolated emission at a given position.
|
|
|
|
**Parameters**
|
|
|
|
* `pos` :`Vec2f` — the position at which the emission should be sampled
|
|
* `useAverage` :`boolean` — whether to use average or not
|
|
* `type` :`Engine.Component.EmissionGrid.Type` — the type of emission to query
|
|
|
|
**Returns**
|
|
|
|
1. `number` — the interpolated emission value
|
|
|
|
### EmissionGridSystem.getEmissionGridEntity[🔗](#$api.engine.system~EmissionGridSystem.getEmissionGridEntity)
|
|
|
|
```
|
|
function EmissionGridSystem.getEmissionGridEntity(noise : boolean): Engine.Entity
|
|
```
|
|
|
|
Returns the EmissionGrid entity for the noise or pollution
|
|
|
|
**Parameters**
|
|
|
|
* `noise` :`boolean` — Which type of emission: noise or pollution
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity` — an entity with the EmissionGrid component
|
|
|
|
### GameScriptSystem[🔗](#$api.engine.system~GameScriptSystem)
|
|
|
|
```
|
|
global record GameScriptSystem getEntityForGameScript: function(name : string): Engine.Entity
|
|
end
|
|
```
|
|
|
|
Game Script System
|
|
Manages entities and components for gamescript.
|
|
|
|
### GameScriptSystem.getEntityForGameScript[🔗](#$api.engine.system~GameScriptSystem.getEntityForGameScript)
|
|
|
|
```
|
|
function GameScriptSystem.getEntityForGameScript(name : string): Engine.Entity
|
|
```
|
|
|
|
Gets the entity onto which the gamescript state is attached
|
|
|
|
**Parameters**
|
|
|
|
* `name` :`string` — the name of the gamescript
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### GridCollision[🔗](#$api.engine.system~GridCollision)
|
|
|
|
```
|
|
global record GridCollision getGridCollisionSystem: function(index : integer): GridCollisionSystem
|
|
getPlayerInfrastructureCollisionSystem: function(): GridCollisionSystem
|
|
end
|
|
```
|
|
|
|
Contains multiple grids holding data
|
|
Contains multiple grids holding diverse data
|
|
|
|
### GridCollision.getGridCollisionSystem[🔗](#$api.engine.system~GridCollision.getGridCollisionSystem)
|
|
|
|
```
|
|
function GridCollision.getGridCollisionSystem(index : integer): GridCollisionSystem
|
|
```
|
|
|
|
Gets the grid collision system with the given index.
|
|
|
|
**Parameters**
|
|
|
|
* `index` :`integer` — the index of the system to get
|
|
|
|
**Returns**
|
|
|
|
1. `GridCollisionSystem`
|
|
|
|
### GridCollision.getPlayerInfrastructureCollisionSystem[🔗](#$api.engine.system~GridCollision.getPlayerInfrastructureCollisionSystem)
|
|
|
|
```
|
|
function GridCollision.getPlayerInfrastructureCollisionSystem(): GridCollisionSystem
|
|
```
|
|
|
|
Gets the grid collision system tracking player owned structures.
|
|
|
|
**Returns**
|
|
|
|
1. `GridCollisionSystem`
|
|
|
|
### GridCollisionSystem[🔗](#$api.engine.system~GridCollisionSystem)
|
|
|
|
```
|
|
global record GridCollisionSystem getCollisionDataAt: function(GridCollisionSystem, Vec2f): number
|
|
end
|
|
```
|
|
|
|
Grid Collision System.
|
|
Single instance of the grid collision system.
|
|
|
|
### GridCollisionSystem.getCollisionDataAt[🔗](#$api.engine.system~GridCollisionSystem.getCollisionDataAt)
|
|
|
|
```
|
|
function GridCollisionSystem.getCollisionDataAt(GridCollisionSystem, Vec2f): number
|
|
```
|
|
|
|
Gets collision data at a given position (0 = no collision)
|
|
|
|
**Parameters**
|
|
|
|
* `GridCollisionSystem`
|
|
* `Vec2f`
|
|
|
|
**Returns**
|
|
|
|
1. `number`
|
|
|
|
### ISystem[🔗](#$api.engine.system~ISystem)
|
|
|
|
```
|
|
global interface ISystem forEach: function(Engine.Entity)
|
|
end
|
|
```
|
|
|
|
### ISystem.forEach[🔗](#$api.engine.system~ISystem.forEach)
|
|
|
|
```
|
|
function ISystem.forEach(Engine.Entity)
|
|
```
|
|
|
|
**Parameters**
|
|
|
|
* `Engine.Entity`
|
|
|
|
### LandVehicleMoveSystem[🔗](#$api.engine.system~LandVehicleMoveSystem)
|
|
|
|
```
|
|
global record LandVehicleMoveSystem getBlockedTrains: function(): {{Engine.Entity, Engine.Entity}}
|
|
getVehicleInfo: function(vehicleEntity : Engine.Entity): LandVehicleMoveInfo
|
|
isTrainWaitingForFreePath: function(trainEntity : Engine.Entity): boolean
|
|
forEach: function(Engine.Entity)
|
|
end
|
|
```
|
|
|
|
Land Vehicle Move System.
|
|
Manages the movement of land vehicles.
|
|
|
|
### LandVehicleMoveSystem.getBlockedTrains[🔗](#$api.engine.system~LandVehicleMoveSystem.getBlockedTrains)
|
|
|
|
```
|
|
function LandVehicleMoveSystem.getBlockedTrains(): {{Engine.Entity, Engine.Entity}}
|
|
```
|
|
|
|
Gets all trains that are blocked by another train.
|
|
|
|
**Returns**
|
|
|
|
1. `{{Engine.Entity, Engine.Entity}}`
|
|
|
|
### LandVehicleMoveSystem.getVehicleInfo[🔗](#$api.engine.system~LandVehicleMoveSystem.getVehicleInfo)
|
|
|
|
```
|
|
function LandVehicleMoveSystem.getVehicleInfo(vehicleEntity : Engine.Entity): LandVehicleMoveInfo
|
|
```
|
|
|
|
Gets more information about a vehicle.
|
|
|
|
**Parameters**
|
|
|
|
* `vehicleEntity` :`Engine.Entity` — the entity of the vehicle.
|
|
|
|
**Returns**
|
|
|
|
1. `LandVehicleMoveInfo`
|
|
|
|
### LandVehicleMoveSystem.isTrainWaitingForFreePath[🔗](#$api.engine.system~LandVehicleMoveSystem.isTrainWaitingForFreePath)
|
|
|
|
```
|
|
function LandVehicleMoveSystem.isTrainWaitingForFreePath(trainEntity : Engine.Entity): boolean
|
|
```
|
|
|
|
Checks if a train is waiting for a free path.
|
|
|
|
**Parameters**
|
|
|
|
* `trainEntity` :`Engine.Entity` — the entity of the train.
|
|
|
|
**Returns**
|
|
|
|
1. `boolean`
|
|
|
|
### LandVehicleMoveSystem.forEach[🔗](#$api.engine.system~LandVehicleMoveSystem.forEach)
|
|
|
|
```
|
|
function LandVehicleMoveSystem.forEach(Engine.Entity)
|
|
```
|
|
|
|
Loops over all trains.
|
|
|
|
**Parameters**
|
|
|
|
* `Engine.Entity`
|
|
|
|
### LandmarkSystem[🔗](#$api.engine.system~LandmarkSystem)
|
|
|
|
```
|
|
global record LandmarkSystem getLandmarkData: function(landmarkEntity : Engine.Entity): {EdgeId : number}
|
|
end
|
|
```
|
|
|
|
Landmark system.
|
|
Manages landmarks data.
|
|
|
|
### LandmarkSystem.getLandmarkData[🔗](#$api.engine.system~LandmarkSystem.getLandmarkData)
|
|
|
|
```
|
|
function LandmarkSystem.getLandmarkData(landmarkEntity : Engine.Entity): {EdgeId : number}
|
|
```
|
|
|
|
Returns distances from landmark entity to transport network edges.
|
|
|
|
**Parameters**
|
|
|
|
* `landmarkEntity` :`Engine.Entity` — entity of the landmark
|
|
|
|
**Returns**
|
|
|
|
1. `{EdgeId : number}`
|
|
|
|
### LineSystem[🔗](#$api.engine.system~LineSystem)
|
|
|
|
```
|
|
global record LineSystem getLines: function(): {Engine.Entity}
|
|
getLinesForPlayer: function(playerEntity : Engine.Entity): {Engine.Entity}
|
|
getLinesForWaypoint: function(waypointEntity : Engine.Entity): {Engine.Entity}
|
|
getLinesForWaypointLane: function(waypointEntity : Engine.Entity, signalIndex : integer): {{Engine.Entity, integer, integer}}
|
|
getLineStops: function(stationGroupEntity : Engine.Entity): {{Engine.Entity, integer}}
|
|
getLineStopsForStation: function(stationEntity : Engine.Entity): {{Engine.Entity, integer}}
|
|
getLineStopsForTerminal: function(stationEntity : Engine.Entity, terminal : integer): {{Engine.Entity, integer}}
|
|
getLinesForStationGroup: function(stationGroup : Engine.Entity): {Engine.Entity}
|
|
getProblemLines: function(playerEntity : Engine.Entity): {{Engine.Entity, LineProblem}}
|
|
getStationGroup2LineStopsMap: function(): {Engine.Entity : {{Engine.Entity, integer}}}
|
|
getTerminal2lineStops: function(): {{Engine.Entity, integer} : {{Engine.Entity, integer}}}
|
|
getBestLineAssignment: function(lineEntity : Engine.Entity, lineData : Engine.Component.Line, allowTerminalChanges : boolean): {StationTerminal}
|
|
end
|
|
```
|
|
|
|
Line System.
|
|
Contains cached information about lines.
|
|
|
|
### LineSystem.getLines[🔗](#$api.engine.system~LineSystem.getLines)
|
|
|
|
```
|
|
function LineSystem.getLines(): {Engine.Entity}
|
|
```
|
|
|
|
Gets all lines on the map.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}` — line entities
|
|
|
|
### LineSystem.getLinesForPlayer[🔗](#$api.engine.system~LineSystem.getLinesForPlayer)
|
|
|
|
```
|
|
function LineSystem.getLinesForPlayer(playerEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets all lines belonging to the player.
|
|
|
|
**Parameters**
|
|
|
|
* `playerEntity` :`Engine.Entity` — the player for which the lines should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}` — line entities
|
|
|
|
### LineSystem.getLinesForWaypoint[🔗](#$api.engine.system~LineSystem.getLinesForWaypoint)
|
|
|
|
```
|
|
function LineSystem.getLinesForWaypoint(waypointEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets all lines going through a waypoint.
|
|
|
|
**Parameters**
|
|
|
|
* `waypointEntity` :`Engine.Entity` — the waypoint for which the lines should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}` — line entities
|
|
|
|
### LineSystem.getLinesForWaypointLane[🔗](#$api.engine.system~LineSystem.getLinesForWaypointLane)
|
|
|
|
```
|
|
function LineSystem.getLinesForWaypointLane(waypointEntity : Engine.Entity, signalIndex : integer): {{Engine.Entity, integer, integer}}
|
|
```
|
|
|
|
Gets all line waypoints at the specific signal+lane
|
|
|
|
**Parameters**
|
|
|
|
* `waypointEntity` :`Engine.Entity` — the signalList entity
|
|
* `signalIndex` :`integer` — the signal index inside the SignalList
|
|
|
|
**Returns**
|
|
|
|
1. `{{Engine.Entity, integer, integer}}`
|
|
|
|
### LineSystem.getLineStops[🔗](#$api.engine.system~LineSystem.getLineStops)
|
|
|
|
```
|
|
function LineSystem.getLineStops(stationGroupEntity : Engine.Entity): {{Engine.Entity, integer}}
|
|
```
|
|
|
|
Gets all lines stopping at a station group.
|
|
|
|
**Parameters**
|
|
|
|
* `stationGroupEntity` :`Engine.Entity` — the stationGroup for which the lines should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `{{Engine.Entity, integer}}`
|
|
|
|
### LineSystem.getLineStopsForStation[🔗](#$api.engine.system~LineSystem.getLineStopsForStation)
|
|
|
|
```
|
|
function LineSystem.getLineStopsForStation(stationEntity : Engine.Entity): {{Engine.Entity, integer}}
|
|
```
|
|
|
|
Gets all lines stopping at a station.
|
|
|
|
**Parameters**
|
|
|
|
* `stationEntity` :`Engine.Entity` — the station for which the lines should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `{{Engine.Entity, integer}}`
|
|
|
|
### LineSystem.getLineStopsForTerminal[🔗](#$api.engine.system~LineSystem.getLineStopsForTerminal)
|
|
|
|
```
|
|
function LineSystem.getLineStopsForTerminal(stationEntity : Engine.Entity, terminal : integer): {{Engine.Entity, integer}}
|
|
```
|
|
|
|
Gets all lines stopping at a terminal.
|
|
|
|
**Parameters**
|
|
|
|
* `stationEntity` :`Engine.Entity` — the station for which the lines should be fetched
|
|
* `terminal` :`integer` — the terminal of the station for which the lines should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `{{Engine.Entity, integer}}`
|
|
|
|
### LineSystem.getLinesForStationGroup[🔗](#$api.engine.system~LineSystem.getLinesForStationGroup)
|
|
|
|
```
|
|
function LineSystem.getLinesForStationGroup(stationGroup : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets all lines for the given station group.
|
|
|
|
**Parameters**
|
|
|
|
* `stationGroup` :`Engine.Entity` — the stationGroup for which the lines should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}` — line entities
|
|
|
|
### LineSystem.getProblemLines[🔗](#$api.engine.system~LineSystem.getProblemLines)
|
|
|
|
```
|
|
function LineSystem.getProblemLines(playerEntity : Engine.Entity): {{Engine.Entity, LineProblem}}
|
|
```
|
|
|
|
Gets all lines having an issue, and the issue in question.
|
|
|
|
**Parameters**
|
|
|
|
* `playerEntity` :`Engine.Entity` — the player for which the lines should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `{{Engine.Entity, LineProblem}}`
|
|
|
|
### LineSystem.getStationGroup2LineStopsMap[🔗](#$api.engine.system~LineSystem.getStationGroup2LineStopsMap)
|
|
|
|
```
|
|
function LineSystem.getStationGroup2LineStopsMap(): {Engine.Entity : {{Engine.Entity, integer}}}
|
|
```
|
|
|
|
Gets all stops in a station group.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : {{Engine.Entity, integer}}}`
|
|
|
|
### LineSystem.getTerminal2lineStops[🔗](#$api.engine.system~LineSystem.getTerminal2lineStops)
|
|
|
|
```
|
|
function LineSystem.getTerminal2lineStops(): {{Engine.Entity, integer} : {{Engine.Entity, integer}}}
|
|
```
|
|
|
|
Gets all stops in a terminal.
|
|
|
|
**Returns**
|
|
|
|
1. `{{Engine.Entity, integer} : {{Engine.Entity, integer}}}`
|
|
|
|
### LineSystem.getBestLineAssignment[🔗](#$api.engine.system~LineSystem.getBestLineAssignment)
|
|
|
|
```
|
|
function LineSystem.getBestLineAssignment(lineEntity : Engine.Entity, lineData : Engine.Component.Line, allowTerminalChanges : boolean): {StationTerminal}
|
|
```
|
|
|
|
Gets best terminal assignments for line.
|
|
|
|
**Parameters**
|
|
|
|
* `lineEntity` :`Engine.Entity` — the line for which the computation should happen
|
|
* `lineData` :`Engine.Component.Line` — the line component data, stops may have station = -1 and terminal = -1
|
|
* `allowTerminalChanges` :`boolean` —
|
|
|
|
**Returns**
|
|
|
|
1. `{StationTerminal}`
|
|
|
|
### OctreeSystem[🔗](#$api.engine.system~OctreeSystem)
|
|
|
|
```
|
|
global record OctreeSystem findIntersectingEntities: function(box : Box3f, callback : function(Engine.Entity, Engine.Component.BoundingVolume))
|
|
end
|
|
```
|
|
|
|
Octree System.
|
|
An octree that contains all entities with a bounding box. It enables fast query and location of entities in the map.
|
|
|
|
### OctreeSystem.findIntersectingEntities[🔗](#$api.engine.system~OctreeSystem.findIntersectingEntities)
|
|
|
|
```
|
|
function OctreeSystem.findIntersectingEntities(box : Box3f, callback : function(Engine.Entity, Engine.Component.BoundingVolume))
|
|
```
|
|
|
|
Fetches all entities in a box and runs a callback for them.
|
|
|
|
**Parameters**
|
|
|
|
* `box` :`Box3f` — Box in which all entities are searched.
|
|
* `callback` :`function(Engine.Entity, Engine.Component.BoundingVolume)` — A function called for each matching entity within box. The callback obtains an entity and a bounding volume.
|
|
|
|
### ParcelSystem[🔗](#$api.engine.system~ParcelSystem)
|
|
|
|
```
|
|
global record ParcelSystem getParcelData: function(segmentEntity : Engine.Entity): any
|
|
getSegment2ParcelData: function(): {Engine.Entity : <any type>}
|
|
end
|
|
```
|
|
|
|
Parcel System.
|
|
Manages and returns information about parcels.
|
|
|
|
### ParcelSystem.getParcelData[🔗](#$api.engine.system~ParcelSystem.getParcelData)
|
|
|
|
```
|
|
function ParcelSystem.getParcelData(segmentEntity : Engine.Entity): any
|
|
```
|
|
|
|
Obtains all parcels belonging to a segment.
|
|
|
|
**Parameters**
|
|
|
|
* `segmentEntity` :`Engine.Entity` — the segment of which to obtain all attached parcels
|
|
|
|
**Returns**
|
|
|
|
1. `any`
|
|
|
|
### ParcelSystem.getSegment2ParcelData[🔗](#$api.engine.system~ParcelSystem.getSegment2ParcelData)
|
|
|
|
```
|
|
function ParcelSystem.getSegment2ParcelData(): {Engine.Entity : <any type>}
|
|
```
|
|
|
|
Obtains a map of all segments to the parcel data of the segment.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : <any type>}`
|
|
|
|
### RailRoadCrossingSystem[🔗](#$api.engine.system~RailRoadCrossingSystem)
|
|
|
|
```
|
|
global record RailRoadCrossingSystem getRailroadCrossingForEdge: function(edgeEntity : Engine.Entity): Engine.Entity
|
|
getRailroadCrossingForNode: function(nodeEntity : Engine.Entity): Engine.Entity
|
|
end
|
|
```
|
|
|
|
Railroad Crossing System.
|
|
Contains information about raiload crossings.
|
|
|
|
### RailRoadCrossingSystem.getRailroadCrossingForEdge[🔗](#$api.engine.system~RailRoadCrossingSystem.getRailroadCrossingForEdge)
|
|
|
|
```
|
|
function RailRoadCrossingSystem.getRailroadCrossingForEdge(edgeEntity : Engine.Entity): Engine.Entity
|
|
```
|
|
|
|
Gets all railroad crossings of the given base edge entity.
|
|
|
|
**Parameters**
|
|
|
|
* `edgeEntity` :`Engine.Entity` — the entity id of the edge that should be inspected
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### RailRoadCrossingSystem.getRailroadCrossingForNode[🔗](#$api.engine.system~RailRoadCrossingSystem.getRailroadCrossingForNode)
|
|
|
|
```
|
|
function RailRoadCrossingSystem.getRailroadCrossingForNode(nodeEntity : Engine.Entity): Engine.Entity
|
|
```
|
|
|
|
Gets all railroad crossings of the given base node entity.
|
|
|
|
**Parameters**
|
|
|
|
* `nodeEntity` :`Engine.Entity` — the entity id of the node that should be inspected
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### RiverSystem[🔗](#$api.engine.system~RiverSystem)
|
|
|
|
```
|
|
global record RiverSystem getWaterMeshEntities: function(Vec2i, Vec2i): {Engine.Entity}
|
|
end
|
|
```
|
|
|
|
River System.
|
|
Contains information about water in the map.
|
|
|
|
### RiverSystem.getWaterMeshEntities[🔗](#$api.engine.system~RiverSystem.getWaterMeshEntities)
|
|
|
|
```
|
|
function RiverSystem.getWaterMeshEntities(Vec2i, Vec2i): {Engine.Entity}
|
|
```
|
|
|
|
Gets all water meshes within the bounds.
|
|
|
|
**Parameters**
|
|
|
|
* `Vec2i`
|
|
* `Vec2i`
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### RunwaySystem[🔗](#$api.engine.system~RunwaySystem)
|
|
|
|
```
|
|
global record RunwaySystem getLandingNodeIdMap: function(): {NodeId : Engine.Entity}
|
|
getTakeoffNodeIdMap: function(): {NodeId : Engine.Entity}
|
|
end
|
|
```
|
|
|
|
Runway System.
|
|
Contains information about runway edges.
|
|
|
|
### RunwaySystem.getLandingNodeIdMap[🔗](#$api.engine.system~RunwaySystem.getLandingNodeIdMap)
|
|
|
|
```
|
|
function RunwaySystem.getLandingNodeIdMap(): {NodeId : Engine.Entity}
|
|
```
|
|
|
|
Gets all stations reachable from that landing node.
|
|
|
|
**Returns**
|
|
|
|
1. `{NodeId : Engine.Entity}`
|
|
|
|
### RunwaySystem.getTakeoffNodeIdMap[🔗](#$api.engine.system~RunwaySystem.getTakeoffNodeIdMap)
|
|
|
|
```
|
|
function RunwaySystem.getTakeoffNodeIdMap(): {NodeId : Engine.Entity}
|
|
```
|
|
|
|
Gets all station from which the takeoff node can reached.
|
|
|
|
**Returns**
|
|
|
|
1. `{NodeId : Engine.Entity}`
|
|
|
|
### ShipMoveSystem[🔗](#$api.engine.system~ShipMoveSystem)
|
|
|
|
```
|
|
global record ShipMoveSystem getShipInfo: function(vehicleEntity : Engine.Entity): ShipInfo
|
|
forEach: function(Engine.Entity)
|
|
end
|
|
```
|
|
|
|
Ship Move System.
|
|
Contains information about the movement of ships.
|
|
|
|
### ShipMoveSystem.getShipInfo[🔗](#$api.engine.system~ShipMoveSystem.getShipInfo)
|
|
|
|
```
|
|
function ShipMoveSystem.getShipInfo(vehicleEntity : Engine.Entity): ShipInfo
|
|
```
|
|
|
|
Gets more path and movement information about ships.
|
|
|
|
**Parameters**
|
|
|
|
* `vehicleEntity` :`Engine.Entity` — the entity id of the ship that should be inspected
|
|
|
|
**Returns**
|
|
|
|
1. `ShipInfo`
|
|
|
|
### ShipMoveSystem.forEach[🔗](#$api.engine.system~ShipMoveSystem.forEach)
|
|
|
|
```
|
|
function ShipMoveSystem.forEach(Engine.Entity)
|
|
```
|
|
|
|
Loops over all ships.
|
|
|
|
**Parameters**
|
|
|
|
* `Engine.Entity`
|
|
|
|
### SignalSystem[🔗](#$api.engine.system~SignalSystem)
|
|
|
|
```
|
|
global record SignalSystem getSignal: function(edgeId : EdgeId, reversed : boolean): SignalId
|
|
end
|
|
```
|
|
|
|
Signal System.
|
|
Contains information about Signals (waypoints, path and one way signals)
|
|
|
|
### SignalSystem.getSignal[🔗](#$api.engine.system~SignalSystem.getSignal)
|
|
|
|
```
|
|
function SignalSystem.getSignal(edgeId : EdgeId, reversed : boolean): SignalId
|
|
```
|
|
|
|
Gets the signal from an @{api.type.EdgeId} at the given direction.
|
|
Notice: there can be at most one signal per direction per transport network edge.
|
|
|
|
**Parameters**
|
|
|
|
* `edgeId` :`EdgeId` — the id of the edge hosting the signal
|
|
* `reversed` :`boolean` — false if signal in direction of edge is requested
|
|
|
|
**Returns**
|
|
|
|
1. `SignalId`
|
|
|
|
### SimCargoSystem[🔗](#$api.engine.system~SimCargoSystem)
|
|
|
|
```
|
|
global record SimCargoSystemend
|
|
```
|
|
|
|
Cargo System.
|
|
System managing cargo.
|
|
|
|
### SimEntityAtStockSystem[🔗](#$api.engine.system~SimEntityAtStockSystem)
|
|
|
|
```
|
|
global record SimEntityAtStockSystem getStock2SimEntityMap: function(): {{Engine.Entity, StockId} : {Engine.Entity}}
|
|
getStockCount: function(stockEntity : Engine.Entity, stockId : StockId): integer
|
|
getStockCountForCargoType: function(stockEntity : Engine.Entity, stockId : StockId, cargoTypeId : CargoTypeId): integer
|
|
getStockEntities: function(stockEntity : Engine.Entity, stockId : StockId): {{integer, Engine.Entity}}
|
|
getStockSimEntity: function(stockEntity : Engine.Entity, stockId : StockId): Engine.Entity
|
|
end
|
|
```
|
|
|
|
Sim Entity At Stock System.
|
|
System managing cargo produced by industries or transported to a warehouse.
|
|
|
|
### SimEntityAtStockSystem.getStock2SimEntityMap[🔗](#$api.engine.system~SimEntityAtStockSystem.getStock2SimEntityMap)
|
|
|
|
```
|
|
function SimEntityAtStockSystem.getStock2SimEntityMap(): {{Engine.Entity, StockId} : {Engine.Entity}}
|
|
```
|
|
|
|
Obtains a map, mapping the stock to the cargo waiting there.
|
|
|
|
**Returns**
|
|
|
|
1. `{{Engine.Entity, StockId} : {Engine.Entity}}`
|
|
|
|
### SimEntityAtStockSystem.getStockCount[🔗](#$api.engine.system~SimEntityAtStockSystem.getStockCount)
|
|
|
|
```
|
|
function SimEntityAtStockSystem.getStockCount(stockEntity : Engine.Entity, stockId : StockId): integer
|
|
```
|
|
|
|
Obtains the amount of specific item id waiting at a given stock.
|
|
|
|
**Parameters**
|
|
|
|
* `stockEntity` :`Engine.Entity` — the entity of the stock holding entity, e.g. industry
|
|
* `stockId` :`StockId` — the id of the stock
|
|
|
|
**Returns**
|
|
|
|
1. `integer`
|
|
|
|
### SimEntityAtStockSystem.getStockCountForCargoType[🔗](#$api.engine.system~SimEntityAtStockSystem.getStockCountForCargoType)
|
|
|
|
```
|
|
function SimEntityAtStockSystem.getStockCountForCargoType(stockEntity : Engine.Entity, stockId : StockId, cargoTypeId : CargoTypeId): integer
|
|
```
|
|
|
|
Obtains the amount of specific item id waiting at a given stock and cargo type.
|
|
|
|
**Parameters**
|
|
|
|
* `stockEntity` :`Engine.Entity` — the entity of the stock holding entity, e.g. industry
|
|
* `stockId` :`StockId` — the id of the stock
|
|
* `cargoTypeId` :`CargoTypeId` — the id of the cargo type
|
|
|
|
**Returns**
|
|
|
|
1. `integer`
|
|
|
|
### SimEntityAtStockSystem.getStockEntities[🔗](#$api.engine.system~SimEntityAtStockSystem.getStockEntities)
|
|
|
|
```
|
|
function SimEntityAtStockSystem.getStockEntities(stockEntity : Engine.Entity, stockId : StockId): {{integer, Engine.Entity}}
|
|
```
|
|
|
|
Obtains all entities waiting at a given stock.
|
|
|
|
**Parameters**
|
|
|
|
* `stockEntity` :`Engine.Entity` — the entity of the stock holding entity, e.g. industry
|
|
* `stockId` :`StockId` — the id of the stock
|
|
|
|
**Returns**
|
|
|
|
1. `{{integer, Engine.Entity}}`
|
|
|
|
### SimEntityAtStockSystem.getStockSimEntity[🔗](#$api.engine.system~SimEntityAtStockSystem.getStockSimEntity)
|
|
|
|
```
|
|
function SimEntityAtStockSystem.getStockSimEntity(stockEntity : Engine.Entity, stockId : StockId): Engine.Entity
|
|
```
|
|
|
|
Obtains the entity that was waiting longest at a given stock.
|
|
|
|
**Parameters**
|
|
|
|
* `stockEntity` :`Engine.Entity` — the entity of the stock holding entity, e.g. industry
|
|
* `stockId` :`StockId` — the id of the stock
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### SimEntityAtTerminalSystem[🔗](#$api.engine.system~SimEntityAtTerminalSystem)
|
|
|
|
```
|
|
global record SimEntityAtTerminalSystem getLineStopSimEntitiesCount: function(entity : Engine.Entity, stopIndex : integer, cargoType : CargoTypeId): integer
|
|
getLineStopSimEntities: function(entity : Engine.Entity, stopIndex : integer, cargoType : CargoTypeId): {Engine.Entity}
|
|
end
|
|
```
|
|
|
|
Sim Entity At Terminal System.
|
|
System managing entities waiting at terminals.
|
|
|
|
### SimEntityAtTerminalSystem.getLineStopSimEntitiesCount[🔗](#$api.engine.system~SimEntityAtTerminalSystem.getLineStopSimEntitiesCount)
|
|
|
|
```
|
|
function SimEntityAtTerminalSystem.getLineStopSimEntitiesCount(entity : Engine.Entity, stopIndex : integer, cargoType : CargoTypeId): integer
|
|
```
|
|
|
|
Gets the count of entities (SimPersons) waiting at the terminal.
|
|
|
|
**Parameters**
|
|
|
|
* `entity` :`Engine.Entity` — the line entity
|
|
* `stopIndex` :`integer` — the index of the stop in the line
|
|
* `cargoType` :`CargoTypeId` — the id of the cargo type
|
|
|
|
**Returns**
|
|
|
|
1. `integer` — the count of entities at that line stop
|
|
|
|
### SimEntityAtTerminalSystem.getLineStopSimEntities[🔗](#$api.engine.system~SimEntityAtTerminalSystem.getLineStopSimEntities)
|
|
|
|
```
|
|
function SimEntityAtTerminalSystem.getLineStopSimEntities(entity : Engine.Entity, stopIndex : integer, cargoType : CargoTypeId): {Engine.Entity}
|
|
```
|
|
|
|
Gets the count of entities (SimPersons) waiting at the terminal for the given cargo type.
|
|
|
|
**Parameters**
|
|
|
|
* `entity` :`Engine.Entity` — the line entity
|
|
* `stopIndex` :`integer` — the index of the stop in the line
|
|
* `cargoType` :`CargoTypeId` — the id of the cargo type
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}` — the sim entities of the given cargo type at that line stop
|
|
|
|
### SimEntityAtVehicleSystem[🔗](#$api.engine.system~SimEntityAtVehicleSystem)
|
|
|
|
```
|
|
global record SimEntityAtVehicleSystem getVehicle2Cargo2SimEntitesMap: function(): {Engine.Entity : {CargoTypeId : {Engine.Entity}}}
|
|
getVehicleSimEntitiesCount: function(vehicleEntity : Engine.Entity): integer
|
|
getVehicleSimEntitiesCountForCargoType: function(vehicleEntity : Engine.Entity, cargoType : CargoTypeId): integer
|
|
getVehiclesWithRoundTripCount: function(): {Engine.Entity : integer}
|
|
end
|
|
```
|
|
|
|
Sim Entity At Vehicle System.
|
|
System managing entities travelling in a vehicle.
|
|
|
|
### SimEntityAtVehicleSystem.getVehicle2Cargo2SimEntitesMap[🔗](#$api.engine.system~SimEntityAtVehicleSystem.getVehicle2Cargo2SimEntitesMap)
|
|
|
|
```
|
|
function SimEntityAtVehicleSystem.getVehicle2Cargo2SimEntitesMap(): {Engine.Entity : {CargoTypeId : {Engine.Entity}}}
|
|
```
|
|
|
|
Gets a map from vehicle Entity to a map from cargo to all "Sim" entities in the vehicle of the given cargo type.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : {CargoTypeId : {Engine.Entity}}}`
|
|
|
|
### SimEntityAtVehicleSystem.getVehicleSimEntitiesCount[🔗](#$api.engine.system~SimEntityAtVehicleSystem.getVehicleSimEntitiesCount)
|
|
|
|
```
|
|
function SimEntityAtVehicleSystem.getVehicleSimEntitiesCount(vehicleEntity : Engine.Entity): integer
|
|
```
|
|
|
|
Gets the count of entities in the vehicle.
|
|
|
|
**Parameters**
|
|
|
|
* `vehicleEntity` :`Engine.Entity` — the entity of the vehicle that should be inspected
|
|
|
|
**Returns**
|
|
|
|
1. `integer` — the count of entities
|
|
|
|
### SimEntityAtVehicleSystem.getVehicleSimEntitiesCountForCargoType[🔗](#$api.engine.system~SimEntityAtVehicleSystem.getVehicleSimEntitiesCountForCargoType)
|
|
|
|
```
|
|
function SimEntityAtVehicleSystem.getVehicleSimEntitiesCountForCargoType(vehicleEntity : Engine.Entity, cargoType : CargoTypeId): integer
|
|
```
|
|
|
|
Gets the count of entities in the vehicle for the given cargo type.
|
|
|
|
**Parameters**
|
|
|
|
* `vehicleEntity` :`Engine.Entity` — the entity of the vehicle that should be inspected
|
|
* `cargoType` :`CargoTypeId` — the id of the cargo type
|
|
|
|
**Returns**
|
|
|
|
1. `integer` — the count of entities
|
|
|
|
### SimEntityAtVehicleSystem.getVehiclesWithRoundTripCount[🔗](#$api.engine.system~SimEntityAtVehicleSystem.getVehiclesWithRoundTripCount)
|
|
|
|
```
|
|
function SimEntityAtVehicleSystem.getVehiclesWithRoundTripCount(): {Engine.Entity : integer}
|
|
```
|
|
|
|
Gets the vehicles with their round trip cargo counts.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : integer}` — the vehicles with their round trip cargo counts
|
|
|
|
### SimPersonAtBuildingSystem[🔗](#$api.engine.system~SimPersonAtBuildingSystem)
|
|
|
|
```
|
|
global record SimPersonAtBuildingSystem getSimPersonAtBuilding: function(simBuildingEntity : Engine.Entity): {Engine.Entity}
|
|
end
|
|
```
|
|
|
|
Person At Building System.
|
|
System managing persons at a building.
|
|
|
|
### SimPersonAtBuildingSystem.getSimPersonAtBuilding[🔗](#$api.engine.system~SimPersonAtBuildingSystem.getSimPersonAtBuilding)
|
|
|
|
```
|
|
function SimPersonAtBuildingSystem.getSimPersonAtBuilding(simBuildingEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets list of entities currently at the building
|
|
|
|
**Parameters**
|
|
|
|
* `simBuildingEntity` :`Engine.Entity` — the entity of the building that should be inspected
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### SimPersonAtTerminalSystem[🔗](#$api.engine.system~SimPersonAtTerminalSystem)
|
|
|
|
```
|
|
global record SimPersonAtTerminalSystem getEdgeInfoMap: function(): {EdgeId : <any type>}
|
|
getNumFreePlaces: function(edgeId : EdgeId): integer
|
|
getPos01: function(edgeId : EdgeId, place : integer): {number, number}
|
|
end
|
|
```
|
|
|
|
Person At Terminal System.
|
|
System managing persons waiting at terminal.
|
|
|
|
### SimPersonAtTerminalSystem.getEdgeInfoMap[🔗](#$api.engine.system~SimPersonAtTerminalSystem.getEdgeInfoMap)
|
|
|
|
```
|
|
function SimPersonAtTerminalSystem.getEdgeInfoMap(): {EdgeId : <any type>}
|
|
```
|
|
|
|
Gets information about persons waiting at the terminals.
|
|
|
|
**Returns**
|
|
|
|
1. `{EdgeId : <any type>}`
|
|
|
|
### SimPersonAtTerminalSystem.getNumFreePlaces[🔗](#$api.engine.system~SimPersonAtTerminalSystem.getNumFreePlaces)
|
|
|
|
```
|
|
function SimPersonAtTerminalSystem.getNumFreePlaces(edgeId : EdgeId): integer
|
|
```
|
|
|
|
Gets number of free waiting places for the given transport network edge.
|
|
|
|
**Parameters**
|
|
|
|
* `edgeId` :`EdgeId` — the id of the edge that should be inspected
|
|
|
|
**Returns**
|
|
|
|
1. `integer`
|
|
|
|
### SimPersonAtTerminalSystem.getPos01[🔗](#$api.engine.system~SimPersonAtTerminalSystem.getPos01)
|
|
|
|
```
|
|
function SimPersonAtTerminalSystem.getPos01(edgeId : EdgeId, place : integer): {number, number}
|
|
```
|
|
|
|
Gets the position on the transport network edge for the given place.
|
|
|
|
**Parameters**
|
|
|
|
* `edgeId` :`EdgeId` — the id of the edge that should be inspected
|
|
* `place` :`integer` — the waiting place number
|
|
|
|
**Returns**
|
|
|
|
1. `{number, number}` — the position
|
|
|
|
### SimPersonAtVehicleSystem[🔗](#$api.engine.system~SimPersonAtVehicleSystem)
|
|
|
|
```
|
|
global record SimPersonAtVehicleSystem getVehiclePartInfoList: function(vehicleEntity : Engine.Entity): {VehiclePartInfo}
|
|
end
|
|
```
|
|
|
|
Sim Person At Vehicle System.
|
|
System managing persons travelling on a vehicle.
|
|
|
|
### SimPersonAtVehicleSystem.getVehiclePartInfoList[🔗](#$api.engine.system~SimPersonAtVehicleSystem.getVehiclePartInfoList)
|
|
|
|
```
|
|
function SimPersonAtVehicleSystem.getVehiclePartInfoList(vehicleEntity : Engine.Entity): {VehiclePartInfo}
|
|
```
|
|
|
|
Gets information about persons traveling on the given vehicle.
|
|
|
|
**Parameters**
|
|
|
|
* `vehicleEntity` :`Engine.Entity` — the entity of the vehicle that should be inspected
|
|
|
|
**Returns**
|
|
|
|
1. `{VehiclePartInfo}` — Information about each vehicle part
|
|
|
|
### SimPersonSystem[🔗](#$api.engine.system~SimPersonSystem)
|
|
|
|
```
|
|
global record SimPersonSystem getCount: function(): integer
|
|
getDestination2SpMap: function(): {Engine.Entity : {Engine.Entity}}
|
|
getSimPersonsAtTerminalForTransportNetwork: function(tnEntity : Engine.Entity): {Engine.Entity}
|
|
getSimPersonsForDestination: function(destination : Engine.Entity): {Engine.Entity}
|
|
getSimPersonsForLine: function(lineEntity : Engine.Entity): {Engine.Entity}
|
|
getSimPersonsForTarget: function(targetEntity : Engine.Entity): {Engine.Entity}
|
|
getSimPersonsIdleForTransportNetwork: function(tnEntity : Engine.Entity): {Engine.Entity}
|
|
getSimPersonsMovingForTransportNetwork: function(tnEntity : Engine.Entity): {Engine.Entity}
|
|
end
|
|
```
|
|
|
|
Sim Person System.
|
|
System managing persons.
|
|
|
|
### SimPersonSystem.getCount[🔗](#$api.engine.system~SimPersonSystem.getCount)
|
|
|
|
```
|
|
function SimPersonSystem.getCount(): integer
|
|
```
|
|
|
|
Gets number of people on the map.
|
|
|
|
**Returns**
|
|
|
|
1. `integer` — number of people
|
|
|
|
### SimPersonSystem.getDestination2SpMap[🔗](#$api.engine.system~SimPersonSystem.getDestination2SpMap)
|
|
|
|
```
|
|
function SimPersonSystem.getDestination2SpMap(): {Engine.Entity : {Engine.Entity}}
|
|
```
|
|
|
|
Gets list of people for every destination.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : {Engine.Entity}}`
|
|
|
|
### SimPersonSystem.getSimPersonsAtTerminalForTransportNetwork[🔗](#$api.engine.system~SimPersonSystem.getSimPersonsAtTerminalForTransportNetwork)
|
|
|
|
```
|
|
function SimPersonSystem.getSimPersonsAtTerminalForTransportNetwork(tnEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets all persons waiting at the given transport network.
|
|
|
|
**Parameters**
|
|
|
|
* `tnEntity` :`Engine.Entity` — the entity of the transport network
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### SimPersonSystem.getSimPersonsForDestination[🔗](#$api.engine.system~SimPersonSystem.getSimPersonsForDestination)
|
|
|
|
```
|
|
function SimPersonSystem.getSimPersonsForDestination(destination : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets all persons that have an entity as one of their destination.
|
|
Destinations are a home, a work and a shopping destination.
|
|
|
|
**Parameters**
|
|
|
|
* `destination` :`Engine.Entity` — the destination entity
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### SimPersonSystem.getSimPersonsForLine[🔗](#$api.engine.system~SimPersonSystem.getSimPersonsForLine)
|
|
|
|
```
|
|
function SimPersonSystem.getSimPersonsForLine(lineEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets all persons travelling with the given line.
|
|
|
|
**Parameters**
|
|
|
|
* `lineEntity` :`Engine.Entity` — the entity of the line
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### SimPersonSystem.getSimPersonsForTarget[🔗](#$api.engine.system~SimPersonSystem.getSimPersonsForTarget)
|
|
|
|
```
|
|
function SimPersonSystem.getSimPersonsForTarget(targetEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets all persons currently trying to reach given target.
|
|
|
|
**Parameters**
|
|
|
|
* `targetEntity` :`Engine.Entity` — the entity of the target
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### SimPersonSystem.getSimPersonsIdleForTransportNetwork[🔗](#$api.engine.system~SimPersonSystem.getSimPersonsIdleForTransportNetwork)
|
|
|
|
```
|
|
function SimPersonSystem.getSimPersonsIdleForTransportNetwork(tnEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets all idle persons on a transport network.
|
|
|
|
**Parameters**
|
|
|
|
* `tnEntity` :`Engine.Entity` — the entity of the transport network
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### SimPersonSystem.getSimPersonsMovingForTransportNetwork[🔗](#$api.engine.system~SimPersonSystem.getSimPersonsMovingForTransportNetwork)
|
|
|
|
```
|
|
function SimPersonSystem.getSimPersonsMovingForTransportNetwork(tnEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets all moving persons over a transport network.
|
|
|
|
**Parameters**
|
|
|
|
* `tnEntity` :`Engine.Entity` — the entity of the transport network
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### StationGroupSystem[🔗](#$api.engine.system~StationGroupSystem)
|
|
|
|
```
|
|
global record StationGroupSystem getExpiredStationGroups: function(time : integer): {Engine.Entity}
|
|
getExpiryProgress: function(stationGroupEntity : Engine.Entity, time : integer): number
|
|
getStationGroup: function(stationEntity : Engine.Entity): Engine.Entity
|
|
getCarriers: function(stationGroup : Engine.Entity, station : integer, terminal : integer): {{Carrier}, {TransportMode}}
|
|
end
|
|
```
|
|
|
|
Station Group System.
|
|
Contains cached information about station groups.
|
|
|
|
### StationGroupSystem.getExpiredStationGroups[🔗](#$api.engine.system~StationGroupSystem.getExpiredStationGroups)
|
|
|
|
```
|
|
function StationGroupSystem.getExpiredStationGroups(time : integer): {Engine.Entity}
|
|
```
|
|
|
|
Gets station groups that no longer contain stations and are thus about to be removed.
|
|
|
|
**Parameters**
|
|
|
|
* `time` :`integer` — the time stamp until when the stations with this condition are removed
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### StationGroupSystem.getExpiryProgress[🔗](#$api.engine.system~StationGroupSystem.getExpiryProgress)
|
|
|
|
```
|
|
function StationGroupSystem.getExpiryProgress(stationGroupEntity : Engine.Entity, time : integer): number
|
|
```
|
|
|
|
Gets progress on the removal of station groups.
|
|
|
|
**Parameters**
|
|
|
|
* `stationGroupEntity` :`Engine.Entity` — the entity of the station group that is about to be removed
|
|
* `time` :`integer` — the time for which th progress is requested
|
|
|
|
**Returns**
|
|
|
|
1. `number`
|
|
|
|
### StationGroupSystem.getStationGroup[🔗](#$api.engine.system~StationGroupSystem.getStationGroup)
|
|
|
|
```
|
|
function StationGroupSystem.getStationGroup(stationEntity : Engine.Entity): Engine.Entity
|
|
```
|
|
|
|
Obtains the station group to which the station belongs.
|
|
|
|
**Parameters**
|
|
|
|
* `stationEntity` :`Engine.Entity` — the entity of the station for which the parent station group is queried
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### StationGroupSystem.getCarriers[🔗](#$api.engine.system~StationGroupSystem.getCarriers)
|
|
|
|
```
|
|
function StationGroupSystem.getCarriers(stationGroup : Engine.Entity, station : integer, terminal : integer): {{Carrier}, {TransportMode}}
|
|
```
|
|
|
|
Gets the carriers of the station / terminal.
|
|
|
|
**Parameters**
|
|
|
|
* `stationGroup` :`Engine.Entity` — entity
|
|
* `station` :`integer` — The station index (or -1 to get superset over all terminals)
|
|
* `terminal` :`integer` — The terminal index inside the station (or -1 if station == -1)
|
|
|
|
**Returns**
|
|
|
|
1. `{{Carrier}, {TransportMode}}`
|
|
|
|
### StationSystem[🔗](#$api.engine.system~StationSystem)
|
|
|
|
```
|
|
global record StationSystem getPersonNodeId2StationTerminalsMap: function(): {NodeId : {{Engine.Entity, integer}}}
|
|
getStation2TownMap: function(): {Engine.Entity : Engine.Entity}
|
|
getStations: function(townEntity : Engine.Entity): {Engine.Entity}
|
|
getStationTerminalForVehicleNode: function(nodeId : NodeId): {Engine.Entity, integer}
|
|
getStationTerminalsForPersonEdge: function(nodeId : EdgeId): {{Engine.Entity, integer}}
|
|
getStationTerminalsForPersonNode: function(nodeId : NodeId): {{Engine.Entity, integer}}
|
|
getTown2StationsMap: function(): {Engine.Entity : {Engine.Entity}}
|
|
getTown: function(stationEntity : Engine.Entity): Engine.Entity
|
|
getVehicleNodeId2StationTerminalsMap: function(): {NodeId : {{Engine.Entity, integer}}}
|
|
forEach: function(Engine.Entity)
|
|
end
|
|
```
|
|
|
|
Station System.
|
|
Contains cached information about stations.
|
|
|
|
### StationSystem.getPersonNodeId2StationTerminalsMap[🔗](#$api.engine.system~StationSystem.getPersonNodeId2StationTerminalsMap)
|
|
|
|
```
|
|
function StationSystem.getPersonNodeId2StationTerminalsMap(): {NodeId : {{Engine.Entity, integer}}}
|
|
```
|
|
|
|
Gets all transport network nodes associated with a station terminal.
|
|
|
|
**Returns**
|
|
|
|
1. `{NodeId : {{Engine.Entity, integer}}}`
|
|
|
|
### StationSystem.getStation2TownMap[🔗](#$api.engine.system~StationSystem.getStation2TownMap)
|
|
|
|
```
|
|
function StationSystem.getStation2TownMap(): {Engine.Entity : Engine.Entity}
|
|
```
|
|
|
|
Gets a map from stations to towns.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : Engine.Entity}`
|
|
|
|
### StationSystem.getStations[🔗](#$api.engine.system~StationSystem.getStations)
|
|
|
|
```
|
|
function StationSystem.getStations(townEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets all stations in a town.
|
|
|
|
**Parameters**
|
|
|
|
* `townEntity` :`Engine.Entity` — the entity of the town that is queried for
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### StationSystem.getStationTerminalForVehicleNode[🔗](#$api.engine.system~StationSystem.getStationTerminalForVehicleNode)
|
|
|
|
```
|
|
function StationSystem.getStationTerminalForVehicleNode(nodeId : NodeId): {Engine.Entity, integer}
|
|
```
|
|
|
|
Gets the station terminal to which the node belongs.
|
|
|
|
**Parameters**
|
|
|
|
* `nodeId` :`NodeId` — the vehicle node id that is queried for
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity, integer}`
|
|
|
|
### StationSystem.getStationTerminalsForPersonEdge[🔗](#$api.engine.system~StationSystem.getStationTerminalsForPersonEdge)
|
|
|
|
```
|
|
function StationSystem.getStationTerminalsForPersonEdge(nodeId : EdgeId): {{Engine.Entity, integer}}
|
|
```
|
|
|
|
Gets the station terminals to which the person edge belongs.
|
|
|
|
**Parameters**
|
|
|
|
* `nodeId` :`EdgeId` — the edge id that is queried for
|
|
|
|
**Returns**
|
|
|
|
1. `{{Engine.Entity, integer}}`
|
|
|
|
### StationSystem.getStationTerminalsForPersonNode[🔗](#$api.engine.system~StationSystem.getStationTerminalsForPersonNode)
|
|
|
|
```
|
|
function StationSystem.getStationTerminalsForPersonNode(nodeId : NodeId): {{Engine.Entity, integer}}
|
|
```
|
|
|
|
Gets the station terminals to which the person node belongs.
|
|
|
|
**Parameters**
|
|
|
|
* `nodeId` :`NodeId` — the person node id that is queried for
|
|
|
|
**Returns**
|
|
|
|
1. `{{Engine.Entity, integer}}`
|
|
|
|
### StationSystem.getTown2StationsMap[🔗](#$api.engine.system~StationSystem.getTown2StationsMap)
|
|
|
|
```
|
|
function StationSystem.getTown2StationsMap(): {Engine.Entity : {Engine.Entity}}
|
|
```
|
|
|
|
Gets all station grouped by towns.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : {Engine.Entity}}`
|
|
|
|
### StationSystem.getTown[🔗](#$api.engine.system~StationSystem.getTown)
|
|
|
|
```
|
|
function StationSystem.getTown(stationEntity : Engine.Entity): Engine.Entity
|
|
```
|
|
|
|
Gets a the town of the station.
|
|
|
|
**Parameters**
|
|
|
|
* `stationEntity` :`Engine.Entity` — the entity of the station that is queried for
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### StationSystem.getVehicleNodeId2StationTerminalsMap[🔗](#$api.engine.system~StationSystem.getVehicleNodeId2StationTerminalsMap)
|
|
|
|
```
|
|
function StationSystem.getVehicleNodeId2StationTerminalsMap(): {NodeId : {{Engine.Entity, integer}}}
|
|
```
|
|
|
|
Gets the mapping from vehicle node to station terminal.
|
|
|
|
**Returns**
|
|
|
|
1. `{NodeId : {{Engine.Entity, integer}}}`
|
|
|
|
### StationSystem.forEach[🔗](#$api.engine.system~StationSystem.forEach)
|
|
|
|
```
|
|
function StationSystem.forEach(Engine.Entity)
|
|
```
|
|
|
|
Loops over all stations.
|
|
|
|
**Parameters**
|
|
|
|
* `Engine.Entity`
|
|
|
|
### StockListSystem[🔗](#$api.engine.system~StockListSystem)
|
|
|
|
```
|
|
global record StockListSystemend
|
|
```
|
|
|
|
Stock List System.
|
|
Manages stocks.
|
|
|
|
### StreetConnectorSystem[🔗](#$api.engine.system~StreetConnectorSystem)
|
|
|
|
```
|
|
global record StreetConnectorSystem getConstructionEntityForDepot: function(depotEntity : Engine.Entity): Engine.Entity
|
|
getConstructionEntityForEdge: function(edgeEntity : Engine.Entity): Engine.Entity
|
|
getConstructionEntityForIndustry: function(industryEntity : Engine.Entity): Engine.Entity
|
|
getConstructionEntityForNode: function(nodeEntity : Engine.Entity): Engine.Entity
|
|
getConstructionEntityForSubconstruction: function(subconstruction : Engine.Entity): Engine.Entity
|
|
getConstructionEntityForStation: function(stationEntity : Engine.Entity): Engine.Entity
|
|
getConstructionEntityForTownBuilding: function(townBuilding : Engine.Entity): Engine.Entity
|
|
getNode2StreetConnectorMap: function(): {Engine.Entity : Engine.Entity}
|
|
getStation2ConstructionMap: function(): {Engine.Entity : Engine.Entity}
|
|
forEachConstructionWithMetadata: function(metadataKey : string, constructionDescMeta : boolean, constructionInstanceMeta : boolean, fn : function(Engine.Entity, Engine.Component.Construction, ConstructionId), playerOwnedOnly : boolean)
|
|
getConstructionIdIfStaticMetadata: function(constructionEntity : Engine.Entity, metadataKey : string): {ConstructionId, ResName}
|
|
getConstructionClosestTown: function(constructionEntity : Engine.Entity): Engine.Entity
|
|
getTownClosestConstructions: function(townEntity : Engine.Entity): {Engine.Entity}
|
|
forEach: function(Engine.Entity)
|
|
end
|
|
```
|
|
|
|
Street Connector System.
|
|
Manages street connections.
|
|
|
|
### StreetConnectorSystem.getConstructionEntityForDepot[🔗](#$api.engine.system~StreetConnectorSystem.getConstructionEntityForDepot)
|
|
|
|
```
|
|
function StreetConnectorSystem.getConstructionEntityForDepot(depotEntity : Engine.Entity): Engine.Entity
|
|
```
|
|
|
|
Gets all sources for the destination entity.
|
|
|
|
**Parameters**
|
|
|
|
* `depotEntity` :`Engine.Entity` — the entity for which the containing construction should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### StreetConnectorSystem.getConstructionEntityForEdge[🔗](#$api.engine.system~StreetConnectorSystem.getConstructionEntityForEdge)
|
|
|
|
```
|
|
function StreetConnectorSystem.getConstructionEntityForEdge(edgeEntity : Engine.Entity): Engine.Entity
|
|
```
|
|
|
|
Gets the construction that "owns" the given edge.
|
|
|
|
**Parameters**
|
|
|
|
* `edgeEntity` :`Engine.Entity` — the entity for which the containing construction should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### StreetConnectorSystem.getConstructionEntityForIndustry[🔗](#$api.engine.system~StreetConnectorSystem.getConstructionEntityForIndustry)
|
|
|
|
```
|
|
function StreetConnectorSystem.getConstructionEntityForIndustry(industryEntity : Engine.Entity): Engine.Entity
|
|
```
|
|
|
|
Gets the construction for the industry.
|
|
|
|
**Parameters**
|
|
|
|
* `industryEntity` :`Engine.Entity` — the entity for which the containing construction should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### StreetConnectorSystem.getConstructionEntityForNode[🔗](#$api.engine.system~StreetConnectorSystem.getConstructionEntityForNode)
|
|
|
|
```
|
|
function StreetConnectorSystem.getConstructionEntityForNode(nodeEntity : Engine.Entity): Engine.Entity
|
|
```
|
|
|
|
Gets the construction to which the node (a frozen node in the construction) belongs.
|
|
|
|
**Parameters**
|
|
|
|
* `nodeEntity` :`Engine.Entity` — the entity for which the containing construction should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### StreetConnectorSystem.getConstructionEntityForSubconstruction[🔗](#$api.engine.system~StreetConnectorSystem.getConstructionEntityForSubconstruction)
|
|
|
|
```
|
|
function StreetConnectorSystem.getConstructionEntityForSubconstruction(subconstruction : Engine.Entity): Engine.Entity
|
|
```
|
|
|
|
Gets the construction for the subconstruction.
|
|
|
|
**Parameters**
|
|
|
|
* `subconstruction` :`Engine.Entity` — the entity for which the containing construction should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### StreetConnectorSystem.getConstructionEntityForStation[🔗](#$api.engine.system~StreetConnectorSystem.getConstructionEntityForStation)
|
|
|
|
```
|
|
function StreetConnectorSystem.getConstructionEntityForStation(stationEntity : Engine.Entity): Engine.Entity
|
|
```
|
|
|
|
Gets the construction for the station.
|
|
|
|
**Parameters**
|
|
|
|
* `stationEntity` :`Engine.Entity` — the entity for which the containing construction should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### StreetConnectorSystem.getConstructionEntityForTownBuilding[🔗](#$api.engine.system~StreetConnectorSystem.getConstructionEntityForTownBuilding)
|
|
|
|
```
|
|
function StreetConnectorSystem.getConstructionEntityForTownBuilding(townBuilding : Engine.Entity): Engine.Entity
|
|
```
|
|
|
|
Gets the construction for the town building.
|
|
|
|
**Parameters**
|
|
|
|
* `townBuilding` :`Engine.Entity` — the entity for which the containing construction should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### StreetConnectorSystem.getNode2StreetConnectorMap[🔗](#$api.engine.system~StreetConnectorSystem.getNode2StreetConnectorMap)
|
|
|
|
```
|
|
function StreetConnectorSystem.getNode2StreetConnectorMap(): {Engine.Entity : Engine.Entity}
|
|
```
|
|
|
|
Gets a mapping from frozen nodes to the construction they belong.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : Engine.Entity}`
|
|
|
|
### StreetConnectorSystem.getStation2ConstructionMap[🔗](#$api.engine.system~StreetConnectorSystem.getStation2ConstructionMap)
|
|
|
|
```
|
|
function StreetConnectorSystem.getStation2ConstructionMap(): {Engine.Entity : Engine.Entity}
|
|
```
|
|
|
|
Gets a mapping from stations to constructions.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : Engine.Entity}`
|
|
|
|
### StreetConnectorSystem.forEachConstructionWithMetadata[🔗](#$api.engine.system~StreetConnectorSystem.forEachConstructionWithMetadata)
|
|
|
|
```
|
|
function StreetConnectorSystem.forEachConstructionWithMetadata(metadataKey : string, constructionDescMeta : boolean, constructionInstanceMeta : boolean, fn : function(Engine.Entity, Engine.Component.Construction, ConstructionId), playerOwnedOnly : boolean)
|
|
```
|
|
|
|
Loop over all constructions that have the specified metadata key in their static description.
|
|
|
|
**Parameters**
|
|
|
|
* `metadataKey` :`string` — metadata key
|
|
* `constructionDescMeta` :`boolean` — if static metadata should be checked (on match, the callback's constructionId is >= 0)
|
|
* `constructionInstanceMeta` :`boolean` — if instance metadata should be checked
|
|
* `fn` :`function(Engine.Entity, Engine.Component.Construction, ConstructionId)` — the callback called for each entity with the given component and its entry in constructionRep
|
|
* `playerOwnedOnly` :`boolean` — if true, then skip constructions owned by other player or not owned at all
|
|
|
|
### StreetConnectorSystem.getConstructionIdIfStaticMetadata[🔗](#$api.engine.system~StreetConnectorSystem.getConstructionIdIfStaticMetadata)
|
|
|
|
```
|
|
function StreetConnectorSystem.getConstructionIdIfStaticMetadata(constructionEntity : Engine.Entity, metadataKey : string): {ConstructionId, ResName}
|
|
```
|
|
|
|
Loop over all constructions that have the specified metadata key in their static description.
|
|
|
|
**Parameters**
|
|
|
|
* `constructionEntity` :`Engine.Entity` — the entity to check
|
|
* `metadataKey` :`string` — metadata key
|
|
|
|
**Returns**
|
|
|
|
1. `{ConstructionId, ResName}`
|
|
|
|
### StreetConnectorSystem.getConstructionClosestTown[🔗](#$api.engine.system~StreetConnectorSystem.getConstructionClosestTown)
|
|
|
|
```
|
|
function StreetConnectorSystem.getConstructionClosestTown(constructionEntity : Engine.Entity): Engine.Entity
|
|
```
|
|
|
|
Gets the closest town to the construction.
|
|
|
|
**Parameters**
|
|
|
|
* `constructionEntity` :`Engine.Entity` — the entity for which the closest town should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### StreetConnectorSystem.getTownClosestConstructions[🔗](#$api.engine.system~StreetConnectorSystem.getTownClosestConstructions)
|
|
|
|
```
|
|
function StreetConnectorSystem.getTownClosestConstructions(townEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets constructions for which the town is the closest.
|
|
|
|
**Parameters**
|
|
|
|
* `townEntity` :`Engine.Entity` — the entity for which the closest constructions should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### StreetConnectorSystem.forEach[🔗](#$api.engine.system~StreetConnectorSystem.forEach)
|
|
|
|
```
|
|
function StreetConnectorSystem.forEach(Engine.Entity)
|
|
```
|
|
|
|
Loops over all constructions.
|
|
|
|
**Parameters**
|
|
|
|
* `Engine.Entity`
|
|
|
|
### StreetSystem[🔗](#$api.engine.system~StreetSystem)
|
|
|
|
```
|
|
global record StreetSystem getEdgeForEdgeObject: function(edgeEntity : Engine.Entity): Engine.Entity
|
|
getEdgeObject2EdgeMap: function(): {Engine.Entity : Engine.Entity}
|
|
getNode2SegmentMap: function(): {Engine.Entity : {Engine.Entity}}
|
|
getNode2StreetEdgeMap: function(): {Engine.Entity : {Engine.Entity}}
|
|
getNode2TrackEdgeMap: function(): {Engine.Entity : {Engine.Entity}}
|
|
isTownCrossingNode: function(Engine.Entity): boolean
|
|
getNodeSegments: function(nodeEntity : Engine.Entity): {Engine.Entity}
|
|
getNodeStreetSegments: function(nodeEntity : Engine.Entity): {Engine.Entity}
|
|
getNodeTrackSegments: function(nodeEntity : Engine.Entity): {Engine.Entity}
|
|
end
|
|
```
|
|
|
|
Street System.
|
|
Manages base edges.
|
|
|
|
### StreetSystem.getEdgeForEdgeObject[🔗](#$api.engine.system~StreetSystem.getEdgeForEdgeObject)
|
|
|
|
```
|
|
function StreetSystem.getEdgeForEdgeObject(edgeEntity : Engine.Entity): Engine.Entity
|
|
```
|
|
|
|
Obtains the edge to which the edge object belongs.
|
|
|
|
**Parameters**
|
|
|
|
* `edgeEntity` :`Engine.Entity` — the entity of the edge object
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### StreetSystem.getEdgeObject2EdgeMap[🔗](#$api.engine.system~StreetSystem.getEdgeObject2EdgeMap)
|
|
|
|
```
|
|
function StreetSystem.getEdgeObject2EdgeMap(): {Engine.Entity : Engine.Entity}
|
|
```
|
|
|
|
Obtains the mapping from edge object to edges they belong.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : Engine.Entity}`
|
|
|
|
### StreetSystem.getNode2SegmentMap[🔗](#$api.engine.system~StreetSystem.getNode2SegmentMap)
|
|
|
|
```
|
|
function StreetSystem.getNode2SegmentMap(): {Engine.Entity : {Engine.Entity}}
|
|
```
|
|
|
|
Obtains a map from all base nodes to base segments they are connected with.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : {Engine.Entity}}`
|
|
|
|
### StreetSystem.getNode2StreetEdgeMap[🔗](#$api.engine.system~StreetSystem.getNode2StreetEdgeMap)
|
|
|
|
```
|
|
function StreetSystem.getNode2StreetEdgeMap(): {Engine.Entity : {Engine.Entity}}
|
|
```
|
|
|
|
Obtains a map from all base nodes to base street segments they are connected with.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : {Engine.Entity}}`
|
|
|
|
### StreetSystem.getNode2TrackEdgeMap[🔗](#$api.engine.system~StreetSystem.getNode2TrackEdgeMap)
|
|
|
|
```
|
|
function StreetSystem.getNode2TrackEdgeMap(): {Engine.Entity : {Engine.Entity}}
|
|
```
|
|
|
|
Obtains a map from all base nodes to base track segments they are connected with.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : {Engine.Entity}}`
|
|
|
|
### StreetSystem.isTownCrossingNode[🔗](#$api.engine.system~StreetSystem.isTownCrossingNode)
|
|
|
|
```
|
|
function StreetSystem.isTownCrossingNode(Engine.Entity): boolean
|
|
```
|
|
|
|
Checks if the node is a town crossing.
|
|
|
|
**Parameters**
|
|
|
|
* `Engine.Entity`
|
|
|
|
**Returns**
|
|
|
|
1. `boolean`
|
|
|
|
### StreetSystem.getNodeSegments[🔗](#$api.engine.system~StreetSystem.getNodeSegments)
|
|
|
|
```
|
|
function StreetSystem.getNodeSegments(nodeEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Returns the node segments.
|
|
|
|
**Parameters**
|
|
|
|
* `nodeEntity` :`Engine.Entity` — the entity of the node
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### StreetSystem.getNodeStreetSegments[🔗](#$api.engine.system~StreetSystem.getNodeStreetSegments)
|
|
|
|
```
|
|
function StreetSystem.getNodeStreetSegments(nodeEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Returns the node street segments.
|
|
|
|
**Parameters**
|
|
|
|
* `nodeEntity` :`Engine.Entity` — the entity of the node
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### StreetSystem.getNodeTrackSegments[🔗](#$api.engine.system~StreetSystem.getNodeTrackSegments)
|
|
|
|
```
|
|
function StreetSystem.getNodeTrackSegments(nodeEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Returns the node track segments.
|
|
|
|
**Parameters**
|
|
|
|
* `nodeEntity` :`Engine.Entity` — the entity of the node
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### TownBuildingSystem[🔗](#$api.engine.system~TownBuildingSystem)
|
|
|
|
```
|
|
global record TownBuildingSystem getBuilding: function(parcelEntity : Engine.Entity): Engine.Entity
|
|
getCargoSupplyAndLimit: function(townEntity : Engine.Entity, LandUseType): {CargoTypeId : {number, number, integer}}
|
|
getLandUsePersonCapacities: function(townEntity : Engine.Entity): {integer}
|
|
getParcel2BuildingMap: function(): {Engine.Entity : Engine.Entity}
|
|
getPersonCapacity2townBuildingMap: function(): {Engine.Entity : Engine.Entity}
|
|
getTown2BuildingMap: function(): {Engine.Entity : {Engine.Entity}}
|
|
getTown2personCapacitiesMap: function(): {Engine.Entity : {integer}}
|
|
hasBuilding: function(parcelEntity : Engine.Entity): boolean
|
|
end
|
|
```
|
|
|
|
Town Building System.
|
|
Manages town buildings and parcels.
|
|
|
|
### TownBuildingSystem.getBuilding[🔗](#$api.engine.system~TownBuildingSystem.getBuilding)
|
|
|
|
```
|
|
function TownBuildingSystem.getBuilding(parcelEntity : Engine.Entity): Engine.Entity
|
|
```
|
|
|
|
Obtains the building (if any) that is placed on the given parcel.
|
|
|
|
**Parameters**
|
|
|
|
* `parcelEntity` :`Engine.Entity` — the entity of the parcel
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### TownBuildingSystem.getCargoSupplyAndLimit[🔗](#$api.engine.system~TownBuildingSystem.getCargoSupplyAndLimit)
|
|
|
|
```
|
|
function TownBuildingSystem.getCargoSupplyAndLimit(townEntity : Engine.Entity, LandUseType): {CargoTypeId : {number, number, integer}}
|
|
```
|
|
|
|
Obtains information about towns and cargo.
|
|
|
|
**Parameters**
|
|
|
|
* `townEntity` :`Engine.Entity` — the entity of the town
|
|
* `LandUseType`
|
|
|
|
**Returns**
|
|
|
|
1. `{CargoTypeId : {number, number, integer}}`
|
|
|
|
### TownBuildingSystem.getLandUsePersonCapacities[🔗](#$api.engine.system~TownBuildingSystem.getLandUsePersonCapacities)
|
|
|
|
```
|
|
function TownBuildingSystem.getLandUsePersonCapacities(townEntity : Engine.Entity): {integer}
|
|
```
|
|
|
|
Obtains information about land use and person capacities.
|
|
|
|
**Parameters**
|
|
|
|
* `townEntity` :`Engine.Entity` — the entity of the town
|
|
|
|
**Returns**
|
|
|
|
1. `{integer}`
|
|
|
|
### TownBuildingSystem.getParcel2BuildingMap[🔗](#$api.engine.system~TownBuildingSystem.getParcel2BuildingMap)
|
|
|
|
```
|
|
function TownBuildingSystem.getParcel2BuildingMap(): {Engine.Entity : Engine.Entity}
|
|
```
|
|
|
|
Obtains map from parcel to building occupying the parcel.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : Engine.Entity}`
|
|
|
|
### TownBuildingSystem.getPersonCapacity2townBuildingMap[🔗](#$api.engine.system~TownBuildingSystem.getPersonCapacity2townBuildingMap)
|
|
|
|
```
|
|
function TownBuildingSystem.getPersonCapacity2townBuildingMap(): {Engine.Entity : Engine.Entity}
|
|
```
|
|
|
|
Obtains map from person capacities to town buildings.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : Engine.Entity}`
|
|
|
|
### TownBuildingSystem.getTown2BuildingMap[🔗](#$api.engine.system~TownBuildingSystem.getTown2BuildingMap)
|
|
|
|
```
|
|
function TownBuildingSystem.getTown2BuildingMap(): {Engine.Entity : {Engine.Entity}}
|
|
```
|
|
|
|
Obtains map from town to town buildings of the town.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : {Engine.Entity}}`
|
|
|
|
### TownBuildingSystem.getTown2personCapacitiesMap[🔗](#$api.engine.system~TownBuildingSystem.getTown2personCapacitiesMap)
|
|
|
|
```
|
|
function TownBuildingSystem.getTown2personCapacitiesMap(): {Engine.Entity : {integer}}
|
|
```
|
|
|
|
Obtains map from town to person capacities of the town.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : {integer}}` — a map of town to an array of integer. {integer} is an array of 3 ints capa per landuse: { RESIDENTIAL, COMMERCIAL, INDUSTRIAL }
|
|
|
|
### TownBuildingSystem.hasBuilding[🔗](#$api.engine.system~TownBuildingSystem.hasBuilding)
|
|
|
|
```
|
|
function TownBuildingSystem.hasBuilding(parcelEntity : Engine.Entity): boolean
|
|
```
|
|
|
|
Checks if parcel is occupied by building.
|
|
|
|
**Parameters**
|
|
|
|
* `parcelEntity` :`Engine.Entity` — the entity of the parcel
|
|
|
|
**Returns**
|
|
|
|
1. `boolean`
|
|
|
|
### TpNetLinkSystem[🔗](#$api.engine.system~TpNetLinkSystem)
|
|
|
|
```
|
|
global record TpNetLinkSystem getEdgeId2linkEntities: function(): {EdgeId : {Engine.Entity}}
|
|
getLinkEntities: function(edgeId : EdgeId): {Engine.Entity}
|
|
end
|
|
```
|
|
|
|
Transport Network Link System.
|
|
Manages transport networks links (small links between roads and constructions).
|
|
|
|
### TpNetLinkSystem.getEdgeId2linkEntities[🔗](#$api.engine.system~TpNetLinkSystem.getEdgeId2linkEntities)
|
|
|
|
```
|
|
function TpNetLinkSystem.getEdgeId2linkEntities(): {EdgeId : {Engine.Entity}}
|
|
```
|
|
|
|
Gets a map from all edges to the links touching the edge.
|
|
|
|
**Returns**
|
|
|
|
1. `{EdgeId : {Engine.Entity}}`
|
|
|
|
### TpNetLinkSystem.getLinkEntities[🔗](#$api.engine.system~TpNetLinkSystem.getLinkEntities)
|
|
|
|
```
|
|
function TpNetLinkSystem.getLinkEntities(edgeId : EdgeId): {Engine.Entity}
|
|
```
|
|
|
|
Gets all links within a transport network edge.
|
|
|
|
**Parameters**
|
|
|
|
* `edgeId` :`EdgeId` — the edge id for which the links should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### TransportNetworkSystem[🔗](#$api.engine.system~TransportNetworkSystem)
|
|
|
|
```
|
|
global record TransportNetworkSystem getIntersections: function(tnEntity : Engine.Entity): {<any type>}
|
|
getTpNetData: function(): TpNetData
|
|
end
|
|
```
|
|
|
|
Transport Network System.
|
|
Manages transport networks (and transport network edges and nodes).
|
|
|
|
### TransportNetworkSystem.getIntersections[🔗](#$api.engine.system~TransportNetworkSystem.getIntersections)
|
|
|
|
```
|
|
function TransportNetworkSystem.getIntersections(tnEntity : Engine.Entity): {<any type>}
|
|
```
|
|
|
|
Gets all intersections within a transport network (e.g. all intersections in a base node).
|
|
|
|
**Parameters**
|
|
|
|
* `tnEntity` :`Engine.Entity` — the entity of the transport network
|
|
|
|
**Returns**
|
|
|
|
1. `{<any type>}`
|
|
|
|
### TransportNetworkSystem.getTpNetData[🔗](#$api.engine.system~TransportNetworkSystem.getTpNetData)
|
|
|
|
```
|
|
function TransportNetworkSystem.getTpNetData(): TpNetData
|
|
```
|
|
|
|
Gets a structure representing the graph of the transport network.
|
|
|
|
**Returns**
|
|
|
|
1. `TpNetData`
|
|
|
|
### TransportVehicleSystem[🔗](#$api.engine.system~TransportVehicleSystem)
|
|
|
|
```
|
|
global record TransportVehicleSystem getDepotVehicles: function(depotEntity : Engine.Entity): {Engine.Entity}
|
|
getGoingToDepotVehicles: function(depotEntity : Engine.Entity): {Engine.Entity}
|
|
getInfo: function(transportVehicleEntity : Engine.Entity): any
|
|
getLine2VehicleMap: function(): {Engine.Entity : {Engine.Entity}}
|
|
getLineStopVehicles: function(lineEntity : Engine.Entity, stopIndex : number): {Engine.Entity}
|
|
checkLineStopForVehicleOverlength: function(lineEntity : Engine.Entity, stopIndex : number): {StationTerminal : boolean}
|
|
getLineVehicles: function(lineEntity : Engine.Entity): {Engine.Entity}
|
|
getNoPathVehicles: function(): {Engine.Entity}
|
|
getVehicleNames: function(carrier : Carrier): {string}
|
|
getVehicles: function(tnEntities : {Engine.Entity}, wholePath : boolean): {Engine.Entity}
|
|
getVehiclesWithState: function(state : TransportVehicleState): {Engine.Entity}
|
|
getVehiclesForMaintenanceStation: function(maintenanceStation : Engine.Entity): {Engine.Entity}
|
|
isVehicleMaintainedByStation: function(vehicle : Engine.Entity, maintenanceStation : Engine.Entity): boolean
|
|
getLineCargoInfo: function(lineEntity : Engine.Entity, cargoTypeId : CargoTypeId): LineCargoInfo
|
|
end
|
|
```
|
|
|
|
Transport Vehicle System.
|
|
Manages the movement and behaviour of transport vehicles. This covers all vehicles transporting cargo and passengers.
|
|
|
|
### TransportVehicleSystem.getDepotVehicles[🔗](#$api.engine.system~TransportVehicleSystem.getDepotVehicles)
|
|
|
|
```
|
|
function TransportVehicleSystem.getDepotVehicles(depotEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets all vehicles that are in a depot.
|
|
|
|
**Parameters**
|
|
|
|
* `depotEntity` :`Engine.Entity` — the entity of the depot
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### TransportVehicleSystem.getGoingToDepotVehicles[🔗](#$api.engine.system~TransportVehicleSystem.getGoingToDepotVehicles)
|
|
|
|
```
|
|
function TransportVehicleSystem.getGoingToDepotVehicles(depotEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets all vehicles heading for the depot.
|
|
|
|
**Parameters**
|
|
|
|
* `depotEntity` :`Engine.Entity` — the entity of the depot
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### TransportVehicleSystem.getInfo[🔗](#$api.engine.system~TransportVehicleSystem.getInfo)
|
|
|
|
```
|
|
function TransportVehicleSystem.getInfo(transportVehicleEntity : Engine.Entity): any
|
|
```
|
|
|
|
Gets additional information about the vehicle.
|
|
|
|
**Parameters**
|
|
|
|
* `transportVehicleEntity` :`Engine.Entity` — the entity of the transport vehicle
|
|
|
|
**Returns**
|
|
|
|
1. `any` — info about the transport vehicle
|
|
|
|
### TransportVehicleSystem.getLine2VehicleMap[🔗](#$api.engine.system~TransportVehicleSystem.getLine2VehicleMap)
|
|
|
|
```
|
|
function TransportVehicleSystem.getLine2VehicleMap(): {Engine.Entity : {Engine.Entity}}
|
|
```
|
|
|
|
Gets a map of lines to the vehicles using the line.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity : {Engine.Entity}}`
|
|
|
|
### TransportVehicleSystem.getLineStopVehicles[🔗](#$api.engine.system~TransportVehicleSystem.getLineStopVehicles)
|
|
|
|
```
|
|
function TransportVehicleSystem.getLineStopVehicles(lineEntity : Engine.Entity, stopIndex : number): {Engine.Entity}
|
|
```
|
|
|
|
Gets the vehicle stopped at the stop of a line.
|
|
|
|
**Parameters**
|
|
|
|
* `lineEntity` :`Engine.Entity` — the entity of the line
|
|
* `stopIndex` :`number` — the index of the stop on the line
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### TransportVehicleSystem.checkLineStopForVehicleOverlength[🔗](#$api.engine.system~TransportVehicleSystem.checkLineStopForVehicleOverlength)
|
|
|
|
```
|
|
function TransportVehicleSystem.checkLineStopForVehicleOverlength(lineEntity : Engine.Entity, stopIndex : number): {StationTerminal : boolean}
|
|
```
|
|
|
|
Checks whether the specified stop has terminals that are too short for optimal loading.
|
|
|
|
**Parameters**
|
|
|
|
* `lineEntity` :`Engine.Entity` — the entity of the line
|
|
* `stopIndex` :`number` — the index of the stop on the line
|
|
|
|
**Returns**
|
|
|
|
1. `{StationTerminal : boolean}`
|
|
|
|
### TransportVehicleSystem.getLineVehicles[🔗](#$api.engine.system~TransportVehicleSystem.getLineVehicles)
|
|
|
|
```
|
|
function TransportVehicleSystem.getLineVehicles(lineEntity : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets all vehicles using a given line.
|
|
|
|
**Parameters**
|
|
|
|
* `lineEntity` :`Engine.Entity` — the entity of the line
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### TransportVehicleSystem.getNoPathVehicles[🔗](#$api.engine.system~TransportVehicleSystem.getNoPathVehicles)
|
|
|
|
```
|
|
function TransportVehicleSystem.getNoPathVehicles(): {Engine.Entity}
|
|
```
|
|
|
|
Gets all vehicles that cannot find a path to their destination.
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### TransportVehicleSystem.getVehicleNames[🔗](#$api.engine.system~TransportVehicleSystem.getVehicleNames)
|
|
|
|
```
|
|
function TransportVehicleSystem.getVehicleNames(carrier : Carrier): {string}
|
|
```
|
|
|
|
Gets the vehicle names of all vehicles for the given carrier.
|
|
|
|
**Parameters**
|
|
|
|
* `carrier` :`Carrier` — the carrier for which the names should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `{string}`
|
|
|
|
### TransportVehicleSystem.getVehicles[🔗](#$api.engine.system~TransportVehicleSystem.getVehicles)
|
|
|
|
```
|
|
function TransportVehicleSystem.getVehicles(tnEntities : {Engine.Entity}, wholePath : boolean): {Engine.Entity}
|
|
```
|
|
|
|
Gets the vehicle using a certain transport network.
|
|
|
|
**Parameters**
|
|
|
|
* `tnEntities` :`{Engine.Entity}` — list of transport network entities
|
|
* `wholePath` :`boolean` — true if the vehicle has to use the whole path
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### TransportVehicleSystem.getVehiclesWithState[🔗](#$api.engine.system~TransportVehicleSystem.getVehiclesWithState)
|
|
|
|
```
|
|
function TransportVehicleSystem.getVehiclesWithState(state : TransportVehicleState): {Engine.Entity}
|
|
```
|
|
|
|
Gets all vehicles that are in the given state. This can be used, for instance, to obtain a list of all vehicles
|
|
currently waiting at a terminal.
|
|
|
|
**Parameters**
|
|
|
|
* `state` :`TransportVehicleState` — A state to filter the vehicles
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### TransportVehicleSystem.getVehiclesForMaintenanceStation[🔗](#$api.engine.system~TransportVehicleSystem.getVehiclesForMaintenanceStation)
|
|
|
|
```
|
|
function TransportVehicleSystem.getVehiclesForMaintenanceStation(maintenanceStation : Engine.Entity): {Engine.Entity}
|
|
```
|
|
|
|
Gets all vehicles that are maintained by the given maintenance station.
|
|
|
|
**Parameters**
|
|
|
|
* `maintenanceStation` :`Engine.Entity` — the entity of the maintenance station
|
|
|
|
**Returns**
|
|
|
|
1. `{Engine.Entity}`
|
|
|
|
### TransportVehicleSystem.isVehicleMaintainedByStation[🔗](#$api.engine.system~TransportVehicleSystem.isVehicleMaintainedByStation)
|
|
|
|
```
|
|
function TransportVehicleSystem.isVehicleMaintainedByStation(vehicle : Engine.Entity, maintenanceStation : Engine.Entity): boolean
|
|
```
|
|
|
|
Checks if the vehicle is maintained by the given maintenance station.
|
|
|
|
**Parameters**
|
|
|
|
* `vehicle` :`Engine.Entity` — the entity of the vehicle
|
|
* `maintenanceStation` :`Engine.Entity` — the entity of the maintenance station
|
|
|
|
**Returns**
|
|
|
|
1. `boolean`
|
|
|
|
### TransportVehicleSystem.getLineCargoInfo[🔗](#$api.engine.system~TransportVehicleSystem.getLineCargoInfo)
|
|
|
|
```
|
|
function TransportVehicleSystem.getLineCargoInfo(lineEntity : Engine.Entity, cargoTypeId : CargoTypeId): LineCargoInfo
|
|
```
|
|
|
|
Gets cargo info for a line.
|
|
|
|
**Parameters**
|
|
|
|
* `lineEntity` :`Engine.Entity` — the entity of the line
|
|
* `cargoTypeId` :`CargoTypeId` — the id of the cargo type
|
|
|
|
**Returns**
|
|
|
|
1. `LineCargoInfo`
|
|
|
|
### VehicleDepotSystem[🔗](#$api.engine.system~VehicleDepotSystem)
|
|
|
|
```
|
|
global record VehicleDepotSystem getDepotForInNodeId: function(nodeId : NodeId): Engine.Entity
|
|
forEach: function(Engine.Entity)
|
|
end
|
|
```
|
|
|
|
Vehicle Depot System.
|
|
Manages depots and vehicles in depots.
|
|
|
|
### VehicleDepotSystem.getDepotForInNodeId[🔗](#$api.engine.system~VehicleDepotSystem.getDepotForInNodeId)
|
|
|
|
```
|
|
function VehicleDepotSystem.getDepotForInNodeId(nodeId : NodeId): Engine.Entity
|
|
```
|
|
|
|
Gets the depot entity to which the node belongs.
|
|
|
|
**Parameters**
|
|
|
|
* `nodeId` :`NodeId` — the id of the node for which the depot should be fetched
|
|
|
|
**Returns**
|
|
|
|
1. `Engine.Entity`
|
|
|
|
### VehicleDepotSystem.forEach[🔗](#$api.engine.system~VehicleDepotSystem.forEach)
|
|
|
|
```
|
|
function VehicleDepotSystem.forEach(Engine.Entity)
|
|
```
|
|
|
|
Loops over all depots.
|
|
|
|
**Parameters**
|
|
|
|
* `Engine.Entity`
|