Load global and game cfg

This commit is contained in:
Vortrex
2021-04-18 19:12:18 -05:00
parent fc4b8b0237
commit 35a84975f8

View File

@@ -11,10 +11,13 @@
let serverConfig = {};
let databaseConfig = {};
let emailConfig = {};
let globalConfig = {};
let gameConfig = {};
// ===========================================================================
let globalConfig = {
function loadGlobalConfig() {
return {
accountPasswordHash: "SHA512",
npcFarProximity: 100,
npcMediumProximity: 40,
@@ -52,10 +55,12 @@ let globalConfig = {
],
itemActionStateReset: 5000,
};
}
// ===========================================================================
let gameConfig = {
function loadGameConfig() {
return {
blipSprites: [
false,
{ // GTA III
@@ -540,13 +545,15 @@ let gameConfig = {
],
}
*/
}
};
// ===========================================================================
function initConfigScript() {
logToConsole(LOG_INFO, "[Asshat.Config]: Initializing config script ...");
globalConfig = loadGlobalConfig();
gameConfig = loadGameConfig();
serverConfig = loadServerConfigFromGameAndPort(server.game, server.port);
applyConfigToServer(serverConfig);
logToConsole(LOG_INFO, "[Asshat.Config]: Config script initialized!");