From ca4758d1c23566cc453272f6258999baf5dfde59 Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Fri, 29 Jan 2021 00:21:42 -0800 Subject: [PATCH] Actually disable shop slots that already have an item pushed in. --- Shops.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Shops.py b/Shops.py index 7c31fc77..75695e1c 100644 --- a/Shops.py +++ b/Shops.py @@ -96,6 +96,9 @@ class Shop(): if not self.inventory[slot]: raise ValueError("Inventory can't be pushed back if it doesn't exist") + if not self.can_push_inventory(slot): + logging.warning(f'Warning, there is already an item pushed into this slot.') + self.inventory[slot] = { 'item': item, 'price': price, @@ -145,6 +148,7 @@ def ShopSlotFill(world): slot_num = int(location.name[-1]) - 1 shop: Shop = location.parent_region.shop if not shop.can_push_inventory(slot_num) or location.shop_slot_disabled: + location.shop_slot_disabled = True removed.add(location) if removed: