mirror of
https://github.com/thepaperpilot/Planar-Pioneers.git
synced 2024-11-21 16:13:54 +00:00
Implementing dropping materials on forge
This commit is contained in:
parent
c958d5e9e7
commit
977114c954
1 changed files with 8 additions and 0 deletions
|
@ -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: {
|
||||
|
|
Loading…
Reference in a new issue