Adding new GUI/CLI option for Keep Similar Together
This commit is contained in:
@@ -24,6 +24,7 @@ class World(object):
|
|||||||
self.players = players
|
self.players = players
|
||||||
self.teams = 1
|
self.teams = 1
|
||||||
self.owShuffle = owShuffle.copy()
|
self.owShuffle = owShuffle.copy()
|
||||||
|
self.owKeepSimilar = True
|
||||||
self.shuffle = shuffle.copy()
|
self.shuffle = shuffle.copy()
|
||||||
self.doorShuffle = doorShuffle.copy()
|
self.doorShuffle = doorShuffle.copy()
|
||||||
self.intensity = {}
|
self.intensity = {}
|
||||||
@@ -2109,6 +2110,7 @@ class Spoiler(object):
|
|||||||
'weapons': self.world.swords,
|
'weapons': self.world.swords,
|
||||||
'goal': self.world.goal,
|
'goal': self.world.goal,
|
||||||
'ow_shuffle': self.world.owShuffle,
|
'ow_shuffle': self.world.owShuffle,
|
||||||
|
'ow_keepsimilar': self.world.owKeepSimilar,
|
||||||
'shuffle': self.world.shuffle,
|
'shuffle': self.world.shuffle,
|
||||||
'door_shuffle': self.world.doorShuffle,
|
'door_shuffle': self.world.doorShuffle,
|
||||||
'intensity': self.world.intensity,
|
'intensity': self.world.intensity,
|
||||||
@@ -2187,6 +2189,7 @@ class Spoiler(object):
|
|||||||
outfile.write('Difficulty:'.ljust(line_width) + '%s\n' % self.metadata['item_pool'][player])
|
outfile.write('Difficulty:'.ljust(line_width) + '%s\n' % self.metadata['item_pool'][player])
|
||||||
outfile.write('Item Functionality:'.ljust(line_width) + '%s\n' % self.metadata['item_functionality'][player])
|
outfile.write('Item Functionality:'.ljust(line_width) + '%s\n' % self.metadata['item_functionality'][player])
|
||||||
outfile.write('Overworld Shuffle:'.ljust(line_width) + '%s\n' % self.metadata['ow_shuffle'][player])
|
outfile.write('Overworld Shuffle:'.ljust(line_width) + '%s\n' % self.metadata['ow_shuffle'][player])
|
||||||
|
outfile.write('Keep OW Edges Together:'.ljust(line_width) + '%s\n' % ('Yes' if self.metadata['ow_keepsimilar'][player] else 'No'))
|
||||||
outfile.write('Entrance Shuffle:'.ljust(line_width) + '%s\n' % self.metadata['shuffle'][player])
|
outfile.write('Entrance Shuffle:'.ljust(line_width) + '%s\n' % self.metadata['shuffle'][player])
|
||||||
outfile.write('Door Shuffle:'.ljust(line_width) + '%s\n' % self.metadata['door_shuffle'][player])
|
outfile.write('Door Shuffle:'.ljust(line_width) + '%s\n' % self.metadata['door_shuffle'][player])
|
||||||
outfile.write('Intensity:'.ljust(line_width) + '%s\n' % self.metadata['intensity'][player])
|
outfile.write('Intensity:'.ljust(line_width) + '%s\n' % self.metadata['intensity'][player])
|
||||||
|
|||||||
3
CLI.py
3
CLI.py
@@ -94,7 +94,7 @@ def parse_cli(argv, no_defaults=False):
|
|||||||
for player in range(1, multiargs.multi + 1):
|
for player in range(1, multiargs.multi + 1):
|
||||||
playerargs = parse_cli(shlex.split(getattr(ret, f"p{player}")), True)
|
playerargs = parse_cli(shlex.split(getattr(ret, f"p{player}")), True)
|
||||||
|
|
||||||
for name in ['logic', 'mode', 'swords', 'goal', 'difficulty', 'item_functionality', 'ow_shuffle',
|
for name in ['logic', 'mode', 'swords', 'goal', 'difficulty', 'item_functionality', 'ow_shuffle', 'ow_keepsimilar',
|
||||||
'shuffle', 'door_shuffle', 'intensity', 'crystals_ganon', 'crystals_gt', 'openpyramid',
|
'shuffle', 'door_shuffle', 'intensity', 'crystals_ganon', 'crystals_gt', 'openpyramid',
|
||||||
'mapshuffle', 'compassshuffle', 'keyshuffle', 'bigkeyshuffle', 'startinventory',
|
'mapshuffle', 'compassshuffle', 'keyshuffle', 'bigkeyshuffle', 'startinventory',
|
||||||
'triforce_pool_min', 'triforce_pool_max', 'triforce_goal_min', 'triforce_goal_max',
|
'triforce_pool_min', 'triforce_pool_max', 'triforce_goal_min', 'triforce_goal_max',
|
||||||
@@ -143,6 +143,7 @@ def parse_settings():
|
|||||||
"openpyramid": False,
|
"openpyramid": False,
|
||||||
"shuffleganon": True,
|
"shuffleganon": True,
|
||||||
"ow_shuffle": "vanilla",
|
"ow_shuffle": "vanilla",
|
||||||
|
"ow_keepsimilar": True,
|
||||||
"shuffle": "vanilla",
|
"shuffle": "vanilla",
|
||||||
|
|
||||||
"shufflepots": False,
|
"shufflepots": False,
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ def roll_settings(weights):
|
|||||||
|
|
||||||
overworld_shuffle = get_choice('overworld_shuffle')
|
overworld_shuffle = get_choice('overworld_shuffle')
|
||||||
ret.ow_shuffle = overworld_shuffle if overworld_shuffle != 'none' else 'vanilla'
|
ret.ow_shuffle = overworld_shuffle if overworld_shuffle != 'none' else 'vanilla'
|
||||||
|
ret.ow_keepsimilar = get_choice('ow_keepsimilar')
|
||||||
entrance_shuffle = get_choice('entrance_shuffle')
|
entrance_shuffle = get_choice('entrance_shuffle')
|
||||||
ret.shuffle = entrance_shuffle if entrance_shuffle != 'none' else 'vanilla'
|
ret.shuffle = entrance_shuffle if entrance_shuffle != 'none' else 'vanilla'
|
||||||
door_shuffle = get_choice('door_shuffle')
|
door_shuffle = get_choice('door_shuffle')
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ Alternatively, run ```Gui.py``` for a simple graphical user interface. (WIP)
|
|||||||
|
|
||||||
Only extra settings are found here. All door and entrance randomizer settings are supported. See their [readme](https://github.com/Aerinon/ALttPDoorRandomizer/blob/master/README.md)
|
Only extra settings are found here. All door and entrance randomizer settings are supported. See their [readme](https://github.com/Aerinon/ALttPDoorRandomizer/blob/master/README.md)
|
||||||
|
|
||||||
## Overworld Shuffle (--owShuffle)
|
## Overworld Shuffle (--ow_shuffle)
|
||||||
|
|
||||||
### Full
|
### Full
|
||||||
|
|
||||||
@@ -66,3 +66,9 @@ Show the help message and exit.
|
|||||||
```
|
```
|
||||||
|
|
||||||
For specifying the overworld shuffle you want as above. (default: vanilla)
|
For specifying the overworld shuffle you want as above. (default: vanilla)
|
||||||
|
|
||||||
|
```
|
||||||
|
--ow_keepsimilar
|
||||||
|
```
|
||||||
|
|
||||||
|
This keeps similar edge transitions paired together with other pairs of transitions
|
||||||
|
|||||||
@@ -116,6 +116,10 @@
|
|||||||
"crossed"
|
"crossed"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"ow_keepsimilar": {
|
||||||
|
"action": "store_true",
|
||||||
|
"type": "bool"
|
||||||
|
},
|
||||||
"shuffle": {
|
"shuffle": {
|
||||||
"choices": [
|
"choices": [
|
||||||
"vanilla",
|
"vanilla",
|
||||||
|
|||||||
@@ -203,6 +203,7 @@
|
|||||||
" overworld screens from the same world.",
|
" overworld screens from the same world.",
|
||||||
"Crossed: Overworld screen transitions can lead to any other overworld screen."
|
"Crossed: Overworld screen transitions can lead to any other overworld screen."
|
||||||
],
|
],
|
||||||
|
"ow_keepsimilar": [ "This keeps similar edge transitions together. ie. the two west edges on Potion Shop will be paired with another similar pair." ],
|
||||||
"door_shuffle": [
|
"door_shuffle": [
|
||||||
"Select Door Shuffling Algorithm. (default: %(default)s)",
|
"Select Door Shuffling Algorithm. (default: %(default)s)",
|
||||||
"Basic: Doors are mixed within a single dungeon.",
|
"Basic: Doors are mixed within a single dungeon.",
|
||||||
|
|||||||
@@ -114,6 +114,8 @@
|
|||||||
"randomizer.overworld.overworldshuffle.simple": "Simple",
|
"randomizer.overworld.overworldshuffle.simple": "Simple",
|
||||||
"randomizer.overworld.overworldshuffle.full": "Full",
|
"randomizer.overworld.overworldshuffle.full": "Full",
|
||||||
"randomizer.overworld.overworldshuffle.crossed": "Crossed",
|
"randomizer.overworld.overworldshuffle.crossed": "Crossed",
|
||||||
|
|
||||||
|
"randomizer.overworld.keepsimilar": "Keep Similar Edges Together",
|
||||||
|
|
||||||
"randomizer.entrance.openpyramid": "Pre-open Pyramid Hole",
|
"randomizer.entrance.openpyramid": "Pre-open Pyramid Hole",
|
||||||
"randomizer.entrance.shuffleganon": "Include Ganon's Tower and Pyramid Hole in shuffle pool",
|
"randomizer.entrance.shuffleganon": "Include Ganon's Tower and Pyramid Hole in shuffle pool",
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
"vanilla",
|
"vanilla",
|
||||||
"full"
|
"full"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"keepsimilar": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"default": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -71,7 +71,8 @@ SETTINGSTOPROCESS = {
|
|||||||
"sortingalgo": "algorithm"
|
"sortingalgo": "algorithm"
|
||||||
},
|
},
|
||||||
"overworld": {
|
"overworld": {
|
||||||
"overworldshuffle": "ow_shuffle"
|
"overworldshuffle": "ow_shuffle",
|
||||||
|
"keepsimilar": "ow_keepsimilar"
|
||||||
},
|
},
|
||||||
"entrance": {
|
"entrance": {
|
||||||
"openpyramid": "openpyramid",
|
"openpyramid": "openpyramid",
|
||||||
|
|||||||
Reference in New Issue
Block a user