Keep chest contents out of player inventory
This commit is contained in:
1 parent
c2b595a70d
commit
9918baefdc
3 files changed
+97
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user