Pre-allocate global config
This commit is contained in:
@@ -10,13 +10,11 @@
|
|||||||
let serverConfig = {};
|
let serverConfig = {};
|
||||||
let databaseConfig = {};
|
let databaseConfig = {};
|
||||||
let emailConfig = {};
|
let emailConfig = {};
|
||||||
let globalConfig = {};
|
|
||||||
let gameConfig = {};
|
let gameConfig = {};
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadGlobalConfig() {
|
let globalConfig = {
|
||||||
return {
|
|
||||||
accountPasswordHash: "SHA512",
|
accountPasswordHash: "SHA512",
|
||||||
npcFarProximity: 100,
|
npcFarProximity: 100,
|
||||||
npcMediumProximity: 40,
|
npcMediumProximity: 40,
|
||||||
@@ -68,7 +66,6 @@ function loadGlobalConfig() {
|
|||||||
geoIPCityDatabaseFilePath: "geoip-city.mmdb",
|
geoIPCityDatabaseFilePath: "geoip-city.mmdb",
|
||||||
randomTipInterval: 600000,
|
randomTipInterval: 600000,
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
@@ -80,7 +77,6 @@ function loadGameConfig() {
|
|||||||
|
|
||||||
function initConfigScript() {
|
function initConfigScript() {
|
||||||
logToConsole(LOG_INFO, "[VRR.Config]: Initializing config script ...");
|
logToConsole(LOG_INFO, "[VRR.Config]: Initializing config script ...");
|
||||||
globalConfig = loadGlobalConfig();
|
|
||||||
gameConfig = loadGameConfig();
|
gameConfig = loadGameConfig();
|
||||||
serverConfig = loadServerConfigFromGameAndPort(server.game, server.port, getMultiplayerMod());
|
serverConfig = loadServerConfigFromGameAndPort(server.game, server.port, getMultiplayerMod());
|
||||||
applyConfigToServer(serverConfig);
|
applyConfigToServer(serverConfig);
|
||||||
|
|||||||
Reference in New Issue
Block a user