forked from ArchipelagoMW/Archipelago
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Exempt-Medic/wargroove2
Some Code Review Suggestions
- Loading branch information
Showing
9 changed files
with
138 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
from typing import List | ||
|
||
from BaseClasses import Region, Location | ||
from .Levels import Wargroove2Level | ||
from typing import TYPE_CHECKING | ||
from worlds.AutoWorld import LogicMixin | ||
if TYPE_CHECKING: | ||
from . import Wargroove2World | ||
|
||
|
||
class Wargroove2Logic(LogicMixin): | ||
pass | ||
|
||
|
||
def set_rules(multiworld, level_list: [Wargroove2Level], | ||
first_level: Wargroove2Level, | ||
final_levels: [Wargroove2Level], | ||
player: int) -> None: | ||
def set_rules(world: "Wargroove2World") -> None: | ||
level_list = world.level_list | ||
first_level = world.first_level | ||
final_levels = world.final_levels | ||
player = world.player | ||
|
||
# Level 0 | ||
first_level.define_access_rules(multiworld) | ||
first_level.define_access_rules(world) | ||
|
||
# Levels 1-28 (Top 28 of the list) | ||
for i in range(0, 28): | ||
level_list[i].define_access_rules(multiworld) | ||
level_list[i].define_access_rules(world) | ||
|
||
# Final Levels (Top 4 of the list) | ||
final_levels[0].define_access_rules(multiworld, lambda state: state.has_all({"Final North", "Final Center"}, player)) | ||
final_levels[1].define_access_rules(multiworld, lambda state: state.has_all({"Final East", "Final Center"}, player)) | ||
final_levels[2].define_access_rules(multiworld, lambda state: state.has_all({"Final South", "Final Center"}, player)) | ||
final_levels[3].define_access_rules(multiworld, lambda state: state.has_all({"Final West", "Final Center"}, player)) | ||
|
||
final_levels[0].define_access_rules(world, lambda state: state.has_all(["Final North", "Final Center"], player)) | ||
final_levels[1].define_access_rules(world, lambda state: state.has_all(["Final East", "Final Center"], player)) | ||
final_levels[2].define_access_rules(world, lambda state: state.has_all(["Final South", "Final Center"], player)) | ||
final_levels[3].define_access_rules(world, lambda state: state.has_all(["Final West", "Final Center"], player)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters