Shift clicking

This commit is contained in:
2026-09-30 00:30:33 -03:00
parent 7dc78aac76
commit 88659bb7af
6 changed files with 227 additions and 10 deletions
+5 -3
View File
@@ -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);
}
}