mirror of
https://github.com/thepaperpilot/Planar-Pioneers.git
synced 2024-11-22 00:21:31 +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 StickyVue from "components/layout/Sticky.vue";
|
||||||
import {
|
import {
|
||||||
BoardNode,
|
BoardNode,
|
||||||
|
GenericBoard,
|
||||||
ProgressDisplay,
|
ProgressDisplay,
|
||||||
Shape,
|
Shape,
|
||||||
createBoard,
|
createBoard,
|
||||||
|
@ -220,6 +221,13 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
||||||
visibility: node => node.state != null
|
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
|
draggable: true
|
||||||
},
|
},
|
||||||
resource: {
|
resource: {
|
||||||
|
|
Loading…
Reference in a new issue