vehicle_store_util¶
Source: base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl
Notes
Helpers of the vehicle store: collect displayable vehicle data from model metadata, filter vehicles, match depot filter tags and transport modes, and small filter widgets.
VehicleStoreUtil¶
record global base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:3
global record VehicleStoreUtil
Load: local vehicle_store_util = ug_require "/gui/line_vehicle_mgmt/vehicle_store_util.tl"
Notes
Helpers of the vehicle store.
Fields
| Name | Type | Description |
|---|---|---|
EngineToggle |
Recipe<EngineToggleParam> |
Toggle button for one engine group of the engine filter. used 3× in the base game |
SizeFilter |
Recipe<SizeFilterParam> |
Small / Large toggles for ships and aircraft; restricts the filter to SMALL_SHIP/SMALL_AIRCRAFT or SHIP/AIRCRAFT. used 1× in the base game |
CargoTypes |
Recipe<CargoTypesParam> |
Cargo type toggles of the store (passengers, all cargo, and one toggle per cargo type). used 1× in the base game |
LightRailFilter |
Recipe<LightRailFilterParam> |
Light Rail toggle (sets onlyLightrail), shown for tram depots. used 1× in the base game |
Functions
makeSingleVehicle(model : Model) : Vehicle base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:165
Call as vehicle_store_util.makeSingleVehicle
Notes
Collects the metadata of one vehicle model into a Vehicle record.
| Parameter | Type | Description |
|---|---|---|
model |
Model |
Model with transportVehicle metadata (e.g. from api.res.modelRep.get). |
Returns Vehicle
Used in the base game: 6 times in 2 files
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_window.tl:727
base/content/gui/gui/entity_window/vehicle/vehicle_eow.script.tl:94
makeMultipleVehicles(mu : MultipleUnit) : {Vehicle} base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:166
Call as vehicle_store_util.makeMultipleVehicles
Notes
Builds a Vehicle record for every part of a multiple unit.
Returns {Vehicle}
makeMultipleVehiclesFromParts(configs : {{TransportVehiclePart}}) : {Vehicle} base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:167
Call as vehicle_store_util.makeMultipleVehiclesFromParts
Notes
Builds Vehicle records for all parts of a list of parts lists (e.g. the vehicles in the cart).
Returns {Vehicle}
collectVehicleData(vehicles : {Vehicle}, modifiers? : Engine.Component.TransportVehicle.Modifiers) : VehicleData base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:168
Call as vehicle_store_util.collectVehicleData
Notes
Combines the metadata of several vehicle parts into one VehicleData record (capacity, speed, power, emissions, price, years, ...).
| Parameter | Type | Description |
|---|---|---|
vehicles |
{Vehicle} |
Parts of the vehicle or consist. |
modifiers? |
Engine.Component.TransportVehicle.Modifiers |
Optional modifiers of an existing transport vehicle; scale noise, pollution, comfort and top speed into the ...Adjusted fields. |
Returns VehicleData
Example
-- from entity_window/vehicle/vehicle_eow.script.tl
local vehicles = {}
for i, modelId in ipairs(modelIds) do
local vehicle = vehicle_store_util.makeSingleVehicle(api.res.modelRep.get(modelId))
vehicle.maintenanceState = maintenanceStates[i]
table.insert(vehicles, vehicle)
end
local vehicleData = vehicle_store_util.collectVehicleData(vehicles, modifiers)
Used in the base game: 4 times in 2 files
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_window.tl:731
base/content/gui/gui/entity_window/vehicle/vehicle_eow.script.tl:483
goodnessToTextString(value : number) : string base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:172
Call as vehicle_store_util.goodnessToTextString
Notes
Translated rating for a 0 to 1 value - Very Poor (< 0.2), Poor, Mediocre, Good, Very Good (>= 0.8).
Returns string: The rating text; "" for negative values.
Used in the base game: 9 times in 3 files
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_window.tl:544
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_table.tl:128
base/content/gui/gui/entity_window/vehicle/vehicle_eow.script.tl:579
getRangesFromData(vehicleData : VehicleData, carrier : Carrier, year : integer) : VehicleUtil.Ranges base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:173
Call as vehicle_store_util.getRangesFromData
Notes
Value ranges for a vehicle via VehicleUtil.getRanges, using the passenger-only ranges when the vehicle carries only passengers.
Returns VehicleUtil.Ranges
getPrimaryBucket(elem : ElementStatic) : integer base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:178
Call as vehicle_store_util.getPrimaryBucket
Notes
Sort bucket of a store entry - 1 no capacity, 2 passengers only, 3 passengers and cargo, 4 cargo only. The store sorts by bucket before the chosen sort mode.
Returns integer
vehicleFilter(elemStatic : VehicleStoreUtil.ElementStatic, filterParams : FilterParams, filter : VehicleStore.VehicleBrowserFilter) : boolean base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:179
Call as vehicle_store_util.vehicleFilter
Notes
Tells whether a store entry passes the browser filter.
Returns boolean: True if the entry is shown.
Details
Checks, in order: filter tags, multiple-unit / light-rail flags, the game context's
enabled / disabled vehicle lists, single vehicle vs. multiple unit, availability years,
carrier, transport modes, search text, cargo filters, capacity, engine types and
withEngine.
showCargoFilters(VehicleStore.VehicleBrowserFilter) : boolean base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:184
Call as vehicle_store_util.showCargoFilters
Notes
True if the cargo filter toggles are shown for the filter (withCargoCapacity or withCapacity is set).
Returns boolean
acceptsMultiVehicle(carrier : Carrier) : boolean base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:185
Call as vehicle_store_util.acceptsMultiVehicle
Notes
True for carriers whose vehicles are composed in a cart (rail and tram). For other carriers the store buys vehicles immediately.
Returns boolean
makeVehicleData(repId : integer, multipleUnit : boolean) : VehicleData base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:186
Call as vehicle_store_util.makeVehicleData
Notes
collectVehicleData for a model id or a multiple-unit id.
Returns VehicleData
getVehicleNameAndIcons(repId : integer, multipleUnit : boolean, small : boolean) : VehicleNameAndIcon base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:187
Call as vehicle_store_util.getVehicleNameAndIcons
Notes
Name and part icons of a model or multiple unit.
| Parameter | Type | Description |
|---|---|---|
repId |
integer |
Model id or multiple-unit id. |
multipleUnit |
boolean |
True if repId is a multiple unit. |
small |
boolean |
For a single model, use icon20 instead of iconSmall. |
Returns VehicleNameAndIcon
makeVehicleProgressBarRow(progressBarIcon : string, tooltip : string, percentage : number, progressBarText : string, comparisonPercentage? : number) : TreeNodeId base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:192
Call as vehicle_store_util.makeVehicleProgressBarRow
Notes
Builds a row with icon, progress bar and text for a vehicle property; with a comparison value both bars are shown, coloured good or bad.
| Parameter | Type | Description |
|---|---|---|
progressBarIcon |
string |
|
tooltip |
string |
|
percentage |
number |
Bar value, clamped to 0 to 1. |
progressBarText |
string |
|
comparisonPercentage? |
number |
Optional value to compare with (e.g. the vehicle being replaced). |
Returns TreeNodeId
makeVehiclePropertyRow(tooltip : string, text : string, propertyIcon : string, percentage : number, comparisonPercentage? : number, higherIsBetter? : boolean) : TreeNodeId base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:199
Call as vehicle_store_util.makeVehiclePropertyRow
Notes
Builds a row with icon and text for a vehicle property; the text is coloured good or bad when a comparison value differs.
| Parameter | Type | Description |
|---|---|---|
tooltip |
string |
|
text |
string |
|
propertyIcon |
string |
|
percentage |
number |
|
comparisonPercentage? |
number |
|
higherIsBetter? |
boolean |
Pass false if a lower value is better; default true. |
Returns TreeNodeId
makeVehiclePropertyPlaceholder() : TreeNodeId base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:207
Call as vehicle_store_util.makeVehiclePropertyPlaceholder
Notes
Empty component with the property-placeholder style, used to keep rows aligned.
Returns TreeNodeId
handleRailCarrier(vehicleBrowserFilter : VehicleStore.VehicleBrowserFilter, id2index : {string : integer}, index : integer) : VehicleStore.VehicleBrowserFilter base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:208
Call as vehicle_store_util.handleRailCarrier
Notes
Sets the browser filter for the selected tab of a rail depot (locomotive, wagon, multiple unit).
| Parameter | Type | Description |
|---|---|---|
vehicleBrowserFilter |
VehicleStore.VehicleBrowserFilter |
|
id2index |
{string : integer} |
Tab id to tab index. |
index |
integer |
Index of the selected tab. |
Returns VehicleStore.VehicleBrowserFilter: The changed filter.
handleTramCarrier(vehicleBrowserFilter : VehicleStore.VehicleBrowserFilter, id2index : {string : integer}, index : integer) : VehicleStore.VehicleBrowserFilter base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:213
Call as vehicle_store_util.handleTramCarrier
Notes
Sets the browser filter for the selected tab of a tram depot (railcar, locomotive, wagon).
Returns VehicleStore.VehicleBrowserFilter: The changed filter.
handleDefaultCarrier(vehicleBrowserFilter : VehicleStore.VehicleBrowserFilter) : VehicleStore.VehicleBrowserFilter base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:218
Call as vehicle_store_util.handleDefaultCarrier
Notes
Resets the browser filter for carriers without tabs (road, water, air).
getTransportModeMapForVehicles(vehicleEntities : {Engine.Entity}) : {TransportMode : boolean} base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:221
Call as vehicle_store_util.getTransportModeMapForVehicles
Notes
Union of the enabled transport modes of the given vehicles.
Returns {TransportMode : boolean}
Used in the base game: 7 times in 3 files
base/content/gui/gui/line_vehicle_mgmt/manager_window.tl:98
local transportModeMapVehicle = vehicle_store_util.getTransportModeMapForVehicles({selectedVehicle})
base/content/gui/gui/line_vehicle_mgmt/line_util.tl:1532
base/content/gui/gui/line_vehicle_mgmt/manager_hud_util.tl:1119
depotMatchesVehicleFilterTags(depotFilterTags : {string}, vehicleFilterTags : {string}) : boolean base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:224
Call as vehicle_store_util.depotMatchesVehicleFilterTags
Notes
Tells whether one filter-tag list contains all tags of another; used to match vehicles to depots.
Returns boolean: True if the vehicle is allowed.
Details
The implementation treats the second argument as the required tag list and the
first as the tags to check: every tag of the second list must appear in the first. If
the second argument is nil, everything matches; if it is an empty list, only a non-empty
first list matches. Mind the argument order: the definition names the first parameter
depotFilterTags, the store's vehicleFilter passes (vehicle tags, depot tags), while
the availability notification script passes (depot tags, vehicle tags).
depotMatchesVehicleTransportModes(depotTransportModes : {TransportMode : boolean}, vehicleTransportModes : {TransportMode : boolean}) : boolean base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:225
Call as vehicle_store_util.depotMatchesVehicleTransportModes
Notes
True if the two transport-mode maps share at least one enabled mode (or the second map is nil).
Returns boolean
getVehicleFilterTags(vehicleEntities : {Engine.Entity}) : {string} base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:227
Call as vehicle_store_util.getVehicleFilterTags
Notes
Filter tags of the given vehicles, from their models' transportVehicle.filterTags and the filter tags of their multiple units.
Returns {string}
Used in the base game: 4 times in 2 files
base/content/gui/gui/line_vehicle_mgmt/manager_window.tl:5206
base/content/gui/gui/entity_window/vehicle/vehicle.tl:456
getDepotFilterTags(depotEntity : Engine.Entity) : {string} base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:228
Call as vehicle_store_util.getDepotFilterTags
Notes
Filter tags of a vehicle depot (VEHICLE_DEPOT component).
Returns {string}
Used in the base game: 2 times in 2 files
base/content/gui/gui/line_vehicle_mgmt/manager_window.tl:7143
base/content/game_mechanics/game_mechanics/notifications/types/availability.script.tl:98
VehicleStoreUtil.Vehicle¶
record base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:4
record Vehicle
Notes
Metadata of one vehicle model, gathered by makeSingleVehicle.
Used in the base game: 20 times in 3 files
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_window.tl:724
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_util.tl:12
base/content/gui/gui/entity_window/vehicle/vehicle_eow.script.tl:91
Fields
| Name | Type | Description |
|---|---|---|
tv |
ModelMetadata.TransportVehicle |
transportVehicle metadata of the model. |
landVehicle |
ModelMetadata.LandVehicle |
landVehicle metadata, or nil. |
waterVehicle |
ModelMetadata.WaterVehicle |
waterVehicle metadata, or nil. |
airVehicle |
ModelMetadata.AirVehicle |
airVehicle metadata, or nil. |
cost |
ModelMetadata.Cost |
cost metadata. |
maintenance |
ModelMetadata.Maintenance |
maintenance metadata. |
emissions |
ModelMetadata.Emissions |
emissions metadata. |
desc |
ModelMetadata.Description |
description metadata (name and icons). |
availability |
ModelMetadata.Availability |
availability metadata (years). |
length |
number |
Length of the model's bounding box along x (extent.bbMax.x - extent.bbMin.x). |
maintenanceState |
number |
Optional maintenance state of an existing vehicle part; if set, collectVehicleData fills the ...Adjusted values. |
VehicleStoreUtil.VehicleData¶
record base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:20
record VehicleData
Notes
Combined, displayable data of a vehicle or consist, computed by collectVehicleData.
Details
Values are summed over all parts unless noted. The ...Adjusted fields are only set when
a part has a maintenanceState (and the matching maintenance-effect option of the base
config is on) or when modifiers scale the value.
Used in the base game: 28 times in 3 files
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_window.tl:196
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_util.tl:126
base/content/gui/gui/entity_window/vehicle/vehicle_eow.script.tl:421
Fields
| Name | Type | Description |
|---|---|---|
allCargoTypes |
{CargoTypeId : integer} |
Capacity per cargo type, summed over all compartments. |
cargoClasses |
{string} |
Cargo classes the vehicle can load (without duplicates). |
engines |
{VehicleEngineType : boolean} |
Engine types of the land-vehicle engines. |
variantGroup |
string |
Variant group (transportVehicle.groupFileName) of the parts, or "". |
anyCargo |
boolean |
True if any part carries cargo other than passengers. |
passengers |
boolean |
True if any part carries passengers. |
isReversible |
boolean |
transportVehicle.reversible (of the last part). |
isLightrail |
boolean |
True if every part can run on tram tracks. |
speed |
number |
Lowest top speed of all parts. |
speedAdjusted |
number |
Top speed after maintenance penalty and topSpeedScale modifier. |
maxIndividualSpeed |
number |
Highest top speed of any part. |
noise |
number |
Highest noise score of the parts, as 0 to 1 (score / 100). |
noiseAdjusted |
number |
Noise after maintenance penalty and noiseScale modifier. |
pollution |
number |
Highest pollution score of the parts, as 0 to 1 (score / 100). |
pollutionAdjusted |
number |
Pollution after maintenance penalty and pollutionScale modifier. |
comfortFactor |
number |
Lowest non-zero comfort factor of the parts. |
comfortFactorAdjusted |
number |
Average comfort of the parts after the maintenance penalty, scaled by the comfortScale modifier. |
runningCosts |
number |
Sum of maintenance.runningCosts. |
runningCostsAdjusted |
number |
Running costs after the maintenance penalty. |
numCompartments |
integer |
Number of compartments. |
loadingSpeed |
number |
Highest loadSpeed of the parts; 0 if the vehicle has no capacity. |
weight |
number |
Sum of weightEmpty times 1e-3. |
weightMaxPayload |
number |
Sum of weightMaxPayload times 1e-3. |
length |
number |
Sum of part lengths. |
totalCapacity |
integer |
Total capacity (per compartment the largest capacity of any cargo type). |
totalCapacityPassengers |
integer |
Passenger capacity. |
totalCapacityCargo |
integer |
Cargo capacity (non-passenger). |
price |
integer |
Sum of cost.price. |
tractiveEffort |
number |
Sum of the first engine's tractive effort of each land-vehicle part. |
thrust |
number |
Sum of airVehicle.maxThrust times 1e-3. |
thrustAdjusted |
number |
Thrust after the maintenance penalty. |
rollingFriction |
number |
Sum of landVehicle.friction (0.1 per aircraft part). |
power |
number |
Sum of engine power (first engine of land vehicles, availPower times 1e-3 for ships). |
powerAdjusted |
number |
Power after the maintenance penalty. |
yearFrom |
integer |
Latest availability.yearFrom of the parts (-1 if none). |
yearTo |
integer |
Earliest availability.yearTo of the parts (5000 if none). |
noCblendMask |
boolean |
False if any part has a colour-blend mask. |
VehicleStoreUtil.ElementDynamic¶
record base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:67
record ElementDynamic
Notes
Per-refresh data of a store entry.
Fields
| Name | Type | Description |
|---|---|---|
ranges |
VehicleUtil.Ranges |
Value ranges used to scale the entry's progress bars. |
sortKey |
any |
Value of the current sort mode (number, or string for alphabetical). |
variantCountFiltered |
integer |
Number of the entry's variants that pass the current filter. |
VehicleStoreUtil.ElementStatic¶
record base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:73
record ElementStatic
Notes
Data of a store entry (model or multiple unit) computed once by VehicleStoreEntryPoint.
Used in the base game: 8 times in 2 files
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_window.tl:70
local DetailsTitle = react.RegisterRecipe("DetailsTitle", function(elemStatic : VehicleStoreUtil.ElementStatic) : TreeNodeId
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_util.tl:428
Fields
| Name | Type | Description |
|---|---|---|
repId |
integer |
Model id, or multiple-unit id. |
multipleUnit |
boolean |
True for a multiple unit. |
name |
string |
Display name. |
names |
{string} |
Names of the parts. |
icons |
{string} |
Small icons of the parts. |
iconsBlend |
{string} |
Colour-blend masks of the part icons. |
iconOrientations |
{boolean} |
Per part, true if the part is reversed (multiple units only). |
vehicleData |
VehicleStoreUtil.VehicleData |
Combined vehicle data. |
engineKey |
integer |
Sum of engine-type weights (horse 2, steam 4, diesel 6, electric 8). |
path |
string |
Model or multiple-unit file path; also the key into the variant groups. |
variantCount |
integer |
Number of variants whose variant group is this entry's path. |
isVariant |
boolean |
True if the vehicle belongs to a variant group. |
variantGroupOnly |
boolean |
True for a model that has variants but no filter tags; it is only shown as group head, not as a buyable entry of its own. |
carriersMap |
{Carrier : boolean} |
Carriers of the parts. |
transportModes |
{TransportMode : boolean} |
Transport modes of the parts. |
engineTypes |
{VehicleEngineType : boolean} |
Engine types of the land-vehicle parts. |
hasEngine |
boolean |
True if any land-vehicle part has an engine; always true for water and air vehicles. |
filterTags |
{string} |
Filter tags of the parts (multiple unit's own tags for multiple units). |
VehicleStoreUtil.Element¶
record base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:94
record Element
Notes
One entry of the vehicle store list.
Used in the base game: 70 times in 2 files
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_window.tl:35
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_table.tl:11
Fields
| Name | Type | Description |
|---|---|---|
dynamic |
ElementDynamic |
Per-refresh data. |
static |
ElementStatic |
Precomputed data. |
VehicleStoreUtil.FilterParams¶
record base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:99
record FilterParams
Notes
Context for vehicleFilter.
Used in the base game: 3 times in 3 files
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_window.tl:56
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_util.tl:692
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_table.tl:497
Fields
VehicleStoreUtil.VehicleNameAndIcon¶
record base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:105
record VehicleNameAndIcon
Notes
Result of getVehicleNameAndIcons.
Used in the base game: 1 time in 1 file
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_util.tl:449
Fields
VehicleStoreUtil.EngineType¶
enum base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:115
enum EngineType
Notes
Engine groups of the store's engine filter toggles.
Used in the base game: 2 times in 1 file
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_window.tl:2165
| Value | Description |
|---|---|
"Steam" |
Steam engines. |
"Diesel" |
Diesel engines. |
"Electric" |
Electric engines. |
VehicleStoreUtil.EngineToggleParam¶
record base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:121
record EngineToggleParam
Notes
Parameters of EngineToggle.
Used in the base game: 1 time in 1 file
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_util.tl:902
Fields
| Name | Type | Description |
|---|---|---|
type |
EngineType |
Engine group this toggle controls. |
modes |
{EngineType : boolean} |
Current on/off state of all engine groups. |
Functions
setModes({EngineType : boolean}) base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:124
Notes
Called with the updated state when the toggle changes.
VehicleStoreUtil.SizeFilterParam¶
record base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:127
record SizeFilterParam
Notes
Parameters of SizeFilter.
Used in the base game: 1 time in 1 file
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_util.tl:925
Fields
| Name | Type | Description |
|---|---|---|
showFilters |
boolean |
Initial visibility state of the filters. |
filter |
VehicleStore.VehicleBrowserFilter |
Current browser filter. |
transportModes |
{TransportMode : boolean} |
Transport modes available (of the depot or vehicles). |
Functions
setFilterSort(newFilter : VehicleStore.VehicleBrowserFilter, newSort : VehicleStore.VehicleBrowserSort, forceUpdate : boolean) base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:130
Notes
Applies the new filter.
VehicleStoreUtil.CargoTypesParam¶
record base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:138
record CargoTypesParam
Notes
Parameters of CargoTypes.
Used in the base game: 1 time in 1 file
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_util.tl:1042
Fields
| Name | Type | Description |
|---|---|---|
filter |
VehicleStore.VehicleBrowserFilter |
Current browser filter. |
allCargo |
{CargoTypeId : boolean} |
Cargo types offered as toggles. |
Functions
setFilterSort(newFilter : VehicleStore.VehicleBrowserFilter, newSort : VehicleStore.VehicleBrowserSort, forceUpdate : boolean) base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:140
Notes
Applies the new filter.
VehicleStoreUtil.LightRailFilterParam¶
record base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:148
record LightRailFilterParam
Notes
Parameters of LightRailFilter.
Used in the base game: 1 time in 1 file
base/content/gui/gui/line_vehicle_mgmt/vehicle_store_util.tl:1006
Fields
| Name | Type | Description |
|---|---|---|
showFilters |
boolean |
Initial visibility state of the filters. |
filter |
VehicleStore.VehicleBrowserFilter |
Current browser filter. |
transportModes |
{TransportMode : boolean} |
Transport modes available. |
Functions
setFilterSort(newFilter : VehicleStore.VehicleBrowserFilter, newSort : VehicleStore.VehicleBrowserSort, forceUpdate : boolean) base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:151
Notes
Applies the new filter.
VehicleStoreUtil.TransportModesAndCarrier¶
record base/tealdef/gui/line_vehicle_mgmt/vehicle_store_util.d.tl:159
record TransportModesAndCarrier
Notes
Transport modes and carrier compatible with a set of vehicles; returned by LineUtil.getLineAndVehicleCompatibleTransportModesAndCarrier.
Used in the base game: 1 time in 1 file
base/content/gui/gui/line_vehicle_mgmt/line_util.tl:1631
Fields
| Name | Type | Description |
|---|---|---|
transportModes |
{TransportMode : boolean} |
Compatible transport modes. |
carrier |
Carrier |
Carrier. |