entity_window_hud¶
Source: base/tealdef/gui/entity_window/entity_window_hud.d.tl
Notes
HUD icon masters, pre-filters and tooltip filters used while an entity window is open: they decide which world entities get HUD icons (and hover tooltips) related to the selected entity, e.g. the suppliers and consumers of a selected industry.
EntityWindowHud¶
record global base/tealdef/gui/entity_window/entity_window_hud.d.tl:3
global record EntityWindowHud
Load: local entity_window_hud = ug_require "/gui/entity_window/entity_window_hud.tl"
Notes
HUD icon configuration of the entity windows (industry, perk, line, subsidy, town building, station, town, maintenance, vehicle).
Details
Each kind comes as a set: a get...HudIconPreFilter function listing the component types of the
entities that can get an icon, a ...HudIconMaster recipe (called with the Builtin.HudIconParam and
a user parameter) that returns the icon or nil, and for some a filter...HudActionTooltip function
that decides which hovered entities show a tooltip. The windows pass them to
builtin.HudIconManagerConfig{ masterRecipe = ..., userParam = ..., preFilter = ... } and
builtin.ActionTooltip.
Fields
| Name | Type | Description |
|---|---|---|
IndustryHudIconMaster |
Recipe2<Builtin.HudIconParam, EntityWindowHudUserParam> |
HUD icon master of the industry window; shows the cargo input/output indicator of related industries, the town icon of consuming towns and the notification icons of the selected industry. used 1× in the base game |
PerkHudIconMaster |
Recipe2<Builtin.HudIconParam, EntityWindowHudUserParam> |
HUD icon master of the perk window; shows the town icon of the perk's closest town, the perk's own icon and the cargo indicators of supplying industries. used 2× in the base game |
LineHudIconMaster |
Recipe2<Builtin.HudIconParam, EntityWindowHudUserParam> |
HUD icon master of the line window; shows the cargo of the line's vehicles, the town icons of towns the line stops in, and default icons for the line's stations. used 1× in the base game |
SubventionHudIconMaster |
Recipe2<Builtin.HudIconParam, SubventionHudUserParam> |
HUD icon master of the subsidy window; shows town icons and cargo indicators for the towns and industries relevant to the subsidy. used 1× in the base game |
TownBuildingHudIconMaster |
Recipe2<Builtin.HudIconParam, EntityWindowHudUserParam> |
HUD icon master of the town building window; shows cargo indicators of supplying industries, the cargo of vehicles serving the town and the town icon. used 1× in the base game |
StationGroupHudIconMaster |
Recipe2<Builtin.HudIconParam, EntityWindowHudUserParam> |
HUD icon master of the station window; shows the selected station's icon and the cargo of vehicles on lines stopping at the station. used 1× in the base game |
TownHudIconMaster |
Recipe2<Builtin.HudIconParam, TownHudUserParam> |
HUD icon master of the town window; the icons depend on the selected tab (cargo, vehicles and town on "Overview", perks on "Bonuses", the layer icons on the layer tabs). used 1× in the base game |
MaintenanceHudIconMaster |
Recipe2<Builtin.HudIconParam, MaintenanceHudUserParam> |
HUD icon master for maintenance; shows vehicles and the pool usage bar of maintenance stations (depots with a maintenance pool) of the given transport modes. used 1× in the base game |
VehicleHudIconMaster |
Recipe2<Builtin.HudIconParam, VehicleHudUserParam> |
HUD icon master of the vehicle window; shows icons for vehicles on the same line and for the selected vehicle while it goes to a depot. used 1× in the base game |
Functions
filterIndustryHudActionTooltip(entity : Engine.Entity, userParam : EntityWindowHudUserParam) : boolean base/tealdef/gui/entity_window/entity_window_hud.d.tl:8
Call as entity_window_hud.filterIndustryHudActionTooltip
Notes
Tooltip filter of the industry window.
| Parameter | Type | Description |
|---|---|---|
entity |
Engine.Entity |
Hovered entity. |
userParam |
EntityWindowHudUserParam |
User parameter with the selected industry and its cargo types. |
Returns boolean: True for towns consuming the selected industry's cargo and for industries trading matching cargo (or the selected industry itself); nil if the entity does not exist or the selected entity is no industry.
getIndustryHudIconPreFilter() : {Engine.ComponentType} base/tealdef/gui/entity_window/entity_window_hud.d.tl:9
Call as entity_window_hud.getIndustryHudIconPreFilter
Notes
Component types that can get an icon in the industry window.
Returns {Engine.ComponentType}: TOWN and INDUSTRY.
filterPerkHudActionTooltip(entity : Engine.Entity, userParam : EntityWindowHudUserParam) : boolean base/tealdef/gui/entity_window/entity_window_hud.d.tl:12
Call as entity_window_hud.filterPerkHudActionTooltip
Notes
Tooltip filter of the perk (landmark, headquarters) window.
| Parameter | Type | Description |
|---|---|---|
entity |
Engine.Entity |
Hovered entity. |
userParam |
EntityWindowHudUserParam |
User parameter with the selected perk construction. |
Returns boolean: True for the closest town of the selected perk, the selected perk construction itself, and industries producing its cargo types.
Used in the base game: 2 times in 2 files
base/content/gui/gui/entity_window/perk/perk.tl:202
base/content/game_mechanics/game_mechanics/emission/pollution_cleanup_facility_hud.script.tl:109
getPerkHudIconPreFilter() : {Engine.ComponentType} base/tealdef/gui/entity_window/entity_window_hud.d.tl:13
Call as entity_window_hud.getPerkHudIconPreFilter
Notes
Component types that can get an icon in the perk window.
Returns {Engine.ComponentType}: TOWN, CONSTRUCTION, SUBCONSTRUCTION, INDUSTRY and STOCK_LIST.
Used in the base game: 2 times in 2 files
base/content/gui/gui/entity_window/perk/perk.tl:185
base/content/game_mechanics/game_mechanics/emission/pollution_cleanup_facility_hud.script.tl:93
getLineHudIconPreFilter() : {Engine.ComponentType} base/tealdef/gui/entity_window/entity_window_hud.d.tl:16
Call as entity_window_hud.getLineHudIconPreFilter
Notes
Component types that can get an icon in the line window.
Returns {Engine.ComponentType}: STATION_GROUP, TOWN and TRANSPORT_VEHICLE.
getSubventionHudIconPreFilter() : {Engine.ComponentType} base/tealdef/gui/entity_window/entity_window_hud.d.tl:22
Call as entity_window_hud.getSubventionHudIconPreFilter
Notes
Component types that can get an icon in the subsidy window.
Returns {Engine.ComponentType}: TOWN and INDUSTRY.
filterTownBuildingHudActionTooltip(entity : Engine.Entity, userParam : EntityWindowHudUserParam) : boolean base/tealdef/gui/entity_window/entity_window_hud.d.tl:25
Call as entity_window_hud.filterTownBuildingHudActionTooltip
Notes
Tooltip filter of the town building window.
| Parameter | Type | Description |
|---|---|---|
entity |
Engine.Entity |
Hovered entity. |
userParam |
EntityWindowHudUserParam |
User parameter with the selected town building. |
Returns boolean: True for the building's town, vehicles of lines stopping in that town, and industries producing the building's cargo types.
getTownBuildingHudIconPreFilter() : {Engine.ComponentType} base/tealdef/gui/entity_window/entity_window_hud.d.tl:26
Call as entity_window_hud.getTownBuildingHudIconPreFilter
Notes
Component types that can get an icon in the town building window.
Returns {Engine.ComponentType}: TOWN, TRANSPORT_VEHICLE and INDUSTRY.
getStationGroupHudIconPreFilter() : {Engine.ComponentType} base/tealdef/gui/entity_window/entity_window_hud.d.tl:29
Call as entity_window_hud.getStationGroupHudIconPreFilter
Notes
Component types that can get an icon in the station window.
Returns {Engine.ComponentType}: TRANSPORT_VEHICLE and STATION_GROUP.
filterTownHudActionTooltip(entity : Engine.Entity, userParam : TownHudUserParam) : boolean base/tealdef/gui/entity_window/entity_window_hud.d.tl:36
Call as entity_window_hud.filterTownHudActionTooltip
Notes
Tooltip filter of the town window.
| Parameter | Type | Description |
|---|---|---|
entity |
Engine.Entity |
Hovered entity. |
userParam |
TownHudUserParam |
User parameter with the selected town and tab. |
Returns boolean: True for the town; on the "Bonuses" tab for perks near the town; otherwise for related industries, vehicles and stations of lines stopping in the town, and warehouses storing matching cargo.
getTownHudIconPreFilter(currentTab : TownReactUtil.TownInfoTabType) : {Engine.ComponentType} base/tealdef/gui/entity_window/entity_window_hud.d.tl:37
Call as entity_window_hud.getTownHudIconPreFilter
Notes
Component types that can get an icon in the town window for a tab.
| Parameter | Type | Description |
|---|---|---|
currentTab |
TownReactUtil.TownInfoTabType |
Selected tab of the town window. |
Returns {Engine.ComponentType}: The component types; for the layer tabs (traffic, happiness, delivery, noise, pollution) the pre-filter of the matching layer.
getMaintenanceHudIconPreFilter() : {Engine.ComponentType} base/tealdef/gui/entity_window/entity_window_hud.d.tl:44
Call as entity_window_hud.getMaintenanceHudIconPreFilter
Notes
Component types that can get a maintenance icon.
Returns {Engine.ComponentType}: VEHICLE_DEPOT and TRANSPORT_VEHICLE.
getVehicleHudIconPreFilter() : {Engine.ComponentType} base/tealdef/gui/entity_window/entity_window_hud.d.tl:50
Call as entity_window_hud.getVehicleHudIconPreFilter
Notes
Component types that can get an icon in the vehicle window.
Returns {Engine.ComponentType}: LINE and TRANSPORT_VEHICLE.
EntityWindowHud.EntityWindowHudUserParam¶
interface base/tealdef/gui/entity_window/entity_window_hud.d.tl:4
interface EntityWindowHudUserParam is HudIconToolbox.HudIconMasterUserParam
Notes
User parameter of the entity window HUD icon masters.
Used in the base game: 15 times in 5 files
base/content/gui/gui/entity_window/entity_window_hud.tl:107
local function getIndustryHudMasterState(entity : Engine.Entity, userParam : EntityWindowHud.EntityWindowHudUserParam) : IndustryHudMasterState
base/content/gui/gui/entity_window/town_building/town_building.tl:455
base/content/gui/gui/entity_window/perk/perk.tl:168
base/content/gui/gui/entity_window/industry/industry.tl:364
base/content/game_mechanics/game_mechanics/emission/pollution_cleanup_facility_hud.script.tl:72
Fields
| Name | Type | Description |
|---|---|---|
cargoTypes |
{CargoTypeId : CargoUtil.StockProperties} |
Cargo types of the selected entity with input/output flags; entities producing or consuming matching cargo get icons. |
EntityWindowHud.SubventionHudUserParam¶
record base/tealdef/gui/entity_window/entity_window_hud.d.tl:19
record SubventionHudUserParam
Notes
User parameter of EntityWindowHud.SubventionHudIconMaster.
Used in the base game: 1 time in 1 file
base/content/gui/gui/entity_window/entity_window_hud.tl:722
Fields
| Name | Type | Description |
|---|---|---|
subvention |
ISubvention |
Subsidy whose relevant entities (from its script's getRelevantEntities) get icons. |
EntityWindowHud.TownHudUserParam¶
record base/tealdef/gui/entity_window/entity_window_hud.d.tl:32
record TownHudUserParam is EntityWindowHudUserParam
Notes
User parameter of the town window HUD icons.
Used in the base game: 5 times in 2 files
base/content/gui/gui/entity_window/entity_window_hud.tl:308
entity_window_hud.filterTownBuildingHudActionTooltip = function(entity : Engine.Entity, userParam : EntityWindowHud.TownHudUserParam) : boolean
base/content/gui/gui/entity_window/town/town.tl:1054
Fields
| Name | Type | Description |
|---|---|---|
currentTab |
TownReactUtil.TownInfoTabType |
Selected tab of the town window; decides which icons are shown (e.g. "Overview", "Bonuses", "Traffic", "Noise"). |
showAllTowns |
boolean |
Shows the icons of all towns, not only the selected one. |
EntityWindowHud.MaintenanceHudUserParam¶
record base/tealdef/gui/entity_window/entity_window_hud.d.tl:40
record MaintenanceHudUserParam is HudIconToolbox.HudIconMasterUserParam
Notes
User parameter of EntityWindowHud.MaintenanceHudIconMaster.
Used in the base game: 1 time in 1 file
base/content/gui/gui/entity_window/entity_window_hud.tl:797
Fields
| Name | Type | Description |
|---|---|---|
transportModes |
{TransportMode} |
Transport modes to show; only vehicles and maintenance stations supporting one of them get an icon. |
EntityWindowHud.VehicleHudUserParam¶
record base/tealdef/gui/entity_window/entity_window_hud.d.tl:46
record VehicleHudUserParam is HudIconToolbox.HudIconMasterUserParam
Notes
User parameter of EntityWindowHud.VehicleHudIconMaster.
Used in the base game: 2 times in 2 files
base/content/gui/gui/entity_window/entity_window_hud.tl:864
entity_window_hud.VehicleHudIconMaster = react.RegisterRecipe("VehicleHudIconMaster", function(params : Builtin.HudIconParam, userParam : EntityWindowHud.Vehicl
base/content/gui/gui/entity_window/vehicle/vehicle.tl:554
Fields
| Name | Type | Description |
|---|---|---|
lineEntity |
Engine.Entity |
Line of the selected vehicle; vehicles on the same line get icons. |