forked from ArchipelagoMW/Archipelago
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stardew Valley: Move filler pool generation out of the world class (A…
- Loading branch information
Showing
5 changed files
with
46 additions
and
38 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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from typing import Iterable | ||
|
||
from .options import StardewValleyOptions | ||
|
||
|
||
def apply_most_restrictive_options(group_option: StardewValleyOptions, world_options: Iterable[StardewValleyOptions]) -> None: | ||
"""Merge the options of the worlds member of the group that can impact fillers generation into the option class of the group. | ||
""" | ||
|
||
# If at least one world disabled ginger island, disabling it for the whole group | ||
group_option.exclude_ginger_island.value = max(o.exclude_ginger_island.value for o in world_options) | ||
|
||
# If at least one world disabled traps, disabling them for the whole group | ||
group_option.trap_items.value = min(o.trap_items.value for o in world_options) |
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