Shop implementation

Also a few retro mode fixes
This commit is contained in:
Kevin Cathcart
2018-02-17 18:38:54 -05:00
parent 2e99db5403
commit 9bd9bb4f93
10 changed files with 247 additions and 52 deletions

10
Main.py
View File

@@ -1,4 +1,5 @@
from collections import OrderedDict
import copy
from itertools import zip_longest
import json
import logging
@@ -157,6 +158,15 @@ def copy_world(world):
create_regions(ret)
create_dungeons(ret)
#TODO: copy_dynamic_regions_and_locations() # also adds some new shops
for shop in world.shops:
copied_shop = ret.get_region(shop.region.name).shop
copied_shop.active = shop.active
copied_shop.inventory = copy.copy(shop.inventory)
# connect copied world
for region in world.regions:
copied_region = ret.get_region(region.name)