Setup: flip apworld list (#1882)
* Setup: flip apworld list * Update setup.py Co-authored-by: kindasneaki <ryandj67@hotmail.com> * Update setup.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * setup: make TLoZ an apworld This reverts commit fd026c5eb2fb667d239d61c7a2bcfc1586fd4e2b. --------- Co-authored-by: kindasneaki <ryandj67@hotmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
This commit is contained in:
parent
a45e8730cb
commit
aa8ffa247d
48
setup.py
48
setup.py
|
@ -60,20 +60,35 @@ from Utils import version_tuple, is_windows, is_linux
|
|||
|
||||
|
||||
# On Python < 3.10 LogicMixin is not currently supported.
|
||||
apworlds: set = {
|
||||
"Subnautica",
|
||||
"Factorio",
|
||||
"Rogue Legacy",
|
||||
"Sonic Adventure 2 Battle",
|
||||
"Donkey Kong Country 3",
|
||||
"Super Mario World",
|
||||
"Stardew Valley",
|
||||
"Timespinner",
|
||||
"Minecraft",
|
||||
"The Messenger",
|
||||
"Links Awakening DX",
|
||||
"Super Metroid",
|
||||
"SMZ3",
|
||||
non_apworlds: set = {
|
||||
"A Link to the Past",
|
||||
"Adventure",
|
||||
"ArchipIDLE",
|
||||
"Archipelago",
|
||||
"Blasphemous",
|
||||
"ChecksFinder",
|
||||
"Clique",
|
||||
"DLCQuest",
|
||||
"Dark Souls III",
|
||||
"Final Fantasy",
|
||||
"Hollow Knight",
|
||||
"Hylics 2",
|
||||
"Kingdom Hearts 2",
|
||||
"Lufia II Ancient Cave",
|
||||
"Meritous",
|
||||
"Ocarina of Time",
|
||||
"Overcooked! 2",
|
||||
"Pokemon Red and Blue",
|
||||
"Raft",
|
||||
"Secret of Evermore",
|
||||
"Slay the Spire",
|
||||
"Starcraft 2 Wings of Liberty",
|
||||
"Sudoku",
|
||||
"Super Mario 64",
|
||||
"The Witness",
|
||||
"VVVVVV",
|
||||
"Wargroove",
|
||||
"Zillion",
|
||||
}
|
||||
|
||||
|
||||
|
@ -322,11 +337,12 @@ class BuildExeCommand(cx_Freeze.command.build_exe.BuildEXE):
|
|||
os.makedirs(self.buildfolder / "Players" / "Templates", exist_ok=True)
|
||||
from Options import generate_yaml_templates
|
||||
from worlds.AutoWorld import AutoWorldRegister
|
||||
assert not apworlds - set(AutoWorldRegister.world_types), "Unknown world designated for .apworld"
|
||||
assert not non_apworlds - set(AutoWorldRegister.world_types), \
|
||||
f"Unknown world {non_apworlds - set(AutoWorldRegister.world_types)} designated for .apworld"
|
||||
folders_to_remove: typing.List[str] = []
|
||||
generate_yaml_templates(self.buildfolder / "Players" / "Templates", False)
|
||||
for worldname, worldtype in AutoWorldRegister.world_types.items():
|
||||
if worldname in apworlds:
|
||||
if worldname not in non_apworlds:
|
||||
file_name = os.path.split(os.path.dirname(worldtype.__file__))[1]
|
||||
world_directory = self.libfolder / "worlds" / file_name
|
||||
# this method creates an apworld that cannot be moved to a different OS or minor python version,
|
||||
|
|
|
@ -17,8 +17,8 @@ from .ExtractedData import locations, starts, multi_locations, location_to_regio
|
|||
event_names, item_effects, connectors, one_ways, vanilla_shop_costs, vanilla_location_costs
|
||||
from .Charms import names as charm_names
|
||||
|
||||
from BaseClasses import Region, Entrance, Location, MultiWorld, Item, LocationProgressType, Tutorial, ItemClassification
|
||||
from ..AutoWorld import World, LogicMixin, WebWorld
|
||||
from BaseClasses import Region, Location, MultiWorld, Item, LocationProgressType, Tutorial, ItemClassification
|
||||
from worlds.AutoWorld import World, LogicMixin, WebWorld
|
||||
|
||||
path_of_pain_locations = {
|
||||
"Soul_Totem-Path_of_Pain_Below_Thornskip",
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
from typing import Set
|
||||
|
||||
from .RulesData import location_rules
|
||||
from ..generic.Rules import set_rule
|
||||
from BaseClasses import Location
|
||||
from worlds.generic.Rules import set_rule
|
||||
from BaseClasses import Location, CollectionState
|
||||
|
||||
|
||||
# TODO: implement Mapstone counting, Open, OpenWorld, connection rules
|
||||
|
||||
def oribf_has_all(state: CollectionState, items: Set[str], player:int) -> bool:
|
||||
return all(state.prog_items[item, player] if type(item) == str
|
||||
else state.prog_items[item[0], player] >= item[1] for item in items)
|
||||
|
||||
def set_rules(world):
|
||||
temp_base_rule(world.multiworld, world.player)
|
||||
for logicset in world.logic_sets:
|
||||
|
@ -22,7 +28,7 @@ def add_or_rule_check_first(world, location: str, player: int, conditionsets):
|
|||
location.access_rule = tautology
|
||||
return
|
||||
rule = lambda state, conditionsets=conditionsets: any(
|
||||
state._oribf_has_all(conditionset, player) for conditionset in conditionsets)
|
||||
oribf_has_all(state, conditionset, player) for conditionset in conditionsets)
|
||||
if location.access_rule is Location.access_rule:
|
||||
location.access_rule = rule
|
||||
else:
|
||||
|
@ -31,7 +37,7 @@ def add_or_rule_check_first(world, location: str, player: int, conditionsets):
|
|||
|
||||
|
||||
def temp_base_rule(world, player):
|
||||
world.completion_condition[player] = lambda state: state._oribf_has_all(
|
||||
world.completion_condition[player] = lambda state: oribf_has_all(state,
|
||||
{"Bash", "ChargeFlame", "ChargeJump", "Climb", "Dash", "DoubleJump", "Glide", "Grenade", "Stomp", "WallJump"},
|
||||
player)
|
||||
|
||||
|
|
|
@ -69,9 +69,3 @@ class OriBlindForest(World):
|
|||
return Item(name,
|
||||
ItemClassification.progression if not name.startswith("EX") else ItemClassification.filler,
|
||||
item_table[name], self.player)
|
||||
|
||||
|
||||
class OriBlindForestLogic(LogicMixin):
|
||||
def _oribf_has_all(self, items: Set[str], player:int):
|
||||
return all(self.prog_items[item, player] if type(item) == str
|
||||
else self.prog_items[item[0], player] >= item[1] for item in items)
|
Loading…
Reference in New Issue