KH2: Update all instances of multiworld.option_name to option.option_name (#2634)

* update the multiworld to options

* Update worlds/kh2/Rules.py

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* does this work

* namine sketches

* wrong branch :)

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
This commit is contained in:
JaredWeakStrike
2024-03-11 19:52:16 -04:00
committed by GitHub
parent 3d56f3c096
commit a7384b4b63
4 changed files with 65 additions and 63 deletions

View File

@@ -935,7 +935,7 @@ def create_regions(self):
for level_region_name in level_region_list:
KH2REGIONS[level_region_name] = []
if multiworld.LevelDepth[player] == "level_50":
if self.options.LevelDepth == "level_50":
KH2REGIONS[RegionName.LevelsVS1] = [LocationName.Lvl2, LocationName.Lvl4, LocationName.Lvl7, LocationName.Lvl9,
LocationName.Lvl10]
KH2REGIONS[RegionName.LevelsVS3] = [LocationName.Lvl12, LocationName.Lvl14, LocationName.Lvl15,
@@ -949,7 +949,7 @@ def create_regions(self):
KH2REGIONS[RegionName.LevelsVS15] = [LocationName.Lvl50]
# level 99
elif multiworld.LevelDepth[player] == "level_99":
elif self.options.LevelDepth == "level_99":
KH2REGIONS[RegionName.LevelsVS1] = [LocationName.Lvl7, LocationName.Lvl9]
KH2REGIONS[RegionName.LevelsVS3] = [LocationName.Lvl12, LocationName.Lvl15, LocationName.Lvl17,
LocationName.Lvl20]
@@ -965,7 +965,7 @@ def create_regions(self):
KH2REGIONS[RegionName.LevelsVS26] = [LocationName.Lvl99]
# level sanity
# has to be [] instead of {} for in
elif multiworld.LevelDepth[player] in ["level_50_sanity", "level_99_sanity"]:
elif self.options.LevelDepth in ["level_50_sanity", "level_99_sanity"]:
KH2REGIONS[RegionName.LevelsVS1] = [LocationName.Lvl2, LocationName.Lvl3, LocationName.Lvl4, LocationName.Lvl5,
LocationName.Lvl6,
LocationName.Lvl7, LocationName.Lvl8, LocationName.Lvl9, LocationName.Lvl10]
@@ -986,7 +986,7 @@ def create_regions(self):
LocationName.Lvl46, LocationName.Lvl47, LocationName.Lvl48,
LocationName.Lvl49, LocationName.Lvl50]
# level 99 sanity
if multiworld.LevelDepth[player] == "level_99_sanity":
if self.options.LevelDepth == "level_99_sanity":
KH2REGIONS[RegionName.LevelsVS15] = [LocationName.Lvl51, LocationName.Lvl52, LocationName.Lvl53,
LocationName.Lvl54,
LocationName.Lvl55, LocationName.Lvl56, LocationName.Lvl57,
@@ -1012,7 +1012,7 @@ def create_regions(self):
LocationName.Lvl95, LocationName.Lvl96, LocationName.Lvl97,
LocationName.Lvl98, LocationName.Lvl99]
KH2REGIONS[RegionName.Summon] = []
if multiworld.SummonLevelLocationToggle[player]:
if self.options.SummonLevelLocationToggle:
KH2REGIONS[RegionName.Summon] = [LocationName.Summonlvl2,
LocationName.Summonlvl3,
LocationName.Summonlvl4,