simplify necessary sbinit fields on Windows

This commit is contained in:
Kae 2023-11-03 08:07:29 +11:00
parent 5815a873a7
commit 74985240fc
3 changed files with 12 additions and 13 deletions

View File

@ -4,11 +4,5 @@
"..\\mods\\" "..\\mods\\"
], ],
"storageDirectory" : "..\\storage\\", "storageDirectory" : "..\\storage\\"
"defaultConfiguration" : {
"gameServerBind" : "*",
"queryServerBind" : "*",
"rconServerBind" : "*"
}
} }

View File

@ -15,10 +15,6 @@
"defaultConfiguration" : { "defaultConfiguration" : {
"allowAdminCommandsFromAnyone" : true, "allowAdminCommandsFromAnyone" : true,
"anonymousConnectionsAreAdmin" : true, "anonymousConnectionsAreAdmin" : true
"gameServerBind" : "*",
"queryServerBind" : "*",
"rconServerBind" : "*"
} }
} }

View File

@ -154,8 +154,17 @@ Root::Settings RootLoader::rootSettingsForOptions(Options const& options) const
rootSettings.assetDirectories = jsonToStringList(bootConfig.get("assetDirectories")); rootSettings.assetDirectories = jsonToStringList(bootConfig.get("assetDirectories"));
#ifdef STAR_SYSTEM_WINDOWS
rootSettings.defaultConfiguration = BaseDefaultConfiguration
.set("gameServerBind", "*")
.set("queryServerBind", "*")
.set("rconServerBind", "*");
#else
rootSettings.defaultConfiguration = BaseDefaultConfiguration;
#endif
rootSettings.defaultConfiguration = jsonMerge( rootSettings.defaultConfiguration = jsonMerge(
BaseDefaultConfiguration, rootSettings.defaultConfiguration,
m_defaults.additionalDefaultConfiguration, m_defaults.additionalDefaultConfiguration,
bootConfig.get("defaultConfiguration", {}) bootConfig.get("defaultConfiguration", {})
); );