Revert "Shop Item Pool fill feature + multiworld player compatability"

This reverts commit c8034dbb46.
This commit is contained in:
Edos512
2020-12-04 23:54:38 +01:00
parent eed48a999c
commit a148c23fac
6 changed files with 10 additions and 71 deletions

View File

@@ -131,7 +131,6 @@ class World(object):
set_player_attr('triforce_pieces_available', 30)
set_player_attr('triforce_pieces_required', 20)
set_player_attr('shop_shuffle', 'off')
set_player_attr('shop_shuffle_slots', 0)
set_player_attr('shuffle_prizes', "g")
set_player_attr('sprite_pool', [])
set_player_attr('dark_room_logic', "lamp")
@@ -341,27 +340,6 @@ class World(object):
if collect:
self.state.collect(item, location.event, location)
# TODO: Prevents fast_filling certain items. Move this to a proper filter.
if location.parent_region.shop is not None and location.name != 'Potion Shop': # includes potion shop slots but not potion shop powder
slot_num = int(location.name[-1]) - 1
my_item = location.parent_region.shop.inventory[slot_num]
if (my_item is not None and my_item['item'] == item.name) or 'Rupee' in item.name:
# this will filter items that match the item in the shop or Rupees
# really not a way for the player to know a renewable item from a world item
# bombs can be sitting on top of arrows or a potion refill, but dunno if that's a big deal
logging.debug('skipping item shop {}'.format(item.name))
else:
if my_item is None:
location.parent_region.shop.add_inventory(slot_num, 'None', 0)
my_item = location.parent_region.shop.inventory[slot_num]
else:
my_item['replacement'] = my_item['item']
my_item['replacement_price'] = my_item['price']
my_item['item'] = item.name
my_item['price'] = self.random.randrange(1, 61) * 5 # can probably replace this with a price chart
my_item['max'] = 1
my_item['player'] = item.player if item.player != location.player else 0
logging.debug('Placed %s at %s', item, location)
else:
raise RuntimeError('Cannot assign item %s to location %s.' % (item, location))
@@ -1162,8 +1140,7 @@ class Shop():
'max': max,
'replacement': replacement,
'replacement_price': replacement_price,
'create_location': create_location,
'player': 0
'create_location': create_location
}
def push_inventory(self, slot: int, item: str, price: int, max: int = 1):
@@ -1176,8 +1153,7 @@ class Shop():
'max': max,
'replacement': self.inventory[slot]["item"],
'replacement_price': self.inventory[slot]["price"],
'create_location': self.inventory[slot]["create_location"],
'player': self.inventory[slot]["player"]
'create_location': self.inventory[slot]["create_location"]
}
@@ -1263,10 +1239,6 @@ class Spoiler(object):
if item is None:
continue
shopdata['item_{}'.format(index)] = "{}{}".format(item['item'], item['price']) if item['price'] else item['item']
if item['player'] > 0:
shopdata['item_{}'.format(index)] = shopdata['item_{}'.format(index)].replace('', '(Player {}) — '.format(item['player']))
if item['max'] == 0:
continue
shopdata['item_{}'.format(index)] += " x {}".format(item['max'])
@@ -1340,7 +1312,6 @@ class Spoiler(object):
'triforce_pieces_available': self.world.triforce_pieces_available,
'triforce_pieces_required': self.world.triforce_pieces_required,
'shop_shuffle': self.world.shop_shuffle,
'shop_shuffle_slots': self.world.shop_shuffle_slots,
'shuffle_prizes': self.world.shuffle_prizes,
'sprite_pool': self.world.sprite_pool,
'restrict_dungeon_item_on_boss': self.world.restrict_dungeon_item_on_boss