notification_legacy_util¶
Source: base/tealdef/game_mechanics/notifications/notification_legacy_util.d.tl
Notes
Initial state and save-game migration of the notifications game-script state.
NotificationLegacyUtil¶
record global base/tealdef/game_mechanics/notifications/notification_legacy_util.d.tl:3
global record NotificationLegacyUtil
Load: local notification_legacy_util = ug_require "::/game_mechanics/notifications/notification_legacy_util.tl"
Notes
Initial state and save-game migration of NotificationsState.
Fields
| Name | Type | Description |
|---|---|---|
CurrentVersion |
integer |
Current version of the state layout (24 in this game version). used 1× in the base game |
Functions
makeInitialState() : NotificationsState base/tealdef/game_mechanics/notifications/notification_legacy_util.d.tl:5
Call as notification_legacy_util.makeInitialState
Notes
Makes an empty notifications state.
Returns NotificationsState: State with no notifications, ignored.types from NotificationUtil.getInitiallyIgnoredTypes(), ignored.fully = false and version = CurrentVersion.
updateLegacyState(notificationsState : NotificationsState) base/tealdef/game_mechanics/notifications/notification_legacy_util.d.tl:6
Call as notification_legacy_util.updateLegacyState
Notes
Migrates a state from an older save game to CurrentVersion, in place. States older than version 9 are replaced by an empty state.
| Parameter | Type | Description |
|---|---|---|
notificationsState |
NotificationsState |
State to migrate. |