mirror of
https://github.com/thepaperpilot/Planar-Pioneers.git
synced 2025-02-16 09:41:40 +00:00
Make trash can reset plane's links
This commit is contained in:
parent
d045e71e5c
commit
5e2a2120b6
2 changed files with 35 additions and 3 deletions
|
@ -399,13 +399,13 @@ export const influences = {
|
|||
initialData: undefined
|
||||
},
|
||||
increaseDiff: {
|
||||
display: "+diff",
|
||||
display: "+difficulty",
|
||||
description: "Increase difficulty/rewards odds",
|
||||
cost: 10,
|
||||
initialData: undefined
|
||||
},
|
||||
decreaseDiff: {
|
||||
display: "-diff",
|
||||
display: "-difficulty",
|
||||
description: "Decrease difficulty/rewards odds",
|
||||
cost: 10,
|
||||
initialData: undefined
|
||||
|
|
|
@ -874,7 +874,7 @@ export const investments = {
|
|||
};
|
||||
}
|
||||
return labelForAcceptingPortal(node, portal => {
|
||||
return `Auto-buy ${(layers[portal] as GenericPlane).name}'s repeatables and dimensions`;
|
||||
return `Passively generate ${(layers[portal] as GenericPlane).name}'s conversions`;
|
||||
});
|
||||
},
|
||||
actionDistance: Math.PI / 4,
|
||||
|
@ -921,6 +921,38 @@ export const trashCan = {
|
|||
main.board.state.value.nodes = main.board.state.value.nodes.filter(
|
||||
node => node !== otherNode
|
||||
);
|
||||
if (main.booster.value) {
|
||||
main.booster.value.state = {
|
||||
...(main.booster.value.state as object),
|
||||
portals: (main.booster.value.state as unknown as BoosterState).portals.filter(
|
||||
p => p !== portal
|
||||
)
|
||||
};
|
||||
}
|
||||
if (main.upgrader.value) {
|
||||
main.upgrader.value.state = {
|
||||
...(main.upgrader.value.state as object),
|
||||
portals: (main.upgrader.value.state as unknown as BoosterState).portals.filter(
|
||||
p => p !== portal
|
||||
)
|
||||
};
|
||||
}
|
||||
if (main.automator.value) {
|
||||
main.automator.value.state = {
|
||||
...(main.automator.value.state as object),
|
||||
portals: (main.automator.value.state as unknown as BoosterState).portals.filter(
|
||||
p => p !== portal
|
||||
)
|
||||
};
|
||||
}
|
||||
if (main.investments.value) {
|
||||
main.investments.value.state = {
|
||||
...(main.investments.value.state as object),
|
||||
portals: (main.investments.value.state as unknown as BoosterState).portals.filter(
|
||||
p => p !== portal
|
||||
)
|
||||
};
|
||||
}
|
||||
},
|
||||
draggable: true
|
||||
} as NodeTypeOptions;
|
||||
|
|
Loading…
Add table
Reference in a new issue