move server to new options function

This commit is contained in:
Fabian Dill 2020-03-22 21:25:22 +01:00
parent 1c7fa25031
commit 963895e7d4
1 changed files with 4 additions and 5 deletions

View File

@ -619,11 +619,10 @@ def parse_args() -> argparse.Namespace:
parser.add_argument('--disable_item_cheat', default=False, action='store_true') parser.add_argument('--disable_item_cheat', default=False, action='store_true')
parser.add_argument('--port_forward', default=False, action='store_true') parser.add_argument('--port_forward', default=False, action='store_true')
args = parser.parse_args() args = parser.parse_args()
if os.path.exists('host.yaml'): file_options = Utils.get_options()["server_options"]
file_options = Utils.parse_yaml(open("host.yaml").read())["server_options"] for key, value in file_options.items():
for key, value in file_options.items(): if value is not None:
if value is not None: setattr(args, key, value)
setattr(args, key, value)
return args return args