SC2: fix typo in AllInMap Choice

This commit is contained in:
Fabian Dill 2022-05-20 17:05:16 +02:00 committed by KonoTyran
parent bb15485965
commit 388f064307
1 changed files with 7 additions and 2 deletions

View File

@ -2,6 +2,7 @@ from typing import Dict
from BaseClasses import MultiWorld from BaseClasses import MultiWorld
from Options import Choice, Option from Options import Choice, Option
class GameDifficulty(Choice): class GameDifficulty(Choice):
"""The difficulty of the campaign, affects enemy AI, starting units, and game speed.""" """The difficulty of the campaign, affects enemy AI, starting units, and game speed."""
display_name = "Game Difficulty" display_name = "Game Difficulty"
@ -10,6 +11,7 @@ class GameDifficulty(Choice):
option_hard = 2 option_hard = 2
option_brutal = 3 option_brutal = 3
class UpgradeBonus(Choice): class UpgradeBonus(Choice):
"""Determines what lab upgrade to use, whether it is Ultra-Capacitors which boost attack speed with every weapon upgrade """Determines what lab upgrade to use, whether it is Ultra-Capacitors which boost attack speed with every weapon upgrade
or Vanadium Plating which boosts life with every armor upgrade.""" or Vanadium Plating which boosts life with every armor upgrade."""
@ -17,6 +19,7 @@ class UpgradeBonus(Choice):
option_ultra_capacitors = 0 option_ultra_capacitors = 0
option_vanadium_plating = 1 option_vanadium_plating = 1
class BunkerUpgrade(Choice): class BunkerUpgrade(Choice):
"""Determines what bunker lab upgrade to use, whether it is Shrike Turret which outfits bunkers with an automated turret or """Determines what bunker lab upgrade to use, whether it is Shrike Turret which outfits bunkers with an automated turret or
Fortified Bunker which boosts the life of bunkers.""" Fortified Bunker which boosts the life of bunkers."""
@ -24,8 +27,9 @@ class BunkerUpgrade(Choice):
option_shrike_turret = 0 option_shrike_turret = 0
option_fortified_bunker = 1 option_fortified_bunker = 1
class AllInMap(Choice): class AllInMap(Choice):
"""Determines what verion of All-In (final map) that will be generated for the campaign.""" """Determines what version of All-In (final map) that will be generated for the campaign."""
display_name = "All In Map" display_name = "All In Map"
option_ground = 0 option_ground = 0
option_air = 1 option_air = 1
@ -39,10 +43,11 @@ sc2wol_options: Dict[str, Option] = {
"all_in_map": AllInMap, "all_in_map": AllInMap,
} }
def get_option_value(world: MultiWorld, player: int, name: str) -> int: def get_option_value(world: MultiWorld, player: int, name: str) -> int:
option = getattr(world, name, None) option = getattr(world, name, None)
if option == None: if option == None:
return 0 return 0
return int(option[player].value) return int(option[player].value)