Module 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 endglobal record AircraftMoveSystem
getAirCraftInfo: function(vehicleEntity : Engine.Entity): AircraftInfo isReserved: function(edgeId : EdgeId): boolean forEach: function(Engine.Entity) endglobal record BaseParallelStripSystem
getStrips: function(edgeEntity : Engine.Entity): {Engine.Entity} endglobal record CarriageListSystem
getVehicleInfo: function(vehicleEntity : Engine.Entity): CarriageInfo getVehicleData: function(vehicleEntity : Engine.Entity): VehicleData forEach: function(Engine.Entity) endrecord CarriageInfo
owningVehicle: Engine.Entity index: integer offset: number reversed: boolean crew: boolean endglobal 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} endglobal record EmissionGridSystem
getInterpolatedEmission: function(pos : Vec2f, useAverage : boolean, type : Engine.Component.EmissionGrid.Type): number getEmissionGridEntity: function(noise : boolean): Engine.Entity endglobal record GridCollision
getGridCollisionSystem: function(index : integer): GridCollisionSystem getPlayerInfrastructureCollisionSystem: function(): GridCollisionSystem endglobal record GridCollisionSystem
getCollisionDataAt: function(GridCollisionSystem, Vec2f): number endglobal record LandVehicleMoveSystem
getBlockedTrains: function(): {{Engine.Entity, Engine.Entity}} getVehicleInfo: function(vehicleEntity : Engine.Entity): LandVehicleMoveInfo isTrainWaitingForFreePath: function(trainEntity : Engine.Entity): boolean forEach: function(Engine.Entity) endglobal record LandmarkSystem
getLandmarkData: function(landmarkEntity : Engine.Entity): {EdgeId : number} endglobal 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} endglobal record OctreeSystem
findIntersectingEntities: function(box : Box3f, callback : function(Engine.Entity, Engine.Component.BoundingVolume)) endglobal record ParcelSystem
getParcelData: function(segmentEntity : Engine.Entity): any getSegment2ParcelData: function(): {Engine.Entity : <any type>} endglobal record RailRoadCrossingSystem
getRailroadCrossingForEdge: function(edgeEntity : Engine.Entity): Engine.Entity getRailroadCrossingForNode: function(nodeEntity : Engine.Entity): Engine.Entity endglobal record RunwaySystem
getLandingNodeIdMap: function(): {NodeId : Engine.Entity} getTakeoffNodeIdMap: function(): {NodeId : Engine.Entity} endglobal record ShipMoveSystem
getShipInfo: function(vehicleEntity : Engine.Entity): ShipInfo forEach: function(Engine.Entity) endglobal record SimCargoSystem
endglobal 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 endglobal record SimEntityAtTerminalSystem
getLineStopSimEntitiesCount: function(entity : Engine.Entity, stopIndex : integer, cargoType : CargoTypeId): integer getLineStopSimEntities: function(entity : Engine.Entity, stopIndex : integer, cargoType : CargoTypeId): {Engine.Entity} endglobal 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} endglobal record SimPersonAtBuildingSystem
getSimPersonAtBuilding: function(simBuildingEntity : Engine.Entity): {Engine.Entity} endglobal record SimPersonAtTerminalSystem
getEdgeInfoMap: function(): {EdgeId : <any type>} getNumFreePlaces: function(edgeId : EdgeId): integer getPos01: function(edgeId : EdgeId, place : integer): {number, number} endglobal record SimPersonAtVehicleSystem
getVehiclePartInfoList: function(vehicleEntity : Engine.Entity): {VehiclePartInfo} endglobal 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} endglobal 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}} endglobal 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) endglobal record StockListSystem
endglobal 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) endglobal 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} endglobal 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 endglobal record TpNetLinkSystem
getEdgeId2linkEntities: function(): {EdgeId : {Engine.Entity}} getLinkEntities: function(edgeId : EdgeId): {Engine.Entity} endglobal record TransportNetworkSystem
getIntersections: function(tnEntity : Engine.Entity): {<any type>} getTpNetData: function(): TpNetData endglobal 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 endglobal record VehicleDepotSystem
getDepotForInNodeId: function(nodeId : NodeId): Engine.Entity forEach: function(Engine.Entity) end
Category: main🔗
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🔗
System.animalMoveSystem: AnimalMoveSystem
Controls animal simulation and movement
System.aircraftMoveSystem🔗
System.aircraftMoveSystem: AircraftMoveSystem
Controls aircraft (helicopters and airplanes) simulation (reservation, pathing, ...) and movement
System.baseParallelStripSystem🔗
System.baseParallelStripSystem: BaseParallelStripSystem
A cache of data that is computed from parallel strip data
System.carriageListSystem🔗
System.carriageListSystem: CarriageListSystem
A cache of data for carriage lists
System.catchmentAreaSystem🔗
System.catchmentAreaSystem: CatchmentAreaSystem
System.emissionGridSystem🔗
System.emissionGridSystem: EmissionGridSystem
System.gameScriptSystem🔗
System.gameScriptSystem: GameScriptSystem
System.landVehicleMoveSystem🔗
System.landVehicleMoveSystem: LandVehicleMoveSystem
System.landmarkSystem🔗
System.landmarkSystem: LandmarkSystem
System.lineSystem🔗
System.lineSystem: LineSystem
Manages all line data
System.octreeSystem🔗
System.octreeSystem: OctreeSystem
Efficient way to collect entities in a specific region of space
System.parcelSystem🔗
System.parcelSystem: ParcelSystem
Manages parcels for towns, and provides inverse relation from segment to parcels
System.railRoadCrossingSystem🔗
System.railRoadCrossingSystem: RailRoadCrossingSystem
System.riverSystem🔗
System.riverSystem: RiverSystem
Create a vector field of waterfronts for street and construction alignment
System.runwaySystem🔗
System.runwaySystem: RunwaySystem
System.shipMoveSystem🔗
System.shipMoveSystem: ShipMoveSystem
System.signalSystem🔗
System.signalSystem: SignalSystem
System.simCargoSystem🔗
System.simCargoSystem: SimCargoSystem
System.simPersonSystem🔗
System.simPersonSystem: SimPersonSystem
System.simPersonAtBuildingSystem🔗
System.simPersonAtBuildingSystem: SimPersonAtBuildingSystem
System.simPersonAtTerminalSystem🔗
System.simPersonAtTerminalSystem: SimPersonAtTerminalSystem
System.simPersonAtVehicleSystem🔗
System.simPersonAtVehicleSystem: SimPersonAtVehicleSystem
System.simEntityAtStockSystem🔗
System.simEntityAtStockSystem: SimEntityAtStockSystem
System.simEntityAtTerminalSystem🔗
System.simEntityAtTerminalSystem: SimEntityAtTerminalSystem
System.simEntityAtVehicleSystem🔗
System.simEntityAtVehicleSystem: SimEntityAtVehicleSystem
System.stationSystem🔗
System.stationSystem: StationSystem
System.stationGroupSystem🔗
System.stationGroupSystem: StationGroupSystem
System.stockListSystem🔗
System.stockListSystem: StockListSystem
System.streetSystem🔗
System.streetSystem: StreetSystem
System.streetConnectorSystem🔗
System.streetConnectorSystem: StreetConnectorSystem
Caches relations between constructions and base edges
System.townBuildingSystem🔗
System.townBuildingSystem: TownBuildingSystem
System.tpNetLinkSystem🔗
System.tpNetLinkSystem: TpNetLinkSystem
System.transportNetworkSystem🔗
System.transportNetworkSystem: TransportNetworkSystem
System.transportVehicleSystem🔗
System.transportVehicleSystem: TransportVehicleSystem
Manages cargo loading and unloading, as well as arrival of any transport vehicle
System.vehicleDepotSystem🔗
System.vehicleDepotSystem: VehicleDepotSystem
Manages door animation of depots
System.gridCollision🔗
System.gridCollision: GridCollision
A generic system representing a 2d grid in the world of miscelaneous data
Category: globals🔗
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🔗
function AircraftMoveSystem.getAirCraftInfo(vehicleEntity : Engine.Entity): AircraftInfo
Obtains Aircraft information for the given entity.
ParametersvehicleEntity:Engine.Entity— the entity id of the aircraft that should be inspected
AircraftInfo
AircraftMoveSystem.isReserved🔗
function AircraftMoveSystem.isReserved(edgeId : EdgeId): boolean
Checks if a given edge is reserved by an aircraft.
ParametersedgeId:EdgeId— the edgeId that should be inspected
boolean— true if reserved
AircraftMoveSystem.forEach🔗
function AircraftMoveSystem.forEach(Engine.Entity)
Loops over all aircraft.
ParametersEngine.Entity
AnimalMoveSystem🔗
Animal Move System.
Manages animals.
AnimalMoveSystem.forEach🔗
function AnimalMoveSystem.forEach(Engine.Entity)
Loops over all animals.
ParametersEngine.Entity
BaseParallelStripSystem🔗
global record BaseParallelStripSystem
getStrips: function(edgeEntity : Engine.Entity): {Engine.Entity} end
Base Parallel Strip System.
Contain information about parallel edge ranges.
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).
ParametersedgeEntity:Engine.Entity— the entity of the edge that should be inspected
{Engine.Entity}
CarriageListSystem🔗
global record CarriageListSystem
getVehicleInfo: function(vehicleEntity : Engine.Entity): CarriageInfo getVehicleData: function(vehicleEntity : Engine.Entity): VehicleData forEach: function(Engine.Entity) endrecord CarriageInfo
owningVehicle: Engine.Entity index: integer offset: number reversed: boolean crew: boolean end
Carriage list System.
Manages vehicles that are groups of multiple carriages.
CarriageListSystem.CarriageInfo🔗
record CarriageListSystem.CarriageInfo
owningVehicle: Engine.Entity index: integer offset: number reversed: boolean crew: boolean end
CarriageListSystem.CarriageInfo.owningVehicle🔗
CarriageListSystem.CarriageInfo.owningVehicle: Engine.Entity
CarriageListSystem.CarriageInfo.index🔗
CarriageListSystem.CarriageInfo.index: integer
CarriageListSystem.CarriageInfo.offset🔗
CarriageListSystem.CarriageInfo.offset: number
CarriageListSystem.CarriageInfo.reversed🔗
CarriageListSystem.CarriageInfo.reversed: boolean
CarriageListSystem.CarriageInfo.crew🔗
CarriageListSystem.CarriageInfo.crew: boolean
CarriageListSystem.getVehicleInfo🔗
function CarriageListSystem.getVehicleInfo(vehicleEntity : Engine.Entity): CarriageInfo
Gets more information about a train carriage/engine.
ParametersvehicleEntity:Engine.Entity— the entity of the vehicle.
CarriageInfo
CarriageListSystem.getVehicleData🔗
function CarriageListSystem.getVehicleData(vehicleEntity : Engine.Entity): VehicleData
Gets more information about a train carriage/engine.
ParametersvehicleEntity:Engine.Entity— the entity of the vehicle.
VehicleData
CarriageListSystem.forEach🔗
function CarriageListSystem.forEach(Engine.Entity)
Loops over all carriage lists.
ParametersEngine.Entity
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🔗
function CatchmentAreaSystem.getEdge2stationsMap(): {EdgeId : {{Engine.Entity, integer}}}
Obtains a map mapping transport network edges to stations that can be reached from that edge.
Returns{EdgeId : {{Engine.Entity, integer}}}
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{Engine.Entity : {{EdgeId, integer}}}
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.
{Engine.Entity : {Engine.Entity : integer}}
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.
ParametersstationEntity:Engine.Entity— the entity of the stationcargo:boolean— wether to return cargo or passenger catchables
{Engine.Entity}
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🔗
function EmissionGridSystem.getInterpolatedEmission(pos : Vec2f, useAverage : boolean, type : Engine.Component.EmissionGrid.Type): number
Returns the interpolated emission at a given position.
Parameterspos:Vec2f— the position at which the emission should be sampleduseAverage:boolean— whether to use average or nottype:Engine.Component.EmissionGrid.Type— the type of emission to query
number— the interpolated emission value
EmissionGridSystem.getEmissionGridEntity🔗
function EmissionGridSystem.getEmissionGridEntity(noise : boolean): Engine.Entity
Returns the EmissionGrid entity for the noise or pollution
Parametersnoise:boolean— Which type of emission: noise or pollution
Engine.Entity— an entity with the EmissionGrid component
GameScriptSystem🔗
Game Script System
Manages entities and components for gamescript.
GameScriptSystem.getEntityForGameScript🔗
function GameScriptSystem.getEntityForGameScript(name : string): Engine.Entity
Gets the entity onto which the gamescript state is attached
Parametersname:string— the name of the gamescript
Engine.Entity
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🔗
function GridCollision.getGridCollisionSystem(index : integer): GridCollisionSystem
Gets the grid collision system with the given index.
Parametersindex:integer— the index of the system to get
GridCollisionSystem
GridCollision.getPlayerInfrastructureCollisionSystem🔗
function GridCollision.getPlayerInfrastructureCollisionSystem(): GridCollisionSystem
Gets the grid collision system tracking player owned structures.
ReturnsGridCollisionSystem
GridCollisionSystem🔗
global record GridCollisionSystem
getCollisionDataAt: function(GridCollisionSystem, Vec2f): number end
Grid Collision System.
Single instance of the grid collision system.
GridCollisionSystem.getCollisionDataAt🔗
function GridCollisionSystem.getCollisionDataAt(GridCollisionSystem, Vec2f): number
Gets collision data at a given position (0 = no collision)
ParametersGridCollisionSystemVec2f
number
ISystem🔗
ISystem.forEach🔗
function ISystem.forEach(Engine.Entity)Parameters
Engine.Entity
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🔗
function LandVehicleMoveSystem.getBlockedTrains(): {{Engine.Entity, Engine.Entity}}
Gets all trains that are blocked by another train.
Returns{{Engine.Entity, Engine.Entity}}
LandVehicleMoveSystem.getVehicleInfo🔗
function LandVehicleMoveSystem.getVehicleInfo(vehicleEntity : Engine.Entity): LandVehicleMoveInfo
Gets more information about a vehicle.
ParametersvehicleEntity:Engine.Entity— the entity of the vehicle.
LandVehicleMoveInfo
LandVehicleMoveSystem.isTrainWaitingForFreePath🔗
function LandVehicleMoveSystem.isTrainWaitingForFreePath(trainEntity : Engine.Entity): boolean
Checks if a train is waiting for a free path.
ParameterstrainEntity:Engine.Entity— the entity of the train.
boolean
LandVehicleMoveSystem.forEach🔗
function LandVehicleMoveSystem.forEach(Engine.Entity)
Loops over all trains.
ParametersEngine.Entity
LandmarkSystem🔗
global record LandmarkSystem
getLandmarkData: function(landmarkEntity : Engine.Entity): {EdgeId : number} end
Landmark system.
Manages landmarks data.
LandmarkSystem.getLandmarkData🔗
function LandmarkSystem.getLandmarkData(landmarkEntity : Engine.Entity): {EdgeId : number}
Returns distances from landmark entity to transport network edges.
ParameterslandmarkEntity:Engine.Entity— entity of the landmark
{EdgeId : number}
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🔗
function LineSystem.getLines(): {Engine.Entity}
Gets all lines on the map.
Returns{Engine.Entity}— line entities
LineSystem.getLinesForPlayer🔗
function LineSystem.getLinesForPlayer(playerEntity : Engine.Entity): {Engine.Entity}
Gets all lines belonging to the player.
ParametersplayerEntity:Engine.Entity— the player for which the lines should be fetched
{Engine.Entity}— line entities
LineSystem.getLinesForWaypoint🔗
function LineSystem.getLinesForWaypoint(waypointEntity : Engine.Entity): {Engine.Entity}
Gets all lines going through a waypoint.
ParameterswaypointEntity:Engine.Entity— the waypoint for which the lines should be fetched
{Engine.Entity}— line entities
LineSystem.getLinesForWaypointLane🔗
function LineSystem.getLinesForWaypointLane(waypointEntity : Engine.Entity, signalIndex : integer): {{Engine.Entity, integer, integer}}
Gets all line waypoints at the specific signal+lane
ParameterswaypointEntity:Engine.Entity— the signalList entitysignalIndex:integer— the signal index inside the SignalList
{{Engine.Entity, integer, integer}}
LineSystem.getLineStops🔗
function LineSystem.getLineStops(stationGroupEntity : Engine.Entity): {{Engine.Entity, integer}}
Gets all lines stopping at a station group.
ParametersstationGroupEntity:Engine.Entity— the stationGroup for which the lines should be fetched
{{Engine.Entity, integer}}
LineSystem.getLineStopsForStation🔗
function LineSystem.getLineStopsForStation(stationEntity : Engine.Entity): {{Engine.Entity, integer}}
Gets all lines stopping at a station.
ParametersstationEntity:Engine.Entity— the station for which the lines should be fetched
{{Engine.Entity, integer}}
LineSystem.getLineStopsForTerminal🔗
function LineSystem.getLineStopsForTerminal(stationEntity : Engine.Entity, terminal : integer): {{Engine.Entity, integer}}
Gets all lines stopping at a terminal.
ParametersstationEntity:Engine.Entity— the station for which the lines should be fetchedterminal:integer— the terminal of the station for which the lines should be fetched
{{Engine.Entity, integer}}
LineSystem.getLinesForStationGroup🔗
function LineSystem.getLinesForStationGroup(stationGroup : Engine.Entity): {Engine.Entity}
Gets all lines for the given station group.
ParametersstationGroup:Engine.Entity— the stationGroup for which the lines should be fetched
{Engine.Entity}— line entities
LineSystem.getProblemLines🔗
function LineSystem.getProblemLines(playerEntity : Engine.Entity): {{Engine.Entity, LineProblem}}
Gets all lines having an issue, and the issue in question.
ParametersplayerEntity:Engine.Entity— the player for which the lines should be fetched
{{Engine.Entity, LineProblem}}
LineSystem.getStationGroup2LineStopsMap🔗
function LineSystem.getStationGroup2LineStopsMap(): {Engine.Entity : {{Engine.Entity, integer}}}
Gets all stops in a station group.
Returns{Engine.Entity : {{Engine.Entity, integer}}}
LineSystem.getTerminal2lineStops🔗
function LineSystem.getTerminal2lineStops(): {{Engine.Entity, integer} : {{Engine.Entity, integer}}}
Gets all stops in a terminal.
Returns{{Engine.Entity, integer} : {{Engine.Entity, integer}}}
LineSystem.getBestLineAssignment🔗
function LineSystem.getBestLineAssignment(lineEntity : Engine.Entity, lineData : Engine.Component.Line, allowTerminalChanges : boolean): {StationTerminal}
Gets best terminal assignments for line.
ParameterslineEntity:Engine.Entity— the line for which the computation should happenlineData:Engine.Component.Line— the line component data, stops may have station = -1 and terminal = -1allowTerminalChanges:boolean—
{StationTerminal}
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🔗
function OctreeSystem.findIntersectingEntities(box : Box3f, callback : function(Engine.Entity, Engine.Component.BoundingVolume))
Fetches all entities in a box and runs a callback for them.
Parametersbox: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🔗
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🔗
function ParcelSystem.getParcelData(segmentEntity : Engine.Entity): any
Obtains all parcels belonging to a segment.
ParameterssegmentEntity:Engine.Entity— the segment of which to obtain all attached parcels
any
ParcelSystem.getSegment2ParcelData🔗
function ParcelSystem.getSegment2ParcelData(): {Engine.Entity : <any type>}
Obtains a map of all segments to the parcel data of the segment.
Returns{Engine.Entity : <any type>}
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🔗
function RailRoadCrossingSystem.getRailroadCrossingForEdge(edgeEntity : Engine.Entity): Engine.Entity
Gets all railroad crossings of the given base edge entity.
ParametersedgeEntity:Engine.Entity— the entity id of the edge that should be inspected
Engine.Entity
RailRoadCrossingSystem.getRailroadCrossingForNode🔗
function RailRoadCrossingSystem.getRailroadCrossingForNode(nodeEntity : Engine.Entity): Engine.Entity
Gets all railroad crossings of the given base node entity.
ParametersnodeEntity:Engine.Entity— the entity id of the node that should be inspected
Engine.Entity
RiverSystem🔗
River System.
Contains information about water in the map.
RiverSystem.getWaterMeshEntities🔗
function RiverSystem.getWaterMeshEntities(Vec2i, Vec2i): {Engine.Entity}
Gets all water meshes within the bounds.
ParametersVec2iVec2i
{Engine.Entity}
RunwaySystem🔗
global record RunwaySystem
getLandingNodeIdMap: function(): {NodeId : Engine.Entity} getTakeoffNodeIdMap: function(): {NodeId : Engine.Entity} end
Runway System.
Contains information about runway edges.
RunwaySystem.getLandingNodeIdMap🔗
function RunwaySystem.getLandingNodeIdMap(): {NodeId : Engine.Entity}
Gets all stations reachable from that landing node.
Returns{NodeId : Engine.Entity}
RunwaySystem.getTakeoffNodeIdMap🔗
function RunwaySystem.getTakeoffNodeIdMap(): {NodeId : Engine.Entity}
Gets all station from which the takeoff node can reached.
Returns{NodeId : Engine.Entity}
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🔗
function ShipMoveSystem.getShipInfo(vehicleEntity : Engine.Entity): ShipInfo
Gets more path and movement information about ships.
ParametersvehicleEntity:Engine.Entity— the entity id of the ship that should be inspected
ShipInfo
ShipMoveSystem.forEach🔗
function ShipMoveSystem.forEach(Engine.Entity)
Loops over all ships.
ParametersEngine.Entity
SignalSystem🔗
Signal System.
Contains information about Signals (waypoints, path and one way signals)
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.
edgeId:EdgeId— the id of the edge hosting the signalreversed:boolean— false if signal in direction of edge is requested
SignalId
SimCargoSystem🔗
global record SimCargoSystem
end
Cargo System.
System managing cargo.
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🔗
function SimEntityAtStockSystem.getStock2SimEntityMap(): {{Engine.Entity, StockId} : {Engine.Entity}}
Obtains a map, mapping the stock to the cargo waiting there.
Returns{{Engine.Entity, StockId} : {Engine.Entity}}
SimEntityAtStockSystem.getStockCount🔗
function SimEntityAtStockSystem.getStockCount(stockEntity : Engine.Entity, stockId : StockId): integer
Obtains the amount of specific item id waiting at a given stock.
ParametersstockEntity:Engine.Entity— the entity of the stock holding entity, e.g. industrystockId:StockId— the id of the stock
integer
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.
ParametersstockEntity:Engine.Entity— the entity of the stock holding entity, e.g. industrystockId:StockId— the id of the stockcargoTypeId:CargoTypeId— the id of the cargo type
integer
SimEntityAtStockSystem.getStockEntities🔗
function SimEntityAtStockSystem.getStockEntities(stockEntity : Engine.Entity, stockId : StockId): {{integer, Engine.Entity}}
Obtains all entities waiting at a given stock.
ParametersstockEntity:Engine.Entity— the entity of the stock holding entity, e.g. industrystockId:StockId— the id of the stock
{{integer, Engine.Entity}}
SimEntityAtStockSystem.getStockSimEntity🔗
function SimEntityAtStockSystem.getStockSimEntity(stockEntity : Engine.Entity, stockId : StockId): Engine.Entity
Obtains the entity that was waiting longest at a given stock.
ParametersstockEntity:Engine.Entity— the entity of the stock holding entity, e.g. industrystockId:StockId— the id of the stock
Engine.Entity
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🔗
function SimEntityAtTerminalSystem.getLineStopSimEntitiesCount(entity : Engine.Entity, stopIndex : integer, cargoType : CargoTypeId): integer
Gets the count of entities (SimPersons) waiting at the terminal.
Parametersentity:Engine.Entity— the line entitystopIndex:integer— the index of the stop in the linecargoType:CargoTypeId— the id of the cargo type
integer— the count of entities at that line stop
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.
Parametersentity:Engine.Entity— the line entitystopIndex:integer— the index of the stop in the linecargoType:CargoTypeId— the id of the cargo type
{Engine.Entity}— the sim entities of the given cargo type at that line stop
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🔗
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{Engine.Entity : {CargoTypeId : {Engine.Entity}}}
SimEntityAtVehicleSystem.getVehicleSimEntitiesCount🔗
function SimEntityAtVehicleSystem.getVehicleSimEntitiesCount(vehicleEntity : Engine.Entity): integer
Gets the count of entities in the vehicle.
ParametersvehicleEntity:Engine.Entity— the entity of the vehicle that should be inspected
integer— the count of entities
SimEntityAtVehicleSystem.getVehicleSimEntitiesCountForCargoType🔗
function SimEntityAtVehicleSystem.getVehicleSimEntitiesCountForCargoType(vehicleEntity : Engine.Entity, cargoType : CargoTypeId): integer
Gets the count of entities in the vehicle for the given cargo type.
ParametersvehicleEntity:Engine.Entity— the entity of the vehicle that should be inspectedcargoType:CargoTypeId— the id of the cargo type
integer— the count of entities
SimEntityAtVehicleSystem.getVehiclesWithRoundTripCount🔗
function SimEntityAtVehicleSystem.getVehiclesWithRoundTripCount(): {Engine.Entity : integer}
Gets the vehicles with their round trip cargo counts.
Returns{Engine.Entity : integer}— the vehicles with their round trip cargo counts
SimPersonAtBuildingSystem🔗
global record SimPersonAtBuildingSystem
getSimPersonAtBuilding: function(simBuildingEntity : Engine.Entity): {Engine.Entity} end
Person At Building System.
System managing persons at a building.
SimPersonAtBuildingSystem.getSimPersonAtBuilding🔗
function SimPersonAtBuildingSystem.getSimPersonAtBuilding(simBuildingEntity : Engine.Entity): {Engine.Entity}
Gets list of entities currently at the building
ParameterssimBuildingEntity:Engine.Entity— the entity of the building that should be inspected
{Engine.Entity}
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🔗
function SimPersonAtTerminalSystem.getEdgeInfoMap(): {EdgeId : <any type>}
Gets information about persons waiting at the terminals.
Returns{EdgeId : <any type>}
SimPersonAtTerminalSystem.getNumFreePlaces🔗
function SimPersonAtTerminalSystem.getNumFreePlaces(edgeId : EdgeId): integer
Gets number of free waiting places for the given transport network edge.
ParametersedgeId:EdgeId— the id of the edge that should be inspected
integer
SimPersonAtTerminalSystem.getPos01🔗
function SimPersonAtTerminalSystem.getPos01(edgeId : EdgeId, place : integer): {number, number}
Gets the position on the transport network edge for the given place.
ParametersedgeId:EdgeId— the id of the edge that should be inspectedplace:integer— the waiting place number
{number, number}— the position
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🔗
function SimPersonAtVehicleSystem.getVehiclePartInfoList(vehicleEntity : Engine.Entity): {VehiclePartInfo}
Gets information about persons traveling on the given vehicle.
ParametersvehicleEntity:Engine.Entity— the entity of the vehicle that should be inspected
{VehiclePartInfo}— Information about each vehicle part
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🔗
function SimPersonSystem.getCount(): integer
Gets number of people on the map.
Returnsinteger— number of people
SimPersonSystem.getDestination2SpMap🔗
function SimPersonSystem.getDestination2SpMap(): {Engine.Entity : {Engine.Entity}}
Gets list of people for every destination.
Returns{Engine.Entity : {Engine.Entity}}
SimPersonSystem.getSimPersonsAtTerminalForTransportNetwork🔗
function SimPersonSystem.getSimPersonsAtTerminalForTransportNetwork(tnEntity : Engine.Entity): {Engine.Entity}
Gets all persons waiting at the given transport network.
ParameterstnEntity:Engine.Entity— the entity of the transport network
{Engine.Entity}
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.
destination:Engine.Entity— the destination entity
{Engine.Entity}
SimPersonSystem.getSimPersonsForLine🔗
function SimPersonSystem.getSimPersonsForLine(lineEntity : Engine.Entity): {Engine.Entity}
Gets all persons travelling with the given line.
ParameterslineEntity:Engine.Entity— the entity of the line
{Engine.Entity}
SimPersonSystem.getSimPersonsForTarget🔗
function SimPersonSystem.getSimPersonsForTarget(targetEntity : Engine.Entity): {Engine.Entity}
Gets all persons currently trying to reach given target.
ParameterstargetEntity:Engine.Entity— the entity of the target
{Engine.Entity}
SimPersonSystem.getSimPersonsIdleForTransportNetwork🔗
function SimPersonSystem.getSimPersonsIdleForTransportNetwork(tnEntity : Engine.Entity): {Engine.Entity}
Gets all idle persons on a transport network.
ParameterstnEntity:Engine.Entity— the entity of the transport network
{Engine.Entity}
SimPersonSystem.getSimPersonsMovingForTransportNetwork🔗
function SimPersonSystem.getSimPersonsMovingForTransportNetwork(tnEntity : Engine.Entity): {Engine.Entity}
Gets all moving persons over a transport network.
ParameterstnEntity:Engine.Entity— the entity of the transport network
{Engine.Entity}
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🔗
function StationGroupSystem.getExpiredStationGroups(time : integer): {Engine.Entity}
Gets station groups that no longer contain stations and are thus about to be removed.
Parameterstime:integer— the time stamp until when the stations with this condition are removed
{Engine.Entity}
StationGroupSystem.getExpiryProgress🔗
function StationGroupSystem.getExpiryProgress(stationGroupEntity : Engine.Entity, time : integer): number
Gets progress on the removal of station groups.
ParametersstationGroupEntity:Engine.Entity— the entity of the station group that is about to be removedtime:integer— the time for which th progress is requested
number
StationGroupSystem.getStationGroup🔗
function StationGroupSystem.getStationGroup(stationEntity : Engine.Entity): Engine.Entity
Obtains the station group to which the station belongs.
ParametersstationEntity:Engine.Entity— the entity of the station for which the parent station group is queried
Engine.Entity
StationGroupSystem.getCarriers🔗
function StationGroupSystem.getCarriers(stationGroup : Engine.Entity, station : integer, terminal : integer): {{Carrier}, {TransportMode}}
Gets the carriers of the station / terminal.
ParametersstationGroup:Engine.Entity— entitystation: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)
{{Carrier}, {TransportMode}}
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🔗
function StationSystem.getPersonNodeId2StationTerminalsMap(): {NodeId : {{Engine.Entity, integer}}}
Gets all transport network nodes associated with a station terminal.
Returns{NodeId : {{Engine.Entity, integer}}}
StationSystem.getStation2TownMap🔗
function StationSystem.getStation2TownMap(): {Engine.Entity : Engine.Entity}
Gets a map from stations to towns.
Returns{Engine.Entity : Engine.Entity}
StationSystem.getStations🔗
function StationSystem.getStations(townEntity : Engine.Entity): {Engine.Entity}
Gets all stations in a town.
ParameterstownEntity:Engine.Entity— the entity of the town that is queried for
{Engine.Entity}
StationSystem.getStationTerminalForVehicleNode🔗
function StationSystem.getStationTerminalForVehicleNode(nodeId : NodeId): {Engine.Entity, integer}
Gets the station terminal to which the node belongs.
ParametersnodeId:NodeId— the vehicle node id that is queried for
{Engine.Entity, integer}
StationSystem.getStationTerminalsForPersonEdge🔗
function StationSystem.getStationTerminalsForPersonEdge(nodeId : EdgeId): {{Engine.Entity, integer}}
Gets the station terminals to which the person edge belongs.
ParametersnodeId:EdgeId— the edge id that is queried for
{{Engine.Entity, integer}}
StationSystem.getStationTerminalsForPersonNode🔗
function StationSystem.getStationTerminalsForPersonNode(nodeId : NodeId): {{Engine.Entity, integer}}
Gets the station terminals to which the person node belongs.
ParametersnodeId:NodeId— the person node id that is queried for
{{Engine.Entity, integer}}
StationSystem.getTown2StationsMap🔗
function StationSystem.getTown2StationsMap(): {Engine.Entity : {Engine.Entity}}
Gets all station grouped by towns.
Returns{Engine.Entity : {Engine.Entity}}
StationSystem.getTown🔗
function StationSystem.getTown(stationEntity : Engine.Entity): Engine.Entity
Gets a the town of the station.
ParametersstationEntity:Engine.Entity— the entity of the station that is queried for
Engine.Entity
StationSystem.getVehicleNodeId2StationTerminalsMap🔗
function StationSystem.getVehicleNodeId2StationTerminalsMap(): {NodeId : {{Engine.Entity, integer}}}
Gets the mapping from vehicle node to station terminal.
Returns{NodeId : {{Engine.Entity, integer}}}
StationSystem.forEach🔗
function StationSystem.forEach(Engine.Entity)
Loops over all stations.
ParametersEngine.Entity
StockListSystem🔗
global record StockListSystem
end
Stock List System.
Manages stocks.
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🔗
function StreetConnectorSystem.getConstructionEntityForDepot(depotEntity : Engine.Entity): Engine.Entity
Gets all sources for the destination entity.
ParametersdepotEntity:Engine.Entity— the entity for which the containing construction should be fetched
Engine.Entity
StreetConnectorSystem.getConstructionEntityForEdge🔗
function StreetConnectorSystem.getConstructionEntityForEdge(edgeEntity : Engine.Entity): Engine.Entity
Gets the construction that "owns" the given edge.
ParametersedgeEntity:Engine.Entity— the entity for which the containing construction should be fetched
Engine.Entity
StreetConnectorSystem.getConstructionEntityForIndustry🔗
function StreetConnectorSystem.getConstructionEntityForIndustry(industryEntity : Engine.Entity): Engine.Entity
Gets the construction for the industry.
ParametersindustryEntity:Engine.Entity— the entity for which the containing construction should be fetched
Engine.Entity
StreetConnectorSystem.getConstructionEntityForNode🔗
function StreetConnectorSystem.getConstructionEntityForNode(nodeEntity : Engine.Entity): Engine.Entity
Gets the construction to which the node (a frozen node in the construction) belongs.
ParametersnodeEntity:Engine.Entity— the entity for which the containing construction should be fetched
Engine.Entity
StreetConnectorSystem.getConstructionEntityForSubconstruction🔗
function StreetConnectorSystem.getConstructionEntityForSubconstruction(subconstruction : Engine.Entity): Engine.Entity
Gets the construction for the subconstruction.
Parameterssubconstruction:Engine.Entity— the entity for which the containing construction should be fetched
Engine.Entity
StreetConnectorSystem.getConstructionEntityForStation🔗
function StreetConnectorSystem.getConstructionEntityForStation(stationEntity : Engine.Entity): Engine.Entity
Gets the construction for the station.
ParametersstationEntity:Engine.Entity— the entity for which the containing construction should be fetched
Engine.Entity
StreetConnectorSystem.getConstructionEntityForTownBuilding🔗
function StreetConnectorSystem.getConstructionEntityForTownBuilding(townBuilding : Engine.Entity): Engine.Entity
Gets the construction for the town building.
ParameterstownBuilding:Engine.Entity— the entity for which the containing construction should be fetched
Engine.Entity
StreetConnectorSystem.getNode2StreetConnectorMap🔗
function StreetConnectorSystem.getNode2StreetConnectorMap(): {Engine.Entity : Engine.Entity}
Gets a mapping from frozen nodes to the construction they belong.
Returns{Engine.Entity : Engine.Entity}
StreetConnectorSystem.getStation2ConstructionMap🔗
function StreetConnectorSystem.getStation2ConstructionMap(): {Engine.Entity : Engine.Entity}
Gets a mapping from stations to constructions.
Returns{Engine.Entity : Engine.Entity}
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.
ParametersmetadataKey:string— metadata keyconstructionDescMeta:boolean— if static metadata should be checked (on match, the callback's constructionId is >= 0)constructionInstanceMeta:boolean— if instance metadata should be checkedfn:function(Engine.Entity, Engine.Component.Construction, ConstructionId)— the callback called for each entity with the given component and its entry in constructionRepplayerOwnedOnly:boolean— if true, then skip constructions owned by other player or not owned at all
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.
ParametersconstructionEntity:Engine.Entity— the entity to checkmetadataKey:string— metadata key
{ConstructionId, ResName}
StreetConnectorSystem.getConstructionClosestTown🔗
function StreetConnectorSystem.getConstructionClosestTown(constructionEntity : Engine.Entity): Engine.Entity
Gets the closest town to the construction.
ParametersconstructionEntity:Engine.Entity— the entity for which the closest town should be fetched
Engine.Entity
StreetConnectorSystem.getTownClosestConstructions🔗
function StreetConnectorSystem.getTownClosestConstructions(townEntity : Engine.Entity): {Engine.Entity}
Gets constructions for which the town is the closest.
ParameterstownEntity:Engine.Entity— the entity for which the closest constructions should be fetched
{Engine.Entity}
StreetConnectorSystem.forEach🔗
function StreetConnectorSystem.forEach(Engine.Entity)
Loops over all constructions.
ParametersEngine.Entity
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🔗
function StreetSystem.getEdgeForEdgeObject(edgeEntity : Engine.Entity): Engine.Entity
Obtains the edge to which the edge object belongs.
ParametersedgeEntity:Engine.Entity— the entity of the edge object
Engine.Entity
StreetSystem.getEdgeObject2EdgeMap🔗
function StreetSystem.getEdgeObject2EdgeMap(): {Engine.Entity : Engine.Entity}
Obtains the mapping from edge object to edges they belong.
Returns{Engine.Entity : Engine.Entity}
StreetSystem.getNode2SegmentMap🔗
function StreetSystem.getNode2SegmentMap(): {Engine.Entity : {Engine.Entity}}
Obtains a map from all base nodes to base segments they are connected with.
Returns{Engine.Entity : {Engine.Entity}}
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{Engine.Entity : {Engine.Entity}}
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{Engine.Entity : {Engine.Entity}}
StreetSystem.isTownCrossingNode🔗
function StreetSystem.isTownCrossingNode(Engine.Entity): boolean
Checks if the node is a town crossing.
ParametersEngine.Entity
boolean
StreetSystem.getNodeSegments🔗
function StreetSystem.getNodeSegments(nodeEntity : Engine.Entity): {Engine.Entity}
Returns the node segments.
ParametersnodeEntity:Engine.Entity— the entity of the node
{Engine.Entity}
StreetSystem.getNodeStreetSegments🔗
function StreetSystem.getNodeStreetSegments(nodeEntity : Engine.Entity): {Engine.Entity}
Returns the node street segments.
ParametersnodeEntity:Engine.Entity— the entity of the node
{Engine.Entity}
StreetSystem.getNodeTrackSegments🔗
function StreetSystem.getNodeTrackSegments(nodeEntity : Engine.Entity): {Engine.Entity}
Returns the node track segments.
ParametersnodeEntity:Engine.Entity— the entity of the node
{Engine.Entity}
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🔗
function TownBuildingSystem.getBuilding(parcelEntity : Engine.Entity): Engine.Entity
Obtains the building (if any) that is placed on the given parcel.
ParametersparcelEntity:Engine.Entity— the entity of the parcel
Engine.Entity
TownBuildingSystem.getCargoSupplyAndLimit🔗
function TownBuildingSystem.getCargoSupplyAndLimit(townEntity : Engine.Entity, LandUseType): {CargoTypeId : {number, number, integer}}
Obtains information about towns and cargo.
ParameterstownEntity:Engine.Entity— the entity of the townLandUseType
{CargoTypeId : {number, number, integer}}
TownBuildingSystem.getLandUsePersonCapacities🔗
function TownBuildingSystem.getLandUsePersonCapacities(townEntity : Engine.Entity): {integer}
Obtains information about land use and person capacities.
ParameterstownEntity:Engine.Entity— the entity of the town
{integer}
TownBuildingSystem.getParcel2BuildingMap🔗
function TownBuildingSystem.getParcel2BuildingMap(): {Engine.Entity : Engine.Entity}
Obtains map from parcel to building occupying the parcel.
Returns{Engine.Entity : Engine.Entity}
TownBuildingSystem.getPersonCapacity2townBuildingMap🔗
function TownBuildingSystem.getPersonCapacity2townBuildingMap(): {Engine.Entity : Engine.Entity}
Obtains map from person capacities to town buildings.
Returns{Engine.Entity : Engine.Entity}
TownBuildingSystem.getTown2BuildingMap🔗
function TownBuildingSystem.getTown2BuildingMap(): {Engine.Entity : {Engine.Entity}}
Obtains map from town to town buildings of the town.
Returns{Engine.Entity : {Engine.Entity}}
TownBuildingSystem.getTown2personCapacitiesMap🔗
function TownBuildingSystem.getTown2personCapacitiesMap(): {Engine.Entity : {integer}}
Obtains map from town to person capacities of the town.
Returns{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🔗
function TownBuildingSystem.hasBuilding(parcelEntity : Engine.Entity): boolean
Checks if parcel is occupied by building.
ParametersparcelEntity:Engine.Entity— the entity of the parcel
boolean
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🔗
function TpNetLinkSystem.getEdgeId2linkEntities(): {EdgeId : {Engine.Entity}}
Gets a map from all edges to the links touching the edge.
Returns{EdgeId : {Engine.Entity}}
TpNetLinkSystem.getLinkEntities🔗
function TpNetLinkSystem.getLinkEntities(edgeId : EdgeId): {Engine.Entity}
Gets all links within a transport network edge.
ParametersedgeId:EdgeId— the edge id for which the links should be fetched
{Engine.Entity}
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🔗
function TransportNetworkSystem.getIntersections(tnEntity : Engine.Entity): {<any type>}
Gets all intersections within a transport network (e.g. all intersections in a base node).
ParameterstnEntity:Engine.Entity— the entity of the transport network
{<any type>}
TransportNetworkSystem.getTpNetData🔗
function TransportNetworkSystem.getTpNetData(): TpNetData
Gets a structure representing the graph of the transport network.
ReturnsTpNetData
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🔗
function TransportVehicleSystem.getDepotVehicles(depotEntity : Engine.Entity): {Engine.Entity}
Gets all vehicles that are in a depot.
ParametersdepotEntity:Engine.Entity— the entity of the depot
{Engine.Entity}
TransportVehicleSystem.getGoingToDepotVehicles🔗
function TransportVehicleSystem.getGoingToDepotVehicles(depotEntity : Engine.Entity): {Engine.Entity}
Gets all vehicles heading for the depot.
ParametersdepotEntity:Engine.Entity— the entity of the depot
{Engine.Entity}
TransportVehicleSystem.getInfo🔗
function TransportVehicleSystem.getInfo(transportVehicleEntity : Engine.Entity): any
Gets additional information about the vehicle.
ParameterstransportVehicleEntity:Engine.Entity— the entity of the transport vehicle
any— info about the transport vehicle
TransportVehicleSystem.getLine2VehicleMap🔗
function TransportVehicleSystem.getLine2VehicleMap(): {Engine.Entity : {Engine.Entity}}
Gets a map of lines to the vehicles using the line.
Returns{Engine.Entity : {Engine.Entity}}
TransportVehicleSystem.getLineStopVehicles🔗
function TransportVehicleSystem.getLineStopVehicles(lineEntity : Engine.Entity, stopIndex : number): {Engine.Entity}
Gets the vehicle stopped at the stop of a line.
ParameterslineEntity:Engine.Entity— the entity of the linestopIndex:number— the index of the stop on the line
{Engine.Entity}
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.
ParameterslineEntity:Engine.Entity— the entity of the linestopIndex:number— the index of the stop on the line
{StationTerminal : boolean}
TransportVehicleSystem.getLineVehicles🔗
function TransportVehicleSystem.getLineVehicles(lineEntity : Engine.Entity): {Engine.Entity}
Gets all vehicles using a given line.
ParameterslineEntity:Engine.Entity— the entity of the line
{Engine.Entity}
TransportVehicleSystem.getNoPathVehicles🔗
function TransportVehicleSystem.getNoPathVehicles(): {Engine.Entity}
Gets all vehicles that cannot find a path to their destination.
Returns{Engine.Entity}
TransportVehicleSystem.getVehicleNames🔗
function TransportVehicleSystem.getVehicleNames(carrier : Carrier): {string}
Gets the vehicle names of all vehicles for the given carrier.
Parameterscarrier:Carrier— the carrier for which the names should be fetched
{string}
TransportVehicleSystem.getVehicles🔗
function TransportVehicleSystem.getVehicles(tnEntities : {Engine.Entity}, wholePath : boolean): {Engine.Entity}
Gets the vehicle using a certain transport network.
ParameterstnEntities:{Engine.Entity}— list of transport network entitieswholePath:boolean— true if the vehicle has to use the whole path
{Engine.Entity}
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.
state:TransportVehicleState— A state to filter the vehicles
{Engine.Entity}
TransportVehicleSystem.getVehiclesForMaintenanceStation🔗
function TransportVehicleSystem.getVehiclesForMaintenanceStation(maintenanceStation : Engine.Entity): {Engine.Entity}
Gets all vehicles that are maintained by the given maintenance station.
ParametersmaintenanceStation:Engine.Entity— the entity of the maintenance station
{Engine.Entity}
TransportVehicleSystem.isVehicleMaintainedByStation🔗
function TransportVehicleSystem.isVehicleMaintainedByStation(vehicle : Engine.Entity, maintenanceStation : Engine.Entity): boolean
Checks if the vehicle is maintained by the given maintenance station.
Parametersvehicle:Engine.Entity— the entity of the vehiclemaintenanceStation:Engine.Entity— the entity of the maintenance station
boolean
TransportVehicleSystem.getLineCargoInfo🔗
function TransportVehicleSystem.getLineCargoInfo(lineEntity : Engine.Entity, cargoTypeId : CargoTypeId): LineCargoInfo
Gets cargo info for a line.
ParameterslineEntity:Engine.Entity— the entity of the linecargoTypeId:CargoTypeId— the id of the cargo type
LineCargoInfo
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🔗
function VehicleDepotSystem.getDepotForInNodeId(nodeId : NodeId): Engine.Entity
Gets the depot entity to which the node belongs.
ParametersnodeId:NodeId— the id of the node for which the depot should be fetched
Engine.Entity
VehicleDepotSystem.forEach🔗
function VehicleDepotSystem.forEach(Engine.Entity)
Loops over all depots.
ParametersEngine.Entity