Keep chest contents out of player inventory

This commit is contained in:
Tanner committed 2026-11-17 19:29:07 +00:00
1 parent c2b595a70d
commit 9918baefdc
3 files changed
+97

No files matched your search

+5
View File
@@ -627,6 +627,11 @@ class InventoryManager:
@staticmethod
def _player_inventory_slot(window_slot, container_slots):
# A container snapshot shorter than the 36 trailing player slots has
# no valid player-inventory section. In particular, treating a zero
# container size as an offset of zero mirrors chest slots into g.inv.
if container_slots <= 0:
return None
offset = window_slot - container_slots
if 0 <= offset < 27:
return 9 + offset