From 11413ded2a7a2a558c0d8e6aeb2aad2dd9baa2c0 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Fri, 19 May 2023 08:25:42 -0500 Subject: [PATCH] Make it easier to determine which plane goes to which portal --- src/data/nodeTypes.tsx | 7 ++++++- src/data/planes.tsx | 11 +++++++++++ src/data/projEntry.tsx | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/data/nodeTypes.tsx b/src/data/nodeTypes.tsx index f8b7db4..5958484 100644 --- a/src/data/nodeTypes.tsx +++ b/src/data/nodeTypes.tsx @@ -657,7 +657,12 @@ export const portal = { }), outlineColor: node => (layers[(node.state as unknown as PortalState).id] as GenericPlane).background, - draggable: true + draggable: true, + onClick(node) { + main.board.selectedNode.value = node; + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + layers[(node.state as unknown as PortalState).id]!.minimized.value = false; + } } as NodeTypeOptions; export const influence = { diff --git a/src/data/planes.tsx b/src/data/planes.tsx index cba034c..a7a186c 100644 --- a/src/data/planes.tsx +++ b/src/data/planes.tsx @@ -1411,6 +1411,16 @@ export function createPlane( ); }); + const findNode = createClickable(() => ({ + display: { + description: "Select Portal Node" + }, + onClick() { + main.board.selectedNode.value = main.portalNodes.value[id]; + }, + style: "min-height: 30px; width: 200px; margin-bottom: 20px" + })); + return { tier: persistent(tier), seed: persistent(seed), @@ -1498,6 +1508,7 @@ export function createPlane( )} + {render(findNode)} {earnedTreasures.value.length === length ? (

Plane Complete!

diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx index bb0a577..0b4a7b4 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -978,6 +978,7 @@ export const main = createLayer("main", function (this: BaseLayer) { resourceNodes, toolNodes, influenceNodes, + portalNodes, grantResource, activePortals, nextPowerCost,