Add interaction between edit grid and inventory
This commit is contained in:
parent
469121e18a
commit
986c0479f1
9 changed files with 51 additions and 14 deletions
|
@ -28,6 +28,10 @@ export function removeItem(type, id) {
|
|||
if (!items.has(mapId)) return;
|
||||
let tile = items.get(mapId);
|
||||
tile.decrease();
|
||||
if (tile.quantity == 0) {
|
||||
items.delete(mapId);
|
||||
currentItem = null;
|
||||
}
|
||||
}
|
||||
|
||||
export function selectItem(type, id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue