Skip to content

Commit ec3cc12

Browse files
committed
fix: open equipped bags with occupied cursor
1 parent 1ccd393 commit ec3cc12

5 files changed

Lines changed: 27 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,30 @@ All notable changes to this project will be documented in this file.
44

55
Feature (F) and decision (D) numbers refer to [FEATURES.md](FEATURES.md).
66

7+
## [v0.5.2](https://github.com/stinowdev/vs-burdened/releases/tag/v0.5.2)
8+
9+
The 0.5.2 patch fixes opening equipped bags while moving items.
10+
11+
<img
12+
alt="Fix cursor carrying item"
13+
src="https://github.com/user-attachments/assets/223e212b-2b52-4cae-a218-b5f335ad94fb"
14+
/>
15+
16+
### Fixed
17+
18+
- Equipped bags can now be opened while the cursor carries an item. Opening the
19+
bag leaves that item untouched.
20+
721
## [v0.5.1](https://github.com/stinowdev/vs-burdened/releases/tag/v0.5.1)
822

23+
The 0.5.1 patch fixes stale item rendering in equipped-bag windows.
24+
925
<img
1026
width="600"
1127
alt="Fix #7"
1228
src="https://github.com/user-attachments/assets/38b17f0f-39d7-4740-96f4-81cbcb4e8224"
1329
/>
1430

15-
The 0.5.1 patch fixes stale item rendering in equipped-bag windows.
16-
1731
### Fixed
1832

1933
- Equipped-bag windows no longer render an occupied slot as empty, or keep an

FEATURES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ follows the table below for everything after that.
4545
The following rules apply to every transition:
4646

4747
- Bag contents remain attached to the item stack.
48+
- Opening an equipped bag does not require an empty cursor and does not move the
49+
cursor stack.
4850
- A rejected pickup or placement leaves the source unchanged.
4951
- Floor pickup never falls back to general inventory routing or the offhand.
5052
- Several equipped bag windows may remain open at once.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ bags remain on the body.
6161
|---|---|---|
6262
| Placed bag | Right-click | Open the bag |
6363
| Placed bag | Shift + right-click | Equip it into a compatible empty bag slot |
64-
| Equipped bag slot | Right-click | Open or close that bag |
64+
| Equipped bag slot | Right-click | Open or close that bag (also with cursor stack) |
6565
| Equipped bag slot | Shift + click | Place it on the targeted block |
6666
| Selected equipped bag | Right-click | Open or close the bag when the targeted block does not use the input |
6767
| Selected equipped bag | Shift + right-click | Place it on the targeted block |

resources/modinfo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "Burdened",
55
"authors": [ "stinow" ],
66
"description": "A weightier carrying experience: fewer slots, immersive bag carrying, placeable and openable bags.",
7-
"version": "0.5.1",
7+
"version": "0.5.2",
88
"side": "universal",
99
"requiredOnClient": true,
1010
"requiredOnServer": true,

src/Patches/BagInteractionPatches.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,13 @@ public static bool BagSlotClickPrefix(
303303
if (slot.Empty
304304
|| !BagSupport.SupportsEquippedBagWindow(slot.Itemstack)
305305
|| SlotLocks.IsLocked(slot)) return true;
306+
307+
if (!shiftPressed && mouseButton == EnumMouseButton.Right)
308+
{
309+
GuiDialogEquippedBag.Toggle(api, slotId);
310+
return false;
311+
}
312+
306313
if (!api.World.Player.InventoryManager.MouseItemSlot.Empty) return true;
307314

308315
if (shiftPressed && (mouseButton == EnumMouseButton.Left || mouseButton == EnumMouseButton.Right))
@@ -317,12 +324,6 @@ public static bool BagSlotClickPrefix(
317324
return false;
318325
}
319326

320-
if (mouseButton == EnumMouseButton.Right)
321-
{
322-
GuiDialogEquippedBag.Toggle(api, slotId);
323-
return false;
324-
}
325-
326327
return true;
327328
}
328329

0 commit comments

Comments
 (0)