notification_types¶
Source: base/tealdef/game_mechanics/notifications/types/notification_types.d.tl
Notes
Params and sim params of the base game's notification types in game_mechanics/notifications/types/.
Globals¶
Types
| Name | Definition | Description |
|---|---|---|
ISubvention |
declared here, defined in ISubvention |
One subsidy instance as stored in SubventionState. |
AnimalDespawnNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:5
global record AnimalDespawnNotificationParams
Notes
Params of the animaldespawn notification ("A Grieving Day", category Info).
Fields
| Name | Type | Description |
|---|---|---|
entity |
EntityUtil.EntityAndRevision |
The animal; clicking the notification focuses it if it still exists. |
animalName |
string |
Name of the animal, used in the text. |
AvailabilityNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:10
global record AvailabilityNotificationParams
Notes
Params of the availability notification about newly available vehicles (category Info), sent by availability_notifications.script.tl.
Fields
| Name | Type | Description |
|---|---|---|
models |
{string} |
Resource names of the new vehicle models. |
multipleUnits |
{string} |
Resource names of the new multiple units. |
ConAvailabilityNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:15
global record ConAvailabilityNotificationParams
Notes
Params of the con_availability notification about newly available constructions, streets and tracks (category Info), sent by availability_notifications.script.tl.
Fields
| Name | Type | Description |
|---|---|---|
resName |
ResName |
Resource name; clicking the notification opens the construction menu at it. |
conRepType |
ConRepType |
Repository of resName. |
image |
string |
Preview image, the resource's description icon. |
name |
string |
Display name. |
availabilityGroup |
string |
The resource's availability.notificationGroup. Resources of the same group become one notification; "" means no group. |
availabilitySortKey |
integer |
The resource's availability.notificationSortKey; orders the variations of a group. |
categories |
{string} |
Menu categories of the resource, e.g. tracks or street_constructions; they pick the icon and text. |
variations |
{string} |
Names of all resources in the group; the text lists up to 6. |
special |
SpecialNotification |
Set for a new feature (tram catenary, traffic lights) instead of a resource. |
ConAvailabilityNotificationParams.ConRepType¶
enum base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:16
enum ConRepType
Notes
Repository that resName belongs to.
Used in the base game: 2 times in 1 file
base/content/game_mechanics/game_mechanics/notifications/availability_notifications.script.tl:12
ConAvailabilityNotificationParams.SpecialNotification¶
enum base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:21
enum SpecialNotification
Notes
Newly available features that are not a resource.
| Value | Description |
|---|---|
"TramCatenary" |
Tram track catenary became available. |
"TrafficLight" |
Traffic lights became available. |
CargoRtcWarningNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:36
global record CargoRtcWarningNotificationParams
Notes
Params of the persistent cargo_rtc_warning notification ("Cargo Unload Problem", category Caution) for vehicles that carry cargo around their line without unloading it.
Fields
| Name | Type | Description |
|---|---|---|
entities |
{EntityUtil.EntityAndRevision} |
vehicle enitities (all the ones with a roundtrip) |
param |
integer |
always 1 to not produce multiple warnings |
CargoRtcWarningNotificationSimParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:41
global record CargoRtcWarningNotificationSimParams
Notes
Sim params of cargo_rtc_warning.
Fields
| Name | Type | Description |
|---|---|---|
mapping |
{Engine.Entity : {string, integer}} |
Per vehicle, { name, cargo count }. The name is refreshed on each update; the count is taken from getVehiclesWithRoundTripCount() once. |
CargoThrownAwayNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:45
global record CargoThrownAwayNotificationParams
Notes
Params for a cargo-thrown-away notification. No notification type in the base game uses it.
Fields
| Name | Type | Description |
|---|---|---|
entities |
{EntityUtil.EntityAndRevision} |
|
param |
integer |
always 1 to not produce multiple warnings |
CargoThrownAwayNotificationSimParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:50
global record CargoThrownAwayNotificationSimParams
Notes
Sim params for a cargo-thrown-away notification. No notification type in the base game uses it.
Fields
| Name | Type | Description |
|---|---|---|
cargo |
integer |
IndustryNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:54
global record IndustryNotificationParams
Notes
Params of the industry_spawn ("New Industry Founded", Info) and industry_close (Caution, persistent) notifications.
Details
The definition file declares this record twice. The second declaration has
entity : Engine.Entity and revision0; the type scripts use the first one
(entity : EntityUtil.EntityAndRevision).
Fields
| Name | Type | Description |
|---|---|---|
entity |
EntityUtil.EntityAndRevision |
The industry. |
resName |
string |
For industry_close, the resource name that api.engine.util.industry.getClosingIndustries() returns with the industry. |
IndustryNotificationSimParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:59
global record IndustryNotificationSimParams
Notes
Sim params of the industry notifications.
Fields
| Name | Type | Description |
|---|---|---|
mapping |
{Engine.Entity : string} |
Name of the industry entity, kept so the text works after the industry is gone. |
IndustryNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:63
global record IndustryNotificationParams
Notes
Params of the industry_spawn ("New Industry Founded", Info) and industry_close (Caution, persistent) notifications.
Details
The definition file declares this record twice. The second declaration has
entity : Engine.Entity and revision0; the type scripts use the first one
(entity : EntityUtil.EntityAndRevision).
Fields
| Name | Type | Description |
|---|---|---|
entity |
Engine.Entity |
The industry. |
revision0 |
integer |
First revision number of the industry entity. |
resName |
string |
For industry_close, the resource name that api.engine.util.industry.getClosingIndustries() returns with the industry. |
IndustryNotificationSimParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:69
global record IndustryNotificationSimParams
Notes
Sim params of the industry notifications.
Fields
| Name | Type | Description |
|---|---|---|
mapping |
{Engine.Entity : string} |
Name of the industry entity, kept so the text works after the industry is gone. |
LineStationProblemNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:73
global record LineStationProblemNotificationParams
Notes
Params of the persistent line_station_warning notification ("Station Issue", category Problem), created from api.engine.util.line.getLineStationProblems().
Fields
| Name | Type | Description |
|---|---|---|
entities |
{EntityUtil.EntityAndRevision} |
2: line entity, station group entity |
param |
integer |
LineStationProblem |
LineStationProblemNotificationSimParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:78
global record LineStationProblemNotificationSimParams
Notes
Sim params of line_station_warning.
Fields
| Name | Type | Description |
|---|---|---|
lineName |
string |
Name of the line. |
stationName |
string |
Name of the station group. |
LineProblemNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:83
global record LineProblemNotificationParams
Notes
Params of the persistent line_warning notification ("Line Problem", category Problem), created from api.engine.util.line.getLineProblems() and getLinesIssues().
Fields
| Name | Type | Description |
|---|---|---|
entities |
{EntityUtil.EntityAndRevision} |
should be exactly one line entity |
param |
LineProblemParams |
What is wrong with the line. |
LineProblemNotificationParams.LineProblemParams¶
record base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:84
record LineProblemParams
Notes
What is wrong with the line.
Used in the base game: 1 time in 1 file
base/content/game_mechanics/game_mechanics/notifications/types/line_warning.script.tl:6
Fields
| Name | Type | Description |
|---|---|---|
lineProblem |
integer |
Value of api.type.enum.LineProblem (e.g. NO_PATH), or -1 for a cargo misconfiguration described by lineIssues. |
okModes |
{TransportMode : boolean} |
Transport modes from the problem data; with relaxedModes and allowedModes they give the reason text for NO_PATH and BAD_ALTERNATIVE_TERMINAL. |
relaxedModes |
{TransportMode : boolean} |
Relaxed transport modes from the problem data, see okModes. |
allowedModes |
{TransportMode : boolean} |
Allowed transport modes from the problem data, see okModes. |
locationOverride |
{integer, integer, integer} |
Position {x, y, z} of the problem node. Clicking the notification focuses the camera there instead of on the line. |
lineIssues |
{{LineIssue.Type, integer, CargoTypeId}} |
can't pass an array of LineIssue from sim to UI (it causes a crash when copying the type), so passing a tuple of its content instead |
LineProblemNotificationSimParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:97
global record LineProblemNotificationSimParams
Notes
Sim params of line_warning.
Fields
| Name | Type | Description |
|---|---|---|
lineName |
string |
Name of the line. |
NewCargoDemandNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:101
global record NewCargoDemandNotificationParams
Notes
Params of the newcargodemand notification ("New Cargo Demand", category Info).
Fields
| Name | Type | Description |
|---|---|---|
entity |
EntityUtil.EntityAndRevision |
The town. |
cargoTypeId |
CargoTypeId |
The cargo type the town now requires. |
NewCargoDemandNotificationSimParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:106
global record NewCargoDemandNotificationSimParams
Notes
Sim params of newcargodemand.
Fields
| Name | Type | Description |
|---|---|---|
name |
string |
Name of the town. |
NoRoadConnection¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:110
global record NoRoadConnection
Notes
Params of the persistent noroadconnection notification ("Station Not Connected", category Caution), created from api.engine.util.line.getNoRoadConnectionProblems().
Fields
| Name | Type | Description |
|---|---|---|
entities |
{EntityUtil.EntityAndRevision} |
The entity without road connection. |
NoRoadConnectionSimParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:114
global record NoRoadConnectionSimParams
Notes
Sim params of noroadconnection.
Fields
| Name | Type | Description |
|---|---|---|
name |
string |
Name of the entity, set when entities has exactly one entry. |
SubventionMissedNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:118
global record SubventionMissedNotificationParams
Notes
Params of the subvention_missed notification ("Subsidy Missed", category Info), sent by subventions.script.tl when an offered subsidy despawns.
Fields
| Name | Type | Description |
|---|---|---|
entitiesAndRevisions0 |
{{Engine.Entity, integer}} |
Relevant entities of the subsidy as {entity, first revision number} pairs. |
subventionId |
string |
Resource name of the subsidy. |
reason |
ISubvention.FailReason |
Why the subsidy was missed. |
params |
any |
Data from the subsidy script's getNotificationParams, passed back to its getNotificationMissedData. |
SubventionMissedNotificationSimParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:125
global record SubventionMissedNotificationSimParams
Notes
Sim params of subvention_missed.
Fields
| Name | Type | Description |
|---|---|---|
mapping |
{Engine.Entity : string} |
Names of the relevant entities that still exist. |
SubventionNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:129
global record SubventionNotificationParams
Notes
Params of the persistent subvention_notification notification ("Subsidy Status", category Opportunity) for proposed, active and completed subsidies.
Fields
| Name | Type | Description |
|---|---|---|
entitiesAndRevisions0 |
{{Engine.Entity, integer}} |
Relevant entities of the subsidy as {entity, first revision number} pairs. |
uid |
number |
Unique id of the subsidy instance. |
id |
string |
Resource name of the subsidy. |
status |
integer |
1 = proposed, 2 = in progress, 3 = effect active. |
params |
any |
Data from the subsidy script's getNotificationParams. |
SubventionNotificationSimParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:137
global record SubventionNotificationSimParams
Notes
Sim params of subvention_notification.
Fields
| Name | Type | Description |
|---|---|---|
mapping |
{Engine.Entity : string} |
Names of the relevant entities. |
SubventionFailedNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:141
global record SubventionFailedNotificationParams
Notes
Params of the subvention notification ("Subsidy Failed", category Opportunity), sent by subventions.script.tl.
Fields
| Name | Type | Description |
|---|---|---|
entitiesAndRevisions0 |
{{Engine.Entity, integer}} |
Relevant entities of the subsidy as {entity, first revision number} pairs. |
status |
ISubvention.Status |
Always "Failed" in the base game. |
taskState |
ISubvention.FailReason |
Why the subsidy failed. |
uid |
number |
Unique id of the subsidy instance. |
id |
string |
Resource name of the subsidy. |
params |
any |
Data from the subsidy script's getNotificationParams. |
SubventionFailedNotificationSimParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:150
global record SubventionFailedNotificationSimParams
Notes
Sim params of subvention.
Fields
| Name | Type | Description |
|---|---|---|
mapping |
{Engine.Entity : string} |
Names of the relevant entities. |
TownRatingNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:154
global record TownRatingNotificationParams
Notes
Params of the persistent town_rating_warning ("Town Rating Very Poor", Problem) and town_rating_warning_nonperistent ("Town Rating Decreasing", Caution) notifications.
Fields
| Name | Type | Description |
|---|---|---|
entities |
{EntityUtil.EntityAndRevision} |
The town. |
param |
TownRatingParams |
Which rating is low. |
TownRatingNotificationParams.TownRatingParams¶
record base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:155
record TownRatingParams
Notes
Which rating is low.
Fields
| Name | Type | Description |
|---|---|---|
key |
string |
Key of the rating, as in town_util.GetRatings(). |
TownProblemNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:162
global record TownProblemNotificationParams
Notes
Params of the persistent town_warning notification ("Town Not Connected", category Problem), created from api.engine.util.town.getTownProblems().
Fields
| Name | Type | Description |
|---|---|---|
entities |
{EntityUtil.EntityAndRevision} |
The two towns. |
param |
TownProblem |
Value of api.type.enum.TownProblem. Disconnected means the road connection is interrupted; any other value means the travel time is too long. |
TownNotificationSimParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:167
global record TownNotificationSimParams
Notes
Sim params of the town notifications.
Fields
| Name | Type | Description |
|---|---|---|
mapping |
{Engine.Entity : string} |
Names of the towns. |
VehicleProblemNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:171
global record VehicleProblemNotificationParams
Notes
Params of the persistent vehicle_warning notification ("Vehicle Problem", category Problem), created from api.engine.util.vehicle.getVehicleProblems().
Fields
| Name | Type | Description |
|---|---|---|
entities |
{EntityUtil.EntityAndRevision} |
The affected vehicles. |
param |
integer |
VehicleProblem |
VehicleProblemNotificatioSimParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:176
global record VehicleProblemNotificatioSimParams
Notes
Sim params of vehicle_warning (the record name is misspelled in the game files).
Fields
| Name | Type | Description |
|---|---|---|
mapping |
{Engine.Entity : string} |
Names of the vehicles. |
typeMapping |
{Engine.Entity : VehicleUtil.VehicleType} |
Vehicle type of each vehicle, taken once; "Train" for vehicles that no longer exist. |
VehicleConditionNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:181
global record VehicleConditionNotificationParams
Notes
Params of the persistent vehiclecondition notification ("Vehicle Condition", category Caution) for vehicles in bad condition (see NotificationsState.wastedVehicles).
Fields
| Name | Type | Description |
|---|---|---|
entities |
{EntityUtil.EntityAndRevision} |
The vehicle. |
VehicleConditionNotificationSimParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:185
global record VehicleConditionNotificationSimParams
Notes
Sim params of vehiclecondition.
Fields
| Name | Type | Description |
|---|---|---|
mapping |
{Engine.Entity : string} |
Names of the vehicles. |
typeMapping |
{Engine.Entity : VehicleUtil.VehicleType} |
Vehicle type of each vehicle, taken once; "Train" for vehicles that no longer exist. |
OvercrowdingNotificationParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:190
global record OvercrowdingNotificationParams
Notes
Params of the persistent overcrowding notification ("Station Overcrowded", category Caution) for player-served station groups whose cargo overflows.
Fields
| Name | Type | Description |
|---|---|---|
entity |
EntityUtil.EntityAndRevision |
The station group. |
StationBusyNotificationSimParams¶
record global base/tealdef/game_mechanics/notifications/types/notification_types.d.tl:194
global record StationBusyNotificationSimParams
Notes
Sim params of overcrowding.
Fields
| Name | Type | Description |
|---|---|---|
mapping |
{Engine.Entity : string} |
Name of the station group. |