Undertale: Fixes a major logic bug, and updates Undertale to use the new Options API (#3528)

* Updated the options definitions to the new api

* Fixed the wrong base class being used for UndertaleOptions

* Undertale: Added get_filler_item_name to Undertale, changed multiworld.per_slot_randoms to self.random, removed some unused imports in options.py, and fixed rules.py still using state.multiworld instead of world.options, and simplified the set_completion_rules function in rules.py

* Undertale: Fixed it trying to add strings to the finished item pool

* fixed 1000g item not being in the key items pool for Undertale

* Removed ".copy()" for the junk_weights, reformatted the requested lines to have less new lines, and changed "itempool += [self.create_filler()]" to "itempool.append(self.create_filler())"
This commit is contained in:
Mewlif
2024-06-21 12:21:46 -04:00
committed by GitHub
parent ce37bed7c6
commit 40c9dfd3bf
4 changed files with 136 additions and 118 deletions

View File

@@ -1,5 +1,5 @@
import typing
from Options import Choice, Option, Toggle, Range
from Options import Choice, Toggle, Range, PerGameCommonOptions
from dataclasses import dataclass
class RouteRequired(Choice):
@@ -86,17 +86,17 @@ class RandoBattleOptions(Toggle):
default = 0
undertale_options: typing.Dict[str, type(Option)] = {
"route_required": RouteRequired,
"starting_area": StartingArea,
"key_hunt": KeyHunt,
"key_pieces": KeyPieces,
"rando_love": RandomizeLove,
"rando_stats": RandomizeStats,
"temy_include": IncludeTemy,
"no_equips": NoEquips,
"only_flakes": OnlyFlakes,
"prog_armor": ProgressiveArmor,
"prog_weapons": ProgressiveWeapons,
"rando_item_button": RandoBattleOptions,
}
@dataclass
class UndertaleOptions(PerGameCommonOptions):
route_required: RouteRequired
starting_area: StartingArea
key_hunt: KeyHunt
key_pieces: KeyPieces
rando_love: RandomizeLove
rando_stats: RandomizeStats
temy_include: IncludeTemy
no_equips: NoEquips
only_flakes: OnlyFlakes
prog_armor: ProgressiveArmor
prog_weapons: ProgressiveWeapons
rando_item_button: RandoBattleOptions