mirror of
https://github.com/thepaperpilot/Planar-Pioneers.git
synced 2024-11-21 16:13:54 +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`
|
||||
};
|
||||
},
|
||||
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 =>
|
||||
Decimal.gte(
|
||||
main.energy.value,
|
||||
|
|
|
@ -743,6 +743,14 @@ export const booster = {
|
|||
)} 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) {
|
||||
return Decimal.gte(
|
||||
main.energy.value,
|
||||
|
|
|
@ -731,7 +731,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
|||
miningTabCollapsed
|
||||
}),
|
||||
resources: () => ({
|
||||
display: "Mine Rates",
|
||||
display: "Ore Rates",
|
||||
glowColor(): string {
|
||||
return modifierTabs.activeTab.value === this.tab ? "white" : "";
|
||||
},
|
||||
|
@ -740,7 +740,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
|||
resourcesCollapsed
|
||||
}),
|
||||
resourcesGain: () => ({
|
||||
display: "Resource Gain",
|
||||
display: "Ore Gain",
|
||||
glowColor(): string {
|
||||
return modifierTabs.activeTab.value === this.tab ? "white" : "";
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue