SM: remove events from data package (#973)

This commit is contained in:
lordlou
2022-08-31 00:14:17 -04:00
committed by GitHub
parent fcfc2c2e10
commit 8da1cfeeb7
4 changed files with 11 additions and 40 deletions

View File

@@ -11,8 +11,6 @@ from worlds.sm.variaRandomizer.graph.graph_utils import GraphUtils
logger = logging.getLogger("Super Metroid")
from .Locations import lookup_name_to_id as locations_lookup_name_to_id
from .Items import lookup_name_to_id as items_lookup_name_to_id
from .Regions import create_regions
from .Rules import set_rules, add_entrance_rule
from .Options import sm_options
@@ -68,6 +66,8 @@ class SMWeb(WebWorld):
["Farrak Kilhn"]
)]
locations_start_id = 82000
items_start_id = 83000
class SMWorld(World):
"""
@@ -78,12 +78,11 @@ class SMWorld(World):
game: str = "Super Metroid"
topology_present = True
data_version = 1
data_version = 2
option_definitions = sm_options
item_names: Set[str] = frozenset(items_lookup_name_to_id)
location_names: Set[str] = frozenset(locations_lookup_name_to_id)
item_name_to_id = items_lookup_name_to_id
location_name_to_id = locations_lookup_name_to_id
item_name_to_id = {value.Name: items_start_id + value.Id for key, value in ItemManager.Items.items() if value.Id != None}
location_name_to_id = {key: locations_start_id + value.Id for key, value in locationsDict.items() if value.Id != None}
web = SMWeb()
remote_items: bool = False
@@ -701,8 +700,8 @@ class SMWorld(World):
dest.Name) for src, dest in self.variaRando.randoExec.areaGraph.InterAreaTransitions if src.Boss]))
def create_locations(self, player: int):
for name, id in locations_lookup_name_to_id.items():
self.locations[name] = SMLocation(player, name, id)
for name in locationsDict:
self.locations[name] = SMLocation(player, name, self.location_name_to_id.get(name, None))
def create_region(self, world: MultiWorld, player: int, name: str, locations=None, exits=None):