inventory bug fix
This commit is contained in:
parent
34b001041f
commit
86262571b6
@ -289,10 +289,11 @@ void SlotView::clicked(gui::GUI* gui, int button) {
|
|||||||
if (stack.isEmpty()) {
|
if (stack.isEmpty()) {
|
||||||
stack.set(grabbed);
|
stack.set(grabbed);
|
||||||
stack.setCount(1);
|
stack.setCount(1);
|
||||||
} else {
|
grabbed.setCount(grabbed.getCount()-1);
|
||||||
|
} else if (stack.accepts(grabbed)){
|
||||||
stack.setCount(stack.getCount()+1);
|
stack.setCount(stack.getCount()+1);
|
||||||
|
grabbed.setCount(grabbed.getCount()-1);
|
||||||
}
|
}
|
||||||
grabbed.setCount(grabbed.getCount()-1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user