core: rip out RegionType and rework Region class (#814)

This commit is contained in:
alwaysintreble
2023-02-13 18:06:43 -06:00
committed by GitHub
parent f7a0542898
commit 7cbeb8438b
48 changed files with 1324 additions and 937 deletions

View File

@@ -1,5 +1,5 @@
from typing import List, Set, Dict, Tuple, Optional, Callable
from BaseClasses import MultiWorld, Region, Entrance, Location, RegionType
from BaseClasses import MultiWorld, Region, Entrance, Location
from .Options import is_option_enabled
from .Locations import LocationData
@@ -200,8 +200,7 @@ def create_location(player: int, location_data: LocationData, region: Region, lo
def create_region(world: MultiWorld, player: int, locations_per_region: Dict[str, List[LocationData]], location_cache: List[Location], name: str) -> Region:
region = Region(name, RegionType.Generic, name, player)
region.multiworld = world
region = Region(name, player, world)
if name in locations_per_region:
for location_data in locations_per_region[name]: