From 7a12d0281616766548d6a2e5d2f0cdb86c2d714c Mon Sep 17 00:00:00 2001 From: "Mike A. Trethewey" Date: Sat, 15 Feb 2020 02:24:04 -0800 Subject: [PATCH] Generation Widgets --- gui/bottom.py | 8 ++++---- gui/loadcliargs.py | 4 ++-- gui/randomize/generation.py | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gui/bottom.py b/gui/bottom.py index 28e077e9..86b8b83c 100644 --- a/gui/bottom.py +++ b/gui/bottom.py @@ -111,9 +111,9 @@ def create_guiargs(parent): guiargs.heartbeep = parent.pages["randomizer"].pages["gameoptions"].widgets["heartbeep"].storageVar.get() guiargs.heartcolor = parent.pages["randomizer"].pages["gameoptions"].widgets["heartcolor"].storageVar.get() guiargs.fastmenu = parent.pages["randomizer"].pages["gameoptions"].widgets["menuspeed"].storageVar.get() - guiargs.create_spoiler = bool(parent.pages["randomizer"].pages["generation"].generationWidgets["spoiler"].storageVar.get()) - guiargs.skip_playthrough = not bool(parent.pages["randomizer"].pages["generation"].generationWidgets["spoiler"].storageVar.get()) - guiargs.suppress_rom = bool(parent.pages["randomizer"].pages["generation"].generationWidgets["suppressrom"].storageVar.get()) + guiargs.create_spoiler = bool(parent.pages["randomizer"].pages["generation"].widgets["spoiler"].storageVar.get()) + guiargs.skip_playthrough = not bool(parent.pages["randomizer"].pages["generation"].widgets["spoiler"].storageVar.get()) + guiargs.suppress_rom = bool(parent.pages["randomizer"].pages["generation"].widgets["suppressrom"].storageVar.get()) guiargs.openpyramid = bool(parent.pages["randomizer"].pages["entrance"].widgets["openpyramid"].storageVar.get()) guiargs.mapshuffle = bool(parent.pages["randomizer"].pages["dungeon"].widgets["mapshuffle"].storageVar.get()) guiargs.compassshuffle = bool(parent.pages["randomizer"].pages["dungeon"].widgets["compassshuffle"].storageVar.get()) @@ -132,7 +132,7 @@ def create_guiargs(parent): guiargs.enemy_health = parent.pages["randomizer"].pages["enemizer"].widgets["enemyhealth"].storageVar.get() guiargs.enemy_damage = parent.pages["randomizer"].pages["enemizer"].widgets["enemydamage"].storageVar.get() guiargs.shufflepots = bool(parent.pages["randomizer"].pages["enemizer"].widgets["potshuffle"].storageVar.get()) - guiargs.custom = bool(parent.pages["randomizer"].pages["generation"].generationWidgets["usecustompool"].storageVar.get()) + guiargs.custom = bool(parent.pages["randomizer"].pages["generation"].widgets["usecustompool"].storageVar.get()) guiargs.customitemarray = [int(parent.pages["custom"].content.customWidgets["bow"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["silversupgrade"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["boomerang"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["redmerang"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["hookshot"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["mushroom"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["powder"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["firerod"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["icerod"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["bombos"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["ether"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["quake"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["lamp"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["hammer"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["shovel"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["flute"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["bugnet"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["book"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["bottle"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["somaria"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["byrna"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["cape"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["mirror"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["boots"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["powerglove"].storageVar.get()), int(parent.pages["custom"].content.customWidgets["titansmitt"].storageVar.get()), diff --git a/gui/loadcliargs.py b/gui/loadcliargs.py index 15b6607a..3379fb28 100644 --- a/gui/loadcliargs.py +++ b/gui/loadcliargs.py @@ -9,8 +9,8 @@ def loadcliargs(gui, args): if type(v) is dict: setattr(args, k, v[1]) # only get values for player 1 for now # load values from commandline args - gui.pages["randomizer"].pages["generation"].generationWidgets["spoiler"].storageVar.set(int(args.create_spoiler)) - gui.pages["randomizer"].pages["generation"].generationWidgets["suppressrom"].storageVar.set(int(args.suppress_rom)) + gui.pages["randomizer"].pages["generation"].widgets["spoiler"].storageVar.set(int(args.create_spoiler)) + gui.pages["randomizer"].pages["generation"].widgets["suppressrom"].storageVar.set(int(args.suppress_rom)) gui.pages["randomizer"].pages["dungeon"].widgets["mapshuffle"].storageVar.set(args.mapshuffle) gui.pages["randomizer"].pages["dungeon"].widgets["compassshuffle"].storageVar.set(args.compassshuffle) gui.pages["randomizer"].pages["dungeon"].widgets["smallkeyshuffle"].storageVar.set(args.keyshuffle) diff --git a/gui/randomize/generation.py b/gui/randomize/generation.py index aea9c5e9..2095a4bc 100644 --- a/gui/randomize/generation.py +++ b/gui/randomize/generation.py @@ -7,40 +7,40 @@ def generation_page(parent,settings): self = ttk.Frame(parent) # Generation Setup options - self.generationWidgets = {} + self.widgets = {} ## Generate Spoiler key = "spoiler" - self.generationWidgets[key] = widgets.make_widget( + self.widgets[key] = widgets.make_widget( self, "checkbox", self, "Create Spoiler Log", None ) - self.generationWidgets[key].pack(anchor=W) + self.widgets[key].pack(anchor=W) ## Don't make ROM key = "suppressrom" - self.generationWidgets[key] = widgets.make_widget( + self.widgets[key] = widgets.make_widget( self, "checkbox", self, "Do not create patched ROM", None ) - self.generationWidgets[key].pack(anchor=W) + self.widgets[key].pack(anchor=W) ## Use Custom Item Pool as defined in Custom tab key = "usecustompool" - self.generationWidgets[key] = widgets.make_widget( + self.widgets[key] = widgets.make_widget( self, "checkbox", self, "Use custom item pool", None ) - self.generationWidgets[key].pack(anchor=W) + self.widgets[key].pack(anchor=W) ## Locate base ROM baseRomFrame = Frame(self)