From 519b1c73b4d30791567d5415edfc6069aa1ebddf Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sun, 4 Apr 2021 23:20:11 -0500 Subject: [PATCH] Change divider style, change cfg init to info --- scripts/server/config.js | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/scripts/server/config.js b/scripts/server/config.js index 5a3d7a0f..988f67b7 100644 --- a/scripts/server/config.js +++ b/scripts/server/config.js @@ -12,6 +12,8 @@ let serverConfig = {}; let databaseConfig = {}; let emailConfig = {}; +// =========================================================================== + let globalConfig = { accountPasswordHash: "SHA512", npcFarProximity: 100, @@ -51,6 +53,8 @@ let globalConfig = { itemActionStateReset: 5000, }; +// =========================================================================== + let gameConfig = { blipSprites: [ false, @@ -539,13 +543,13 @@ let gameConfig = { }; -// ------------------------------------------------------------------------- +// =========================================================================== function initConfigScript() { - logToConsole(LOG_DEBUG, "[Asshat.Config]: Initializing config script ..."); + logToConsole(LOG_INFO, "[Asshat.Config]: Initializing config script ..."); serverConfig = loadServerConfigFromGameAndPort(server.game, server.port); applyConfigToServer(serverConfig); - logToConsole(LOG_DEBUG, "[Asshat.Config]: Config script initialized!"); + logToConsole(LOG_INFO, "[Asshat.Config]: Config script initialized!"); } // =========================================================================== @@ -588,7 +592,7 @@ function loadServerConfigFromId(tempServerId) { return false; } -// ------------------------------------------------------------------------- +// =========================================================================== function applyConfigToServer(tempServerConfig) { server.name = tempServerConfig.name; @@ -600,7 +604,7 @@ function applyConfigToServer(tempServerConfig) { updateServerRules(); } -// ------------------------------------------------------------------------- +// =========================================================================== function saveServerConfigToDatabase(serverConfigData) { logToConsole(LOG_DEBUG, `[Asshat.Config]: Saving server ${serverConfigData.databaseId} configuration to database ...`); @@ -616,31 +620,31 @@ function saveServerConfigToDatabase(serverConfigData) { logToConsole(LOG_DEBUG, `[Asshat.Config]: Server ${serverConfigData.databaseId} configuration saved to database!`); } -// ------------------------------------------------------------------------- +// =========================================================================== function getServerConfig() { return serverConfig; } -// ------------------------------------------------------------------------- +// =========================================================================== function getGameConfig() { return gameConfig; } -// ------------------------------------------------------------------------- +// =========================================================================== function getGlobalConfig() { return globalConfig; } -// ------------------------------------------------------------------------- +// =========================================================================== function getServerId() { return getServerConfig().databaseId; } -// ------------------------------------------------------------------------- +// =========================================================================== function setTimeCommand(command, params, client) { if(areParamsEmpty(params)) { @@ -670,7 +674,7 @@ function setTimeCommand(command, params, client) { } -// ------------------------------------------------------------------------- +// =========================================================================== function setMinuteDurationCommand(command, params, client) { if(areParamsEmpty(params)) { @@ -829,4 +833,4 @@ function reloadDatabaseConfigurationCommand(command, params, client) { return true; } -// ------------------------------------------------------------------------- +// ===========================================================================