perk_eow¶
Source: base/tealdef/gui/entity_window/perk/perk_eow.d.tl
Notes
Plugin types of the perk window (landmarks, headquarters and other company buildings) (perk_eow.script.tl).
PerkEow¶
record global base/tealdef/gui/entity_window/perk/perk_eow.d.tl:3
global record PerkEow
Load: local perk_eow = ug_require "/gui/entity_window/perk/perk_eow.script.tl"
Notes
Plugin types of the perk window (landmarks, headquarters).
Fields
| Name | Type | Description |
|---|---|---|
PerkEowExtensionPoint |
ExtensionPoint<PerkWidgetPluginParams> |
Extension point of the perk window; register plugins with a resource of type "react-plugin ::PerkEowExtensionPoint". used 1× in the base game |
PerkBasicsPlugin |
Recipe<PerkWidgetPluginParams> |
Cards with the construction description and numbers, noise and pollution (if any) and the production rules (if any); registered with order 10. |
PerkCombinedStocksPlugin |
Recipe<PerkWidgetPluginParams> |
Simplified input and output stock cards of the stock list entity; registered with order 40 and condition hasStockListEntity. |
PerkBoosterPlugin |
Recipe<PerkWidgetPluginParams> |
Card with the workers boost row and the workers table; registered with order 50 and condition hasPersonCapacityAndStockListEntity. |
PerkPersonCapacityPlugin |
Recipe<PerkWidgetPluginParams> |
Card with the person capacity and the table of visitors or workers; registered with order 60 and condition hasPersonCapacityButNotStockListEntity. |
PerkMaintenanceBarPlugin |
Recipe<PerkWidgetPluginParams> |
Yearly upkeep bar of the construction; registered with order 70. |
NotificationPlugin |
Recipe<PerkWidgetPluginParams> |
Notification cards of the perk; registered with order 0. |
Functions
conditionPerkEmission(params : PerkEow.PerkWidgetPluginParams) : boolean base/tealdef/gui/entity_window/perk/perk_eow.d.tl:26
Call as perk_eow.conditionPerkEmission
Notes
True if the perk has noise or pollution; decides whether PerkBasicsPlugin shows the emission card.
Returns boolean
conditionPerkProductionRule(params : PerkEow.PerkWidgetPluginParams) : boolean base/tealdef/gui/entity_window/perk/perk_eow.d.tl:27
Call as perk_eow.conditionPerkProductionRule
Notes
True if the perk has a stock list with production rules; decides whether PerkBasicsPlugin shows the production card.
Returns boolean
hasStockListEntity(params : PerkEow.PerkWidgetPluginParams) : boolean base/tealdef/gui/entity_window/perk/perk_eow.d.tl:28
Call as perk_eow.hasStockListEntity
Notes
Plugin condition; true if the perk has a stock list entity.
Returns boolean
hasPersonCapacityAndStockListEntity(params : PerkEow.PerkWidgetPluginParams) : boolean base/tealdef/gui/entity_window/perk/perk_eow.d.tl:29
Call as perk_eow.hasPersonCapacityAndStockListEntity
Notes
Plugin condition; true if the perk has both a person capacity and a stock list entity.
Returns boolean
hasPersonCapacityButNotStockListEntity(params : PerkEow.PerkWidgetPluginParams) : boolean base/tealdef/gui/entity_window/perk/perk_eow.d.tl:30
Call as perk_eow.hasPersonCapacityButNotStockListEntity
Notes
Plugin condition; true if the perk has a person capacity entity but no stock list entity.
Returns boolean
PerkEow.PerkEowState¶
record base/tealdef/gui/entity_window/perk/perk_eow.d.tl:4
record PerkEowState
Notes
State of the perk window, recomputed every step and passed to the plugins.
Used in the base game: 2 times in 1 file
base/content/gui/gui/entity_window/perk/perk.tl:47
Fields
| Name | Type | Description |
|---|---|---|
personCapacityEntity |
Engine.Entity |
First subconstruction, if it has a PERSON_CAPACITY component. |
stockListEntity |
Engine.Entity |
First subconstruction, if it has a STOCK_LIST component. |
hasStockListWithRules |
boolean |
True if the stock list has production rules. |
boosted |
boolean |
True if the stock list entity is boosted by its workers. |
isHeadquarters |
boolean |
True if the construction has slots and its company metadata marks it as headquarters. |
cargoTypes |
{CargoTypeId : CargoUtil.StockProperties} |
Cargo types of the stock list with input/output flags. |
noise |
integer |
Sum of the noise power of all subconstructions with an emission emitter, rounded. |
pollution |
integer |
Sum of the pollution power of all subconstructions with an emission emitter, rounded. |
PerkEow.PerkWidgetPluginParams¶
record base/tealdef/gui/entity_window/perk/perk_eow.d.tl:14
record PerkWidgetPluginParams is EowExtensionUtil.IEowWidgetsExtensionParams
Notes
Parameters passed to the plugins of the perk window.
Used in the base game: 12 times in 2 files
base/content/gui/gui/entity_window/perk/perk.tl:98
base/content/gui/gui/entity_window/perk/perk_eow.script.tl:89
Fields
| Name | Type | Description |
|---|---|---|
state |
PerkEowState |
Window state. |