SC2: Add option presets (#5436)

* SC2: Add option presets

* SC2: Address reviews

* SC2: Fix import

* SC2: Update key mode

* SC2: Update renamed option

* sc2: PR comment; switching from __dataclass_fields__ to dataclasses.fields()

* sc2: Changing quote style to match AP standard

* sc2: PR comments; Switching to Starcraft2.type_hints

---------

Co-authored-by: Snarky <sparkykueken@gmail.com>
Co-authored-by: MatthewMarinets <matthew.marinets@gmail.com>
This commit is contained in:
Snarky
2025-10-07 17:25:08 +02:00
committed by GitHub
parent c7978bcc12
commit 5a933a160a
3 changed files with 453 additions and 1 deletions

View File

@@ -6,7 +6,8 @@ from datetime import timedelta
from Options import (
Choice, Toggle, DefaultOnToggle, OptionSet, Range,
PerGameCommonOptions, Option, VerifyKeys, StartInventory,
is_iterable_except_str, OptionGroup, Visibility, ItemDict
is_iterable_except_str, OptionGroup, Visibility, ItemDict,
Accessibility, ProgressionBalancing
)
from Utils import get_fuzzy_results
from BaseClasses import PlandoOptions
@@ -1756,3 +1757,6 @@ void_trade_age_limits_ms: Dict[int, int] = {
VoidTradeAgeLimit.option_1_day: 1000 * int(timedelta(days = 1).total_seconds()),
VoidTradeAgeLimit.option_1_week: 1000 * int(timedelta(weeks = 1).total_seconds()),
}
# Store the names of all options
OPTION_NAME = {option_type: name for name, option_type in Starcraft2Options.type_hints.items()}