Shift clicking
This commit is contained in:
@@ -190,11 +190,13 @@ export class GuiInventoryScreen extends GuiScreen {
|
||||
}
|
||||
|
||||
click(slot: Slot, button: number) {
|
||||
this.send({ type: "click", container: slot.container, index: slot.index, button });
|
||||
const shift = InputManager.is_key_down("ShiftLeft") || InputManager.is_key_down("ShiftRight");
|
||||
this.send({ type: "click", container: slot.container, index: slot.index, button, shift });
|
||||
|
||||
// output slots depend on server side things like recipes, just wait for the server
|
||||
// output slots depend on server side things like recipes, and where a shift click goes on slot filters only the
|
||||
// server has, just wait for the server
|
||||
const container = this.get_container(slot.container);
|
||||
if (container && !slot.output) {
|
||||
if (container && !slot.output && !shift) {
|
||||
click_slot(container, slot.index, this.inventories.cursor, button);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user