celebration_react_util¶
Source: base/tealdef/game_mechanics/celebrations/celebration_react_util.d.tl
Notes
Celebration types, the GUI event that shows a celebration and the recipe that displays them.
CelebrationType¶
enum global base/tealdef/game_mechanics/celebrations/celebration_react_util.d.tl:3
global enum CelebrationType
Notes
Kind of celebration callout. The celebrations game script tracks these firsts and level-ups.
CelebrationAddedEventParams¶
record global base/tealdef/game_mechanics/celebrations/celebration_react_util.d.tl:11
global record CelebrationAddedEventParams
Notes
Param of the GUI React event celebration-add, fired by the celebrations game script (guiUpdate). CelebrationsContainer queues and shows it.
Example
Fields
| Name | Type | Description |
|---|---|---|
type |
CelebrationType |
Kind of celebration. |
entity |
EntityUtil.EntityAndRevision |
The town or industry. Not set for CompanyLevelUp. |
value |
integer |
For TownLevelUp the new town level, for CompanyLevelUp the new company rank, otherwise the count of deliveries or boardings so far. |
reputationEffect |
boolean |
The event also raised a town's reputation; the text then says so. |
reputationEffectEntity |
EntityUtil.EntityAndRevision |
Town whose reputation was raised, if it is not entity (for CargoDeliveredToIndustry, the town closest to the industry). |
CelebrationsContainerParams¶
record global base/tealdef/game_mechanics/celebrations/celebration_react_util.d.tl:19
global record CelebrationsContainerParams
Notes
Params of CelebrationsContainer.
Fields
| Name | Type | Description |
|---|---|---|
gameCtx |
GameContext |
Game GUI context; its callout container shows the celebrations. |
CelebrationReactUtil¶
record global base/tealdef/game_mechanics/celebrations/celebration_react_util.d.tl:23
global record CelebrationReactUtil
Load: local celebration_react_util = ug_require "/game_mechanics/celebrations/celebration_react_util.tl"
Notes
GUI recipe for celebration callouts.
Fields
| Name | Type | Description |
|---|---|---|
CelebrationsContainer |
Recipe<CelebrationsContainerParams> |
Collects celebration-add events and shows them one at a time as callouts at the top of the screen, with the CelebrationSFX.Earned sound. used 1× in the base game |