industry_react_util¶
Quelle: base/tealdef/gui/entity_window/industry_react_util.d.tl
Hinweise
React-Recipes des Industrie- und des Bonusfensters, die Produktionsregeln (Eingänge, Ausgänge, Fortschritt und Dauer) und den Arbeiter-Boost zeigen.
RuleDurationInfoParams¶
record global base/tealdef/gui/entity_window/industry_react_util.d.tl:3
global record RuleDurationInfoParams
Hinweise
Ergebnis von IndustryReactUtil.GetRuleDurationTextAndBoosted.
Felder
IndustryWindowRuleDurationParams¶
record global base/tealdef/gui/entity_window/industry_react_util.d.tl:9
global record IndustryWindowRuleDurationParams
Hinweise
Parameter von IndustryReactUtil.IndustryWindowRuleDurationWidget.
Felder
| Name | Typ | Beschreibung |
|---|---|---|
entity |
Engine.Entity |
Entität mit der Komponente STOCK_LIST, die die Produktionsregeln enthält. |
ruleNumber |
integer |
Index der Produktionsregel, beginnend bei 1. |
RuleProgressBarParams¶
record global base/tealdef/gui/entity_window/industry_react_util.d.tl:14
global record RuleProgressBarParams
Hinweise
Parameter von IndustryReactUtil.RuleProgressBar.
Felder
| Name | Typ | Beschreibung |
|---|---|---|
entity |
Engine.Entity |
Entität mit der Komponente STOCK_LIST, die die Produktionsregeln enthält. |
ruleNumber |
integer |
Index der Produktionsregel, beginnend bei 1. Bei nil erscheint die erste laufende Regel, die kein Booster ist. |
durationAsTooltip |
boolean |
Zeigt die Zyklusdauer nur als Tooltip statt als Text unter dem Balken. |
invertProgressBar |
boolean |
Zeigt den verbleibenden statt des abgelaufenen Teils des Zyklus. |
RuleInputOutputWidgetParams¶
record global base/tealdef/gui/entity_window/industry_react_util.d.tl:21
global record RuleInputOutputWidgetParams
Hinweise
Parameter von IndustryReactUtil.IndustryWindowRuleInputOutputWidget.
Felder
| Name | Typ | Beschreibung |
|---|---|---|
entity |
Engine.Entity |
Entität mit den Produktionsregeln. |
ruleNumber |
integer |
Index der Produktionsregel, beginnend bei 1. |
isInput |
boolean |
Zeigt die Eingänge (true) oder Ausgänge (false) der Regel. |
recipe |
Recipe<IndustryUtil.RuleInputOutputCargoParams> |
Recipe, das einmal je Gut der Regel erzeugt wird (mit index auf die Position des Guts gesetzt). |
isIndustry |
boolean |
Wird an recipe weitergegeben. True bei Industrien. |
onlyOneProductionLine |
boolean |
Wird an recipe weitergegeben. Das Basisspiel setzt es, wenn die Regel keine Eingangsgüter hat. |
RuleWidgetParams¶
record global base/tealdef/gui/entity_window/industry_react_util.d.tl:30
global record RuleWidgetParams
Hinweise
Parameter von IndustryReactUtil.ProductionRuleWidget.
Felder
| Name | Typ | Beschreibung |
|---|---|---|
entity |
Engine.Entity |
Entität mit den Produktionsregeln. |
ruleNumber |
integer |
Index der Produktionsregel, beginnend bei 1. |
durationAsTooltip |
boolean |
Wird vom Widget nicht gelesen. Es zeigt die Dauer immer als Tooltip. |
invertProgressBar |
boolean |
Wird vom Widget nicht gelesen. Es zeigt immer den abgelaufenen Teil. |
isBoosted |
boolean |
Fügt die Style-Klasse boosted hinzu. |
isIndustry |
boolean |
True bei Industrien. Hat die Regel Eingangsgüter, kommt die Beschriftung „Max.“ hinzu. |
RuleProgressBarParams¶
record global base/tealdef/gui/entity_window/industry_react_util.d.tl:39
global record RuleProgressBarParams
Hinweise
Parameter von IndustryReactUtil.RuleProgressBar.
Felder
| Name | Typ | Beschreibung |
|---|---|---|
entity |
Engine.Entity |
Entität mit der Komponente STOCK_LIST, die die Produktionsregeln enthält. |
ruleNumber |
integer |
Index der Produktionsregel, beginnend bei 1. Bei nil erscheint die erste laufende Regel, die kein Booster ist. |
durationAsTooltip |
boolean |
Zeigt die Zyklusdauer nur als Tooltip statt als Text unter dem Balken. |
invertProgressBar |
boolean |
Zeigt den verbleibenden statt des abgelaufenen Teils des Zyklus. |
ProductionRulesWidgetParams¶
record global base/tealdef/gui/entity_window/industry_react_util.d.tl:46
global record ProductionRulesWidgetParams
Hinweise
Parameter von IndustryReactUtil.ProductionRulesWidget.
Felder
| Name | Typ | Beschreibung |
|---|---|---|
entity |
Engine.Entity |
Entität mit den Produktionsregeln. |
isIndustry |
boolean |
True bei Industrien. |
maxLevel |
boolean |
Fügt den Hinweis „Industry is expanded to it's full potential.“ hinzu (dt. „Maximale Industrieerweiterung erreicht.“). |
failedToExpand |
boolean |
Fügt den Hinweis „Industry is blocked from further expansion.“ hinzu (dt. „Industrieerweiterung ist blockiert.“), wenn maxLevel false ist. |
IconAndLabelParams¶
record global base/tealdef/gui/entity_window/industry_react_util.d.tl:53
global record IconAndLabelParams
Hinweise
Parameter von IndustryReactUtil.IconAndLabelWidget.
Felder
ProductionIconWithBubbleParams¶
record global base/tealdef/gui/entity_window/industry_react_util.d.tl:62
global record ProductionIconWithBubbleParams
Hinweise
Parameter von IndustryReactUtil.ProductionIconWithBubble.
Felder
WorkplacesBoosterParams¶
record global base/tealdef/gui/entity_window/industry_react_util.d.tl:69
global record WorkplacesBoosterParams
Hinweise
Parameter von IndustryReactUtil.WorkplacesBoosterRow.
Felder
| Name | Typ | Beschreibung |
|---|---|---|
entity |
Engine.Entity |
Entität mit einer Komponente PERSON_CAPACITY (Arbeitsplätze). |
boosted |
boolean |
Fügt den Zellen die Style-Klasse boosted hinzu. |
WorkplacesBoosterMinimumIconParams¶
record global base/tealdef/gui/entity_window/industry_react_util.d.tl:74
global record WorkplacesBoosterMinimumIconParams
Hinweise
Parameter des Symbols mit der Arbeiterzahl in der Booster-Zeile der Arbeitsplätze.
Felder
| Name | Typ | Beschreibung |
|---|---|---|
entity |
Engine.Entity |
Entität mit einer Komponente PERSON_CAPACITY. |
WorkplacesBoosterProgressBarParams¶
record global base/tealdef/gui/entity_window/industry_react_util.d.tl:78
global record WorkplacesBoosterProgressBarParams
Hinweise
Parameter des Arbeiter-Fortschrittsbalkens in der Booster-Zeile der Arbeitsplätze.
Felder
| Name | Typ | Beschreibung |
|---|---|---|
entity |
Engine.Entity |
Entität mit einer Komponente PERSON_CAPACITY. |
WorkplacesBoostFactorIconParams¶
record global base/tealdef/gui/entity_window/industry_react_util.d.tl:82
global record WorkplacesBoostFactorIconParams
Hinweise
Parameter des Symbols mit dem Boost-Faktor in der Booster-Zeile der Arbeitsplätze.
Felder
| Name | Typ | Beschreibung |
|---|---|---|
entity |
Engine.Entity |
Entität mit einer Komponente PERSON_CAPACITY. |
IndustryReactUtil¶
record global base/tealdef/gui/entity_window/industry_react_util.d.tl:86
global record IndustryReactUtil
Laden: local industry_react_util = ug_require "::/gui/entity_window/industry_react_util.tl" as IndustryReactUtil
Hinweise
React-Recipes und Hilfsfunktionen für Produktionsregeln und den Arbeiter-Boost im Industrie- und im Bonusfenster.
Felder
| Name | Typ | Beschreibung |
|---|---|---|
IndustryWindowRuleDurationWidget |
Recipe<IndustryWindowRuleDurationParams> |
Text mit der Zyklusdauer einer Produktionsregel, bei Boost im Style success. |
RuleProgressBar |
Recipe<RuleProgressBarParams> |
Fortschrittsbalken des laufenden Zyklus einer Produktionsregel, mit der Dauer als Tooltip oder Text. Im Style slowdown, wenn die Lieferzeit ihn verlangsamt. 1-mal im Basisspiel verwendet |
IndustryWindowRuleInputOutputWidget |
Recipe<RuleInputOutputWidgetParams> |
Zeile mit einem recipe-Widget je Eingangs- oder Ausgangsgut einer Produktionsregel. 2-mal im Basisspiel verwendet |
ProductionRuleWidget |
Recipe<RuleWidgetParams> |
Eine Produktionsregel als Balken, geteilt in Eingänge und Ausgänge (Gütersymbole mit Mengen, aktuelle und maximale Produktion), dazu ein Fortschrittsbalken.Im Spiel Aktuelle Produktion · Keine Eingabe · {count} ParzellenIm Code: Current Production · No Input · {count} Plots |
ProductionRulesWidget |
Recipe<ProductionRulesWidgetParams> |
Alle Produktionsregeln einer Entität, die keine Booster sind, und ein Hinweis, wenn die Industrie voll ausgebaut oder am Ausbau gehindert ist.Im Spiel Maximale Industrieerweiterung erreicht. · Industrieerweiterung ist blockiert.Im Code: Industry is expanded to its full potential. · Industry is blocked from further expansion. 3-mal im Basisspiel verwendet |
ProductionIconWithBubble |
Recipe<ProductionIconWithBubbleParams> |
Symbol mit einer kleinen Textblase darüber, z. B. ein Gütersymbol mit seiner Menge. |
IconAndLabelWidget |
Recipe<IconAndLabelParams> |
Symbol mit Text daneben und optional einer Jahresmenge darunter. 1-mal im Basisspiel verwendet |
WorkplacesBoosterRow |
Recipe<WorkplacesBoosterParams> |
Tabellenzeile mit dem Arbeiter-Boost einer Entität: aktuelle und benötigte Arbeiter, ein Fortschrittsbalken bis zur benötigten Zahl (Kapazität mal industry_productivity_util.RequiredWorkersFractionForBoost), der mögliche Boost in Prozent und ein Häkchensymbol. 2-mal im Basisspiel verwendet |
Funktionen
makeIconAndLabel(icon : string, iconTooltip : string, count : string, countTooltip : string) : {TreeNodeId} base/tealdef/gui/entity_window/industry_react_util.d.tl:87
Aufruf: industry_react_util.makeIconAndLabel(…)
Die Spieldateien enthalten hierzu noch keine Beschreibung.
Rückgabe {TreeNodeId}
isPersonCapacityBoosted(entity : Engine.Entity) : boolean base/tealdef/gui/entity_window/industry_react_util.d.tl:88
Aufruf: industry_react_util.isPersonCapacityBoosted(…)
Hinweise
Liefert, ob eine Entität mit Arbeitsplätzen gerade einen Boost hat.
| Parameter | Typ | Beschreibung |
|---|---|---|
entity |
Engine.Entity |
Entität mit einer Komponente PERSON_CAPACITY. |
Rückgabe boolean: True, wenn ihr Industrie-Boost über 1 liegt. Nil, wenn sie keine Arbeitsplätze hat.
GetRuleDurationTextAndBoosted(entity : Engine.Entity, ruleNumber : integer, showDecayFactor? : boolean) : RuleDurationInfoParams base/tealdef/gui/entity_window/industry_react_util.d.tl:90
Aufruf: industry_react_util.GetRuleDurationTextAndBoosted(…)
Hinweise
Berechnet die Zyklusdauer einer Produktionsregel als Text.
Im Spiel {total} (+ {diff} aufgrund der Lieferzeit)
· {total} (- {diff} aufgrund der Lieferzeit)
Im Code: {total} (+ {diff} Due to Delivery Time)
· {total} (- {diff} Due to Delivery Time)
| Parameter | Typ | Beschreibung |
|---|---|---|
entity |
Engine.Entity |
Entität mit der Komponente STOCK_LIST. |
ruleNumber |
integer |
Index der Regel, beginnend bei 1. |
showDecayFactor? |
boolean |
Fügt die Änderung der Dauer hinzu, die die Lieferzeit der Eingänge verursacht. |
Rückgabe RuleDurationInfoParams: Text der Dauer und die Flags für Boost und Verlangsamung.
Details
Läuft die Regel, wird das Intervall ihrer letzten Anwendung verwendet. Sonst ist es ein Spieljahr geteilt durch die Kapazität der Regel, bei Regeln, die keine Booster sind, zusätzlich geteilt durch den Industrie-Boost.