fixed default settings and config.json

This commit is contained in:
Ayush Saini 2025-05-04 21:54:33 +05:30
parent 427209b3c3
commit 2d322e2193
4 changed files with 227 additions and 141 deletions

View file

@ -548,12 +548,14 @@ class ServerManagerApp:
)
return
except Exception as exc:
json_path = os.path.abspath(
os.path.join(os.path.dirname(__file__), 'config.json')
)
print(f'{Clr.RED}Error loading config file:\n{exc}.{Clr.RST}',
flush=True)
with open(self._ba_root_path + "/mods/defaults/config.toml", "r") as infile:
with open(self._ba_root_path + "/mods/defaults/config.json", "r") as infile:
default_file = infile.read()
with open(self._config_path, "w") as outfile:
with open(json_path, "w") as outfile:
outfile.write(default_file)
print("config reset done")