Add ship validity checking
This commit is contained in:
parent
986c0479f1
commit
52770d7eb2
5 changed files with 72 additions and 16 deletions
|
@ -78,12 +78,8 @@ export default class GuiInventory extends GuiElement {
|
|||
tileClicked(type, id, button) {
|
||||
if (button == 'left') inventory.selectItem(type, id);
|
||||
|
||||
if (!state.editing) {
|
||||
if (button == 'left') {
|
||||
inventory.addItem(type, id);
|
||||
} else if (button == 'right') {
|
||||
inventory.removeitem(type, id);
|
||||
}
|
||||
if (!state.editing && button == 'right') {
|
||||
inventory.removeItem(type, id);
|
||||
}
|
||||
|
||||
this.updateTiles();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue