Change divider style, change cfg init to info
This commit is contained in:
@@ -12,6 +12,8 @@ let serverConfig = {};
|
|||||||
let databaseConfig = {};
|
let databaseConfig = {};
|
||||||
let emailConfig = {};
|
let emailConfig = {};
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
let globalConfig = {
|
let globalConfig = {
|
||||||
accountPasswordHash: "SHA512",
|
accountPasswordHash: "SHA512",
|
||||||
npcFarProximity: 100,
|
npcFarProximity: 100,
|
||||||
@@ -51,6 +53,8 @@ let globalConfig = {
|
|||||||
itemActionStateReset: 5000,
|
itemActionStateReset: 5000,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
let gameConfig = {
|
let gameConfig = {
|
||||||
blipSprites: [
|
blipSprites: [
|
||||||
false,
|
false,
|
||||||
@@ -539,13 +543,13 @@ let gameConfig = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// ===========================================================================
|
||||||
|
|
||||||
function initConfigScript() {
|
function initConfigScript() {
|
||||||
logToConsole(LOG_DEBUG, "[Asshat.Config]: Initializing config script ...");
|
logToConsole(LOG_INFO, "[Asshat.Config]: Initializing config script ...");
|
||||||
serverConfig = loadServerConfigFromGameAndPort(server.game, server.port);
|
serverConfig = loadServerConfigFromGameAndPort(server.game, server.port);
|
||||||
applyConfigToServer(serverConfig);
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// ===========================================================================
|
||||||
|
|
||||||
function applyConfigToServer(tempServerConfig) {
|
function applyConfigToServer(tempServerConfig) {
|
||||||
server.name = tempServerConfig.name;
|
server.name = tempServerConfig.name;
|
||||||
@@ -600,7 +604,7 @@ function applyConfigToServer(tempServerConfig) {
|
|||||||
updateServerRules();
|
updateServerRules();
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// ===========================================================================
|
||||||
|
|
||||||
function saveServerConfigToDatabase(serverConfigData) {
|
function saveServerConfigToDatabase(serverConfigData) {
|
||||||
logToConsole(LOG_DEBUG, `[Asshat.Config]: Saving server ${serverConfigData.databaseId} configuration to database ...`);
|
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!`);
|
logToConsole(LOG_DEBUG, `[Asshat.Config]: Server ${serverConfigData.databaseId} configuration saved to database!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// ===========================================================================
|
||||||
|
|
||||||
function getServerConfig() {
|
function getServerConfig() {
|
||||||
return serverConfig;
|
return serverConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// ===========================================================================
|
||||||
|
|
||||||
function getGameConfig() {
|
function getGameConfig() {
|
||||||
return gameConfig;
|
return gameConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// ===========================================================================
|
||||||
|
|
||||||
function getGlobalConfig() {
|
function getGlobalConfig() {
|
||||||
return globalConfig;
|
return globalConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// ===========================================================================
|
||||||
|
|
||||||
function getServerId() {
|
function getServerId() {
|
||||||
return getServerConfig().databaseId;
|
return getServerConfig().databaseId;
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// ===========================================================================
|
||||||
|
|
||||||
function setTimeCommand(command, params, client) {
|
function setTimeCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
@@ -670,7 +674,7 @@ function setTimeCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// ===========================================================================
|
||||||
|
|
||||||
function setMinuteDurationCommand(command, params, client) {
|
function setMinuteDurationCommand(command, params, client) {
|
||||||
if(areParamsEmpty(params)) {
|
if(areParamsEmpty(params)) {
|
||||||
@@ -829,4 +833,4 @@ function reloadDatabaseConfigurationCommand(command, params, client) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// ===========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user