Skip to content

Commit

Permalink
DKC3: Long-overdue World code cleanup (ArchipelagoMW#2820)
Browse files Browse the repository at this point in the history

Co-authored-by: Silvris <[email protected]>
  • Loading branch information
2 people authored and Jouramie committed Feb 28, 2024
1 parent a5ee55c commit e918284
Show file tree
Hide file tree
Showing 6 changed files with 287 additions and 280 deletions.
7 changes: 4 additions & 3 deletions worlds/dkc3/Locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from BaseClasses import Location
from .Names import LocationName
from worlds.AutoWorld import World


class DKC3Location(Location):
Expand Down Expand Up @@ -321,13 +322,13 @@ def __init__(self, player: int, name: str = '', address: int = None, parent=None
location_table = {}


def setup_locations(world, player: int):
def setup_locations(world: World):
location_table = {**level_location_table, **boss_location_table, **secret_cave_location_table}

if False:#world.include_trade_sequence[player].value:
if False:#world.options.include_trade_sequence:
location_table.update({**brothers_bear_location_table})

if world.kongsanity[player].value:
if world.options.kongsanity:
location_table.update({**kong_location_table})

return location_table
Expand Down
39 changes: 20 additions & 19 deletions worlds/dkc3/Options.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from dataclasses import dataclass
import typing

from Options import Choice, Range, Option, Toggle, DeathLink, DefaultOnToggle, OptionList
from Options import Choice, Range, Option, Toggle, DeathLink, DefaultOnToggle, OptionList, PerGameCommonOptions


class Goal(Choice):
Expand Down Expand Up @@ -158,21 +159,21 @@ class StartingLifeCount(Range):
default = 5


dkc3_options: typing.Dict[str, type(Option)] = {
#"death_link": DeathLink, # Disabled
"goal": Goal,
#"include_trade_sequence": IncludeTradeSequence, # Disabled
"dk_coins_for_gyrocopter": DKCoinsForGyrocopter,
"krematoa_bonus_coin_cost": KrematoaBonusCoinCost,
"percentage_of_extra_bonus_coins": PercentageOfExtraBonusCoins,
"number_of_banana_birds": NumberOfBananaBirds,
"percentage_of_banana_birds": PercentageOfBananaBirds,
"kongsanity": KONGsanity,
"level_shuffle": LevelShuffle,
"difficulty": Difficulty,
"autosave": Autosave,
"merry": MERRY,
"music_shuffle": MusicShuffle,
"kong_palette_swap": KongPaletteSwap,
"starting_life_count": StartingLifeCount,
}
@dataclass
class DKC3Options(PerGameCommonOptions):
#death_link: DeathLink # Disabled
goal: Goal
#include_trade_sequence: IncludeTradeSequence # Disabled
dk_coins_for_gyrocopter: DKCoinsForGyrocopter
krematoa_bonus_coin_cost: KrematoaBonusCoinCost
percentage_of_extra_bonus_coins: PercentageOfExtraBonusCoins
number_of_banana_birds: NumberOfBananaBirds
percentage_of_banana_birds: PercentageOfBananaBirds
kongsanity: KONGsanity
level_shuffle: LevelShuffle
difficulty: Difficulty
autosave: Autosave
merry: MERRY
music_shuffle: MusicShuffle
kong_palette_swap: KongPaletteSwap
starting_life_count: StartingLifeCount
Loading

0 comments on commit e918284

Please sign in to comment.