Deprecate data_version and introduce checksum for DataPackages. (#684)
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
This commit is contained in:
@@ -2,8 +2,8 @@ import random
|
||||
from typing import Dict, Any
|
||||
from BaseClasses import Region, Entrance, Location, Item, Tutorial, ItemClassification
|
||||
from worlds.generic.Rules import set_rule
|
||||
from ..AutoWorld import World, WebWorld
|
||||
from . import Items, Locations, Options, Rules, Exits
|
||||
from . import Exits, Items, Locations, Options, Rules
|
||||
from ..AutoWorld import WebWorld, World
|
||||
|
||||
|
||||
class Hylics2Web(WebWorld):
|
||||
@@ -20,13 +20,13 @@ class Hylics2Web(WebWorld):
|
||||
|
||||
class Hylics2World(World):
|
||||
"""
|
||||
Hylics 2 is a surreal and unusual RPG, with a bizarre yet unique visual style. Play as Wayne,
|
||||
Hylics 2 is a surreal and unusual RPG, with a bizarre yet unique visual style. Play as Wayne,
|
||||
travel the world, and gather your allies to defeat the nefarious Gibby in his Hylemxylem!
|
||||
"""
|
||||
game: str = "Hylics 2"
|
||||
web = Hylics2Web()
|
||||
|
||||
all_items = {**Items.item_table, **Items.gesture_item_table, **Items.party_item_table,
|
||||
all_items = {**Items.item_table, **Items.gesture_item_table, **Items.party_item_table,
|
||||
**Items.medallion_item_table}
|
||||
all_locations = {**Locations.location_table, **Locations.tv_location_table, **Locations.party_location_table,
|
||||
**Locations.medallion_location_table}
|
||||
@@ -37,7 +37,7 @@ class Hylics2World(World):
|
||||
|
||||
topology_present: bool = True
|
||||
|
||||
data_version: 1
|
||||
data_version = 1
|
||||
|
||||
start_location = "Waynehouse"
|
||||
|
||||
@@ -59,7 +59,7 @@ class Hylics2World(World):
|
||||
def create_event(self, event: str):
|
||||
return Hylics2Item(event, ItemClassification.progression_skip_balancing, None, self.player)
|
||||
|
||||
|
||||
|
||||
# set random starting location if option is enabled
|
||||
def generate_early(self):
|
||||
if self.multiworld.random_start[self.player]:
|
||||
@@ -76,7 +76,7 @@ class Hylics2World(World):
|
||||
def generate_basic(self):
|
||||
# create item pool
|
||||
pool = []
|
||||
|
||||
|
||||
# add regular items
|
||||
for i, data in Items.item_table.items():
|
||||
if data["count"] > 0:
|
||||
@@ -114,7 +114,7 @@ class Hylics2World(World):
|
||||
gestures = list(Items.gesture_item_table.items())
|
||||
tvs = list(Locations.tv_location_table.items())
|
||||
|
||||
# if Extra Items in Logic is enabled place CHARGE UP first and make sure it doesn't get
|
||||
# if Extra Items in Logic is enabled place CHARGE UP first and make sure it doesn't get
|
||||
# placed at Sage Airship: TV
|
||||
if self.multiworld.extra_items_in_logic[self.player]:
|
||||
tv = self.multiworld.random.choice(tvs)
|
||||
@@ -122,7 +122,7 @@ class Hylics2World(World):
|
||||
while tv[1]["name"] == "Sage Airship: TV":
|
||||
tv = self.multiworld.random.choice(tvs)
|
||||
self.multiworld.get_location(tv[1]["name"], self.player)\
|
||||
.place_locked_item(self.add_item(gestures[gest][1]["name"], gestures[gest][1]["classification"],
|
||||
.place_locked_item(self.add_item(gestures[gest][1]["name"], gestures[gest][1]["classification"],
|
||||
gestures[gest]))
|
||||
gestures.remove(gestures[gest])
|
||||
tvs.remove(tv)
|
||||
@@ -182,7 +182,7 @@ class Hylics2World(World):
|
||||
16: Region("Sage Airship", self.player, self.multiworld),
|
||||
17: Region("Hylemxylem", self.player, self.multiworld)
|
||||
}
|
||||
|
||||
|
||||
# create regions from table
|
||||
for i, reg in region_table.items():
|
||||
self.multiworld.regions.append(reg)
|
||||
@@ -214,7 +214,7 @@ class Hylics2World(World):
|
||||
for i, data in Locations.tv_location_table.items():
|
||||
region_table[data["region"]].locations\
|
||||
.append(Hylics2Location(self.player, data["name"], i, region_table[data["region"]]))
|
||||
|
||||
|
||||
# add party member locations if option is enabled
|
||||
if self.multiworld.party_shuffle[self.player]:
|
||||
for i, data in Locations.party_location_table.items():
|
||||
@@ -241,4 +241,4 @@ class Hylics2Location(Location):
|
||||
|
||||
|
||||
class Hylics2Item(Item):
|
||||
game: str = "Hylics 2"
|
||||
game: str = "Hylics 2"
|
||||
|
||||
Reference in New Issue
Block a user