Update Config File Generator

This commit is contained in:
2025-09-18 15:44:32 +03:00
parent e3b7ea6c24
commit 1a0698b3e3
2 changed files with 21 additions and 2 deletions

View File

@@ -4,4 +4,7 @@ version = 1.21
[ACCOUNT] [ACCOUNT]
key = NK key = NK
id = NA id = NA
usernname = NK
friendcode = NK
awards = []

View File

@@ -20,10 +20,11 @@ parser.add_argument('-backend', help="Runs the app in backend mode (no UI)", act
#declare default vars #declare default vars
class Config(): class Config():
AccountKey = "NK" AccountKey = "NK"
AccountID = "NA" AccountID = "NA"
AccountUsername = "NoAccount"
AccountFriendCode = "NK"
AccountAwards = []
version = APP_VERSION version = APP_VERSION
class ServerObj(): class ServerObj():
@@ -91,11 +92,26 @@ def WarnMissingConfig(ConfigError):
def makeConfig(): def makeConfig():
#
# AccountKey = "NK"
# AccountID = "NA"
# AccountUsername = "NoAccount"
# AccountFriendCode = "NK"
# AccountAwards = []
#
config['DEFAULT'] = {'Version': Config.version} config['DEFAULT'] = {'Version': Config.version}
config['ACCOUNT'] = {} config['ACCOUNT'] = {}
config['ACCOUNT']['KEY'] = "NK" config['ACCOUNT']['KEY'] = "NK"
config['ACCOUNT']["ID"] = "NA" config['ACCOUNT']["ID"] = "NA"
config['ACCOUNT']['Usernname'] = "NK"
config['ACCOUNT']['FriendCode'] = "NK"
config['ACCOUNT']['Awards'] = "[]"
with open('Config.ini', 'w') as configfile: with open('Config.ini', 'w') as configfile:
config.write(configfile) config.write(configfile)