Generation Widgets

This commit is contained in:
Mike A. Trethewey
2020-02-15 02:24:04 -08:00
parent 88f7e34670
commit 7a12d02816
3 changed files with 13 additions and 13 deletions

View File

@@ -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()),

View File

@@ -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)

View File

@@ -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)