2
2
3
3
from BaseClasses import Region , Location , Item , Tutorial , ItemClassification
4
4
from .Items import filler_items , item_table
5
- from .Locations import TunicLocations
5
+ from .Locations import location_table
6
6
from .Rules import set_location_rules , set_region_rules , hexagon_quest_abilities , set_abilities
7
7
from .Regions import tunic_regions
8
8
from .Options import tunic_options
@@ -43,8 +43,7 @@ class TunicWorld(World):
43
43
44
44
data_version = 1
45
45
tunic_items = item_table
46
- tunic_locations = TunicLocations ()
47
- tunic_locations .populate_locations ()
46
+ tunic_locations = location_table
48
47
option_definitions = tunic_options
49
48
50
49
item_name_to_id = {}
@@ -56,8 +55,8 @@ class TunicWorld(World):
56
55
item_name_to_id [item_name ] = item_base_id
57
56
item_base_id += 1
58
57
59
- for location in tunic_locations . locations :
60
- location_name_to_id [location . name ] = location_base_id
58
+ for location_name , location_data in location_table . items () :
59
+ location_name_to_id [location_name ] = location_base_id
61
60
location_base_id += 1
62
61
63
62
def create_item (self , name : str ) -> TunicItem :
@@ -66,7 +65,6 @@ def create_item(self, name: str) -> TunicItem:
66
65
return TunicItem (name , item_data .classification , self .item_name_to_id [name ], self .player )
67
66
68
67
def create_items (self ):
69
-
70
68
hexagon_locations : Dict [str , str ] = {
71
69
"Red Hexagon" : "Fortress Arena - Siege Engine/Vault Key Pickup" ,
72
70
"Green Hexagon" : "Librarian - Hexagon Green" ,
@@ -91,6 +89,7 @@ def create_items(self):
91
89
92
90
for i in range (0 , item_data .quantity_in_item_pool ):
93
91
items .append (self .create_item (item_name ))
92
+ # adding a money x1 to even out the pool with this option
94
93
items .append (self .create_item ("Money x1" ))
95
94
elif self .multiworld .hexagon_quest [self .player ].value and \
96
95
("Pages" in item_name or item_name in ["Red Hexagon" , "Green Hexagon" , "Blue Hexagon" ]):
@@ -115,8 +114,7 @@ def create_regions(self):
115
114
region .add_exits (tunic_regions [region_name ])
116
115
117
116
for location_name in self .location_name_to_id :
118
- region = self .multiworld .get_region (self .tunic_locations .locations_lookup [location_name ].region ,
119
- self .player )
117
+ region = self .multiworld .get_region (location_table [location_name ].region , self .player )
120
118
location = TunicLocation (self .player , location_name , self .location_name_to_id [location_name ], region )
121
119
region .locations .append (location )
122
120
0 commit comments