mirror of
https://github.com/thepaperpilot/Planar-Pioneers.git
synced 2024-11-22 00:21:31 +00:00
Fix powered portals not contributing to powered machines count
This commit is contained in:
parent
b9cf016672
commit
2fe39e3891
1 changed files with 8 additions and 3 deletions
|
@ -412,9 +412,14 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
|||
});
|
||||
|
||||
const poweredMachines: ComputedRef<number> = computed(() => {
|
||||
return [mine, dowsing, quarry, empowerer].filter(
|
||||
node => (node.value?.state as { powered: boolean })?.powered
|
||||
).length;
|
||||
return (
|
||||
[mine, dowsing, quarry, empowerer].filter(
|
||||
node => (node.value?.state as { powered: boolean })?.powered
|
||||
).length +
|
||||
board.types.portal.nodes.value.filter(
|
||||
node => (node.state as { powered: boolean }).powered
|
||||
).length
|
||||
);
|
||||
});
|
||||
const nextPowerCost = computed(() =>
|
||||
Decimal.eq(poweredMachines.value, 0)
|
||||
|
|
Loading…
Reference in a new issue