Load global and game cfg
This commit is contained in:
@@ -11,10 +11,13 @@
|
|||||||
let serverConfig = {};
|
let serverConfig = {};
|
||||||
let databaseConfig = {};
|
let databaseConfig = {};
|
||||||
let emailConfig = {};
|
let emailConfig = {};
|
||||||
|
let globalConfig = {};
|
||||||
|
let gameConfig = {};
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
let globalConfig = {
|
function loadGlobalConfig() {
|
||||||
|
return {
|
||||||
accountPasswordHash: "SHA512",
|
accountPasswordHash: "SHA512",
|
||||||
npcFarProximity: 100,
|
npcFarProximity: 100,
|
||||||
npcMediumProximity: 40,
|
npcMediumProximity: 40,
|
||||||
@@ -51,11 +54,13 @@ let globalConfig = {
|
|||||||
AG_ITEM_USETYPE_PEPPERSPRAY,
|
AG_ITEM_USETYPE_PEPPERSPRAY,
|
||||||
],
|
],
|
||||||
itemActionStateReset: 5000,
|
itemActionStateReset: 5000,
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
let gameConfig = {
|
function loadGameConfig() {
|
||||||
|
return {
|
||||||
blipSprites: [
|
blipSprites: [
|
||||||
false,
|
false,
|
||||||
{ // GTA III
|
{ // GTA III
|
||||||
@@ -540,13 +545,15 @@ let gameConfig = {
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initConfigScript() {
|
function initConfigScript() {
|
||||||
logToConsole(LOG_INFO, "[Asshat.Config]: Initializing config script ...");
|
logToConsole(LOG_INFO, "[Asshat.Config]: Initializing config script ...");
|
||||||
|
globalConfig = loadGlobalConfig();
|
||||||
|
gameConfig = loadGameConfig();
|
||||||
serverConfig = loadServerConfigFromGameAndPort(server.game, server.port);
|
serverConfig = loadServerConfigFromGameAndPort(server.game, server.port);
|
||||||
applyConfigToServer(serverConfig);
|
applyConfigToServer(serverConfig);
|
||||||
logToConsole(LOG_INFO, "[Asshat.Config]: Config script initialized!");
|
logToConsole(LOG_INFO, "[Asshat.Config]: Config script initialized!");
|
||||||
|
|||||||
Reference in New Issue
Block a user