company_react_util¶
Source: base/tealdef/game_mechanics/company/company_react_util.d.tl
Notes
GUI helpers of the company window.
CompanyReactUtil¶
record global base/tealdef/game_mechanics/company/company_react_util.d.tl:3
global record CompanyReactUtil
Load: local company_react_util = ug_require "/game_mechanics/company/company_react_util.tl"
Notes
GUI helpers of the company window.
Functions
gatherSortedStaticCompanyData({ConstructionDefinition}) : {CompanyStaticUtil.RankDescription} base/tealdef/game_mechanics/company/company_react_util.d.tl:5
Call as company_react_util.gatherSortedStaticCompanyData
Notes
Sorts construction definitions with company metadata into the ranks at which they unlock or gain permits.
| Parameter | Type | Description |
|---|---|---|
#1 |
{ConstructionDefinition} |
Construction definitions. |
Returns {CompanyStaticUtil.RankDescription}: Rank descriptions with their perks.
getNumberOfAvailablePermits(allRelevant : {ConstructionDefinition}, permitKey : ResName) : integer base/tealdef/game_mechanics/company/company_react_util.d.tl:7
Call as company_react_util.getNumberOfAvailablePermits
Notes
Returns how many permits of a key the player can still use.
| Parameter | Type | Description |
|---|---|---|
allRelevant |
{ConstructionDefinition} |
Construction definitions with company metadata. |
permitKey |
ResName |
Permit key. |
Returns integer: Number of permits.