From 977114c95437ae8da907fb41cd29ecf274428f83 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 23 Apr 2023 00:38:24 -0500 Subject: [PATCH] Implementing dropping materials on forge --- src/data/projEntry.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx index 289aace..fa096d2 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -2,6 +2,7 @@ import Modal from "components/Modal.vue"; import StickyVue from "components/layout/Sticky.vue"; import { BoardNode, + GenericBoard, ProgressDisplay, Shape, createBoard, @@ -220,6 +221,13 @@ export const main = createLayer("main", function (this: BaseLayer) { visibility: node => node.state != null } ], + canAccept(node, otherNode) { + return otherNode.type === "resource"; + }, + onDrop(node, otherNode) { + node.state = (otherNode.state as unknown as ResourceState).type; + board.selectedNode.value = node; + }, draggable: true }, resource: {