Tag version required for sending items out of shops

This commit is contained in:
Fabian Dill 2021-01-09 18:11:24 +01:00
parent 857e9f4dcd
commit 2a0d1962f1
2 changed files with 9 additions and 5 deletions

12
Main.py
View File

@ -217,16 +217,16 @@ def main(args, seed=None):
shop_slots_adjusted = [] shop_slots_adjusted = []
shop_items = [] shop_items = []
for location in shop_slots: for location in shop_slots:
slot_num = int(location.name[-1]) - 1 slot_num = int(location.name[-1]) - 1
shop_item = location.parent_region.shop.inventory[slot_num] shop_item = location.parent_region.shop.inventory[slot_num]
item = location.item item = location.item
# if item is a rupee or single bee, or identical, swap it out # if item is a rupee or single bee, or identical, swap it out
if (shop_item is not None and shop_item['item'] == item.name) or 'Rupee' in item.name or (item.name in ['Bee']): if (shop_item is not None and shop_item['item'] == item.name) or 'Rupee' in item.name or (item.name in ['Bee']):
for c in candidates: # chosen item locations for c in candidates: # chosen item locations
if 'Rupee' in c.item.name or c.item.name in 'Bee': continue if 'Rupee' in c.item.name or c.item.name in 'Bee': continue
if (shop_item is not None and shop_item['item'] == c.item.name): continue if (shop_item is not None and shop_item['item'] == c.item.name): continue
if c.item_rule(location.item): # if rule is good... if c.item_rule(location.item): # if rule is good...
logging.debug('Swapping {} with {}:: {} ||| {}'.format(c, location, c.item, location.item)) logging.debug('Swapping {} with {}:: {} ||| {}'.format(c, location, c.item, location.item))
c.item, location.item = location.item, c.item c.item, location.item = location.item, c.item
if not world.can_beat_game(): if not world.can_beat_game():
@ -444,7 +444,11 @@ def main(args, seed=None):
multidatatags.append("Spoiler") multidatatags.append("Spoiler")
if not args.skip_playthrough: if not args.skip_playthrough:
multidatatags.append("Play through") multidatatags.append("Play through")
minimum_versions = {"server": (1,0,0)} minimum_versions = {"server": (1, 0, 0)}
minimum_versions["clients"] = client_versions = []
for (slot, team, name) in rom_names:
if world.shop_shuffle_slots[slot]:
client_versions.append([team, slot, [3, 6, 1]])
multidata = zlib.compress(json.dumps({"names": parsed_names, multidata = zlib.compress(json.dumps({"names": parsed_names,
# backwards compat for < 2.4.1 # backwards compat for < 2.4.1
"roms": [(slot, team, list(name.encode())) "roms": [(slot, team, list(name.encode()))

View File

@ -13,7 +13,7 @@ class Version(typing.NamedTuple):
micro: int micro: int
__version__ = "3.6.0" __version__ = "3.6.1"
_version_tuple = tuplize_version(__version__) _version_tuple = tuplize_version(__version__)
import os import os