Skip to content

Commit

Permalink
Fix double clicking to stack items
Browse files Browse the repository at this point in the history
Previously PGM used SportPaper's InventoryClickedEvent to handle COLLECT_TO_CURSOR, but since it is no longer used in PGM for compatibility reasons, COLLECT_TO_CURSOR should not be ignored as it can cause issues with double clicking to stack items.

Signed-off-by: BT (calcastor/mame) <[email protected]>
  • Loading branch information
calcastor authored and Electroid committed Oct 1, 2021
1 parent e756695 commit 9783baf
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public void onPlayerClickInventory(final InventoryClickEvent event) {
// Ignored actions
switch (event.getAction()) {
case CLONE_STACK: // Out of scope
case COLLECT_TO_CURSOR: // Handled by InventoryClickedEvent
case NOTHING:
case UNKNOWN:
return;
Expand Down Expand Up @@ -484,9 +483,7 @@ public void collectToCursor(InventoryClickEvent event) {
public void onPlayerInventoryClick(InventoryClickEvent event) {
// Control-double-click on a stack, all similar stacks are moved to the cursor, up to the max
// stack size
// We cancel all of these and redo them ourselves. We have to do it from a InventoryClickedEvent
// because
// we can't make the necessary changes from inside a InventoryClickEvent.
// We cancel all of these and redo them ourselves.
if (this.collectToCursor) {
this.collectToCursor = false;

Expand Down

0 comments on commit 9783baf

Please sign in to comment.