mirror of
https://github.com/thepaperpilot/Planar-Pioneers.git
synced 2024-11-24 17:31:47 +00:00
Made actions show affordability
This commit is contained in:
parent
e33d16fdf3
commit
d045e71e5c
3 changed files with 18 additions and 2 deletions
|
@ -98,6 +98,14 @@ export function getIncreaseConnectionsAction(
|
||||||
)} energy`
|
)} energy`
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
fillColor(node: BoardNode) {
|
||||||
|
return Decimal.gte(
|
||||||
|
main.energy.value,
|
||||||
|
formula.evaluate((node.state as { maxConnections: number }).maxConnections)
|
||||||
|
)
|
||||||
|
? "var(--bought)"
|
||||||
|
: "var(--locked)";
|
||||||
|
},
|
||||||
confirmationLabel: (node: BoardNode): NodeLabel =>
|
confirmationLabel: (node: BoardNode): NodeLabel =>
|
||||||
Decimal.gte(
|
Decimal.gte(
|
||||||
main.energy.value,
|
main.energy.value,
|
||||||
|
|
|
@ -743,6 +743,14 @@ export const booster = {
|
||||||
)} energy`
|
)} energy`
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
fillColor(node: BoardNode) {
|
||||||
|
return Decimal.gte(
|
||||||
|
main.energy.value,
|
||||||
|
increaseBoostFormula.evaluate((node.state as unknown as BoosterState).level)
|
||||||
|
)
|
||||||
|
? "var(--bought)"
|
||||||
|
: "var(--locked)";
|
||||||
|
},
|
||||||
confirmationLabel(node: BoardNode) {
|
confirmationLabel(node: BoardNode) {
|
||||||
return Decimal.gte(
|
return Decimal.gte(
|
||||||
main.energy.value,
|
main.energy.value,
|
||||||
|
|
|
@ -731,7 +731,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
||||||
miningTabCollapsed
|
miningTabCollapsed
|
||||||
}),
|
}),
|
||||||
resources: () => ({
|
resources: () => ({
|
||||||
display: "Mine Rates",
|
display: "Ore Rates",
|
||||||
glowColor(): string {
|
glowColor(): string {
|
||||||
return modifierTabs.activeTab.value === this.tab ? "white" : "";
|
return modifierTabs.activeTab.value === this.tab ? "white" : "";
|
||||||
},
|
},
|
||||||
|
@ -740,7 +740,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
||||||
resourcesCollapsed
|
resourcesCollapsed
|
||||||
}),
|
}),
|
||||||
resourcesGain: () => ({
|
resourcesGain: () => ({
|
||||||
display: "Resource Gain",
|
display: "Ore Gain",
|
||||||
glowColor(): string {
|
glowColor(): string {
|
||||||
return modifierTabs.activeTab.value === this.tab ? "white" : "";
|
return modifierTabs.activeTab.value === this.tab ? "white" : "";
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue