Add inventory space limit
This commit is contained in:
parent
a11dfb9352
commit
0c63cb075b
5 changed files with 44 additions and 9 deletions
|
@ -85,8 +85,10 @@ export default class GuiInventory extends GuiElement {
|
|||
tileClicked(type, id, button) {
|
||||
if (button == 'left') inventory.selectItem(type, id);
|
||||
|
||||
if (!state.editing && button == 'right') {
|
||||
inventory.removeItem(type, id);
|
||||
if (button == 'right') {
|
||||
if (inventory.canToss()) {
|
||||
inventory.removeItem(type, id);
|
||||
}
|
||||
}
|
||||
|
||||
this.updateTiles();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue