Skip to content

Commit 6e7da1e

Browse files
committed
update-presets: Require specifying password_lock for Mido's House export
1 parent c3591a3 commit 6e7da1e

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

update-presets.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@
33
Usage:
44
update-presets.py [options]
55
update-presets.py add <preset>
6-
update-presets.py list-non-default [--rust | --compact] <preset>
6+
update-presets.py list-non-default [--rust-password | --rust-no-password | --compact] <preset>
77
update-presets.py diff <left> <right>
88
update-presets.py (-h | --help)
99
1010
Options:
11-
-h, --help show this help message and exit
12-
--compact print settings on a single line
13-
--defaults fill in missing settings with their default values
14-
--from=<rev> update presets to match the given git commit
15-
--hook run noninteractively for git pre-commit hook purposes
16-
--preset=<preset> only update the named preset
17-
--rust list non-default settings in Rust syntax appropriate for the midos.house codebase
11+
-h, --help show this help message and exit
12+
--compact print settings on a single line
13+
--defaults fill in missing settings with their default values
14+
--from=<rev> update presets to match the given git commit
15+
--hook run noninteractively for git pre-commit hook purposes
16+
--preset=<preset> only update the named preset
17+
--rust-no-password list non-default settings in Rust syntax appropriate for the midos.house codebase (disable password lock)
18+
--rust-password list non-default settings in Rust syntax appropriate for the midos.house codebase (enable password lock)
1819
"""
1920

2021
import sys
@@ -130,8 +131,12 @@ def print_rust_json_setting(name, value, indent):
130131
preset = get_preset(presets, arguments['<preset>'])
131132
if preset is None:
132133
preset = json.loads(subprocess.run([sys.executable, 'OoTRandomizer.py', '--convert_settings', '--settings_string', arguments['<preset>']], stdout=subprocess.PIPE, encoding='utf-8', check=True).stdout)
134+
if arguments['--rust-password']:
135+
preset['password_lock'] = True
136+
if arguments['--rust-no-password']:
137+
preset['password_lock'] = False
133138
non_default = {name: value for name, value in preset.items() if value != SETTINGS_DICT[name].default}
134-
if arguments['--rust']:
139+
if arguments['--rust-password'] or arguments['--rust-no-password']:
135140
print(' collect![')
136141
for name, value in non_default.items():
137142
if name == 'aliases':

version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '8.3.22'
1+
__version__ = '8.3.23'
22

33
# This is a supplemental version number for branches based off of main dev.
44
supplementary_version = 1

0 commit comments

Comments
 (0)