Put Linked options before name roll. (#74)
This commit is contained in:
parent
53cfc6cc0a
commit
8f91e86223
|
@ -227,16 +227,16 @@ def handle_name(name: str):
|
|||
|
||||
def roll_settings(weights):
|
||||
ret = argparse.Namespace()
|
||||
ret.name = get_choice('name', weights)
|
||||
if ret.name:
|
||||
ret.name = handle_name(ret.name)
|
||||
|
||||
if "linked_options" in weights:
|
||||
weights = weights.copy() # make sure we don't write back to other weights sets in same_settings
|
||||
for option_set in weights["linked_options"]:
|
||||
if random.random() < (option_set["percentage"] / 100):
|
||||
weights.update(option_set["options"])
|
||||
|
||||
ret.name = get_choice('name', weights)
|
||||
if ret.name:
|
||||
ret.name = handle_name(ret.name)
|
||||
|
||||
glitches_required = get_choice('glitches_required', weights)
|
||||
if glitches_required not in ['none', 'no_logic', 'overworld_glitches']:
|
||||
logging.warning("Only NMG, OWG and No Logic supported")
|
||||
|
|
Loading…
Reference in New Issue