From 13697fdccb2181f34d1900b76699c5ae57e04f22 Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 19 Dec 2024 15:47:59 -0800 Subject: [PATCH] sc2: Updating the option name victory_checks -> victory_cache --- worlds/sc2/docs/custom_mission_orders_en.md | 10 +++++----- worlds/sc2/mission_order/options.py | 2 +- worlds/sc2/mission_order/structs.py | 14 +++++++------- worlds/sc2/options.py | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/worlds/sc2/docs/custom_mission_orders_en.md b/worlds/sc2/docs/custom_mission_orders_en.md index be62a1391c3d..c13196a63f67 100644 --- a/worlds/sc2/docs/custom_mission_orders_en.md +++ b/worlds/sc2/docs/custom_mission_orders_en.md @@ -32,7 +32,7 @@ - [Entrance](#entrance) - [Empty](#empty) - [Next](#next) - - [Victory Checks](#victory-checks) + - [Victory Cache](#victory-cache) - [Layout Types](#layout-types) - [Column](#column) - [Grid](#grid) @@ -799,13 +799,13 @@ Mechanically, a mission is unlocked when any other mission that contains the for This example creates the branching path within `Char` in the Vanilla mission order. --- -### Victory Checks +### Victory Cache ```yaml -victory_checks: 0 +victory_cache: 0 ``` -Valid values are integers in the range 0 to 9. Sets the number of extra locations given for victory on a mission. +Valid values are integers in the range 0 to 10. Sets the number of extra locations given for victory on a mission. -By default, when this value is not set, the option is set to 0 for goal missions and to the global `victory_checks` option for all other missions. +By default, when this value is not set, the option is set to 0 for goal missions and to the global `victory_cache` option for all other missions. ## Layout Types diff --git a/worlds/sc2/mission_order/options.py b/worlds/sc2/mission_order/options.py index 7db294ef500a..b3b3c576edf8 100644 --- a/worlds/sc2/mission_order/options.py +++ b/worlds/sc2/mission_order/options.py @@ -155,7 +155,7 @@ class CustomMissionOrder(OptionDict): Optional("entry_rules"): [EntryRule], Optional("mission_pool"): {int}, Optional("difficulty"): Difficulty, - Optional("victory_checks"): IntZeroToTen, + Optional("victory_cache"): IntZeroToTen, }], }, } diff --git a/worlds/sc2/mission_order/structs.py b/worlds/sc2/mission_order/structs.py index 00d1d78b3dad..7f32122385e9 100644 --- a/worlds/sc2/mission_order/structs.py +++ b/worlds/sc2/mission_order/structs.py @@ -105,13 +105,13 @@ def __init__(self, world: 'SC2World', mission_pools: SC2MOGenMissionPools, data: # Apply victory cache option wherever the value has not yet been defined; must happen after goal missions are decided for mission in self.get_missions(): - if mission.option_victory_checks != -1: + if mission.option_victory_cache != -1: # Already set continue if mission in self.goal_missions: - mission.option_victory_checks = 0 + mission.option_victory_cache = 0 else: - mission.option_victory_checks = world.options.victory_checks.value + mission.option_victory_cache = world.options.victory_cache.value # Resolve names used_names: Set[str] = set() @@ -900,7 +900,7 @@ class SC2MOGenMission(MissionOrderNode): option_entry_rules: List[Dict[str, Any]] option_difficulty: Difficulty # difficulty pool this mission pulls from option_mission_pool: Set[int] # Allowed mission IDs for this slot - option_victory_checks: int # Number of victory cache locations tied to the mission name + option_victory_cache: int # Number of victory cache locations tied to the mission name entry_rule: SubRuleEntryRule min_depth: int # Smallest amount of missions to beat before this slot is accessible @@ -925,7 +925,7 @@ def __init__(self, parent: ReferenceType[SC2MOGenLayout], parent_mission_pool: S self.next = [] self.prev = [] self.min_depth = -1 - self.option_victory_checks = -1 + self.option_victory_cache = -1 def update_with_data(self, data: Dict): self.option_goal = data.get("goal", self.option_goal) @@ -936,7 +936,7 @@ def update_with_data(self, data: Dict): self.option_entry_rules = data.get("entry_rules", self.option_entry_rules) self.option_difficulty = data.get("difficulty", self.option_difficulty) self.option_mission_pool = data.get("mission_pool", self.option_mission_pool) - self.option_victory_checks = data.get("victory_checks", -1) + self.option_victory_cache = data.get("victory_cache", -1) def set_mission( self, world: 'SC2World', mission: SC2Mission, @@ -1081,7 +1081,7 @@ def create_region( if slot is None: target_victory_cache_locations = 0 else: - target_victory_cache_locations = slot.option_victory_checks + target_victory_cache_locations = slot.option_victory_cache victory_cache_locations = 0 for location_data in locations_per_region.get(name, ()): diff --git a/worlds/sc2/options.py b/worlds/sc2/options.py index 7580dc2536a5..1473428eda71 100644 --- a/worlds/sc2/options.py +++ b/worlds/sc2/options.py @@ -885,7 +885,7 @@ def get_option_name(cls, value): return ["Default", "Yes", "No"][int(value)] -class VictoryChecks(Range): +class VictoryCache(Range): """ Controls how many additional checks are awarded for completing a mission. Goal missions are unaffected by this option. @@ -1209,7 +1209,7 @@ class Starcraft2Options(PerGameCommonOptions): excluded_missions: ExcludedMissions exclude_very_hard_missions: ExcludeVeryHardMissions vanilla_items_only: VanillaItemsOnly - victory_checks: VictoryChecks + victory_cache: VictoryCache vanilla_locations: VanillaLocations extra_locations: ExtraLocations challenge_locations: ChallengeLocations