Update server config class
This commit is contained in:
@@ -49,7 +49,8 @@ class ServerConfigData {
|
|||||||
this.showLogo = true;
|
this.showLogo = true;
|
||||||
this.inflationMultiplier = 1;
|
this.inflationMultiplier = 1;
|
||||||
this.testerOnly = false;
|
this.testerOnly = false;
|
||||||
this.settings = 0;
|
this.devServer = false;
|
||||||
|
this.nameTagDistance = 50.0;
|
||||||
|
|
||||||
this.antiCheat = {
|
this.antiCheat = {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
@@ -78,12 +79,9 @@ class ServerConfigData {
|
|||||||
this.realTimeZone = 0;
|
this.realTimeZone = 0;
|
||||||
|
|
||||||
this.discordConfig = {
|
this.discordConfig = {
|
||||||
eventChannelWebHookURL: "",
|
|
||||||
chatChannelWebHookURL: "",
|
|
||||||
adminChannelWebHookURL: "",
|
|
||||||
sendEvents: true,
|
sendEvents: true,
|
||||||
sendChat: true,
|
sendChat: true,
|
||||||
sendAdminEvents: true,
|
sendAdmin: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (dbAssoc) {
|
if (dbAssoc) {
|
||||||
@@ -94,8 +92,7 @@ class ServerConfigData {
|
|||||||
money: dbAssoc["svr_newchar_money"],
|
money: dbAssoc["svr_newchar_money"],
|
||||||
bank: dbAssoc["svr_newchar_bank"],
|
bank: dbAssoc["svr_newchar_bank"],
|
||||||
skin: dbAssoc["svr_newchar_skin"],
|
skin: dbAssoc["svr_newchar_skin"],
|
||||||
},
|
};
|
||||||
this.settings = toInteger(dbAssoc["svr_settings"]);
|
|
||||||
|
|
||||||
this.connectCameraPosition = toVector3(dbAssoc["svr_connectcam_pos_x"], dbAssoc["svr_connectcam_pos_y"], dbAssoc["svr_connectcam_pos_z"]);
|
this.connectCameraPosition = toVector3(dbAssoc["svr_connectcam_pos_x"], dbAssoc["svr_connectcam_pos_y"], dbAssoc["svr_connectcam_pos_z"]);
|
||||||
this.connectCameraLookAt = toVector3(dbAssoc["svr_connectcam_lookat_x"], dbAssoc["svr_connectcam_lookat_y"], dbAssoc["svr_connectcam_lookat_z"]);
|
this.connectCameraLookAt = toVector3(dbAssoc["svr_connectcam_lookat_x"], dbAssoc["svr_connectcam_lookat_y"], dbAssoc["svr_connectcam_lookat_z"]);
|
||||||
@@ -104,24 +101,43 @@ class ServerConfigData {
|
|||||||
this.minute = toInteger(dbAssoc["svr_start_time_min"]);
|
this.minute = toInteger(dbAssoc["svr_start_time_min"]);
|
||||||
this.minuteDuration = toInteger(dbAssoc["svr_time_min_duration"]);
|
this.minuteDuration = toInteger(dbAssoc["svr_time_min_duration"]);
|
||||||
this.weather = toInteger(dbAssoc["svr_start_weather"]);
|
this.weather = toInteger(dbAssoc["svr_start_weather"]);
|
||||||
|
this.fallingSnow = intToBool(toInteger(dbAssoc["svr_snow_falling"]));
|
||||||
|
this.groundSnow = intToBool(toInteger(dbAssoc["svr_snow_ground"]));
|
||||||
|
this.useGUI = intToBool(toInteger(dbAssoc["svr_gui"]));
|
||||||
|
this.showLogo = intToBool(toInteger(dbAssoc["svr_logo"]));
|
||||||
|
this.createJobPickups = intToBool(toInteger(dbAssoc["svr_job_pickups"]));
|
||||||
|
this.createBusinessPickups = intToBool(toInteger(dbAssoc["svr_biz_pickups"]));
|
||||||
|
this.createHousePickups = intToBool(toInteger(dbAssoc["svr_house_pickups"]));
|
||||||
|
this.createJobBlips = intToBool(toInteger(dbAssoc["svr_job_blips"]));
|
||||||
|
this.createBusinessBlips = intToBool(toInteger(dbAssoc["svr_biz_blips"]));
|
||||||
|
this.createHouseBlips = intToBool(toInteger(dbAssoc["svr_house_blips"]));
|
||||||
|
this.createPlayerBlips = intToBool(toInteger(dbAssoc["svr_player_blips"]));
|
||||||
this.guiColourPrimary = [toInteger(dbAssoc["svr_gui_col1_r"]), toInteger(dbAssoc["svr_gui_col1_g"]), toInteger(dbAssoc["svr_gui_col1_b"])];
|
this.guiColourPrimary = [toInteger(dbAssoc["svr_gui_col1_r"]), toInteger(dbAssoc["svr_gui_col1_g"]), toInteger(dbAssoc["svr_gui_col1_b"])];
|
||||||
this.guiColourSecondary = [toInteger(dbAssoc["svr_gui_col2_r"]), toInteger(dbAssoc["svr_gui_col2_g"]), toInteger(dbAssoc["svr_gui_col2_b"])];
|
this.guiColourSecondary = [toInteger(dbAssoc["svr_gui_col2_r"]), toInteger(dbAssoc["svr_gui_col2_g"]), toInteger(dbAssoc["svr_gui_col2_b"])];
|
||||||
this.guiTextColourPrimary = [toInteger(dbAssoc["svr_gui_textcol1_r"]), toInteger(dbAssoc["svr_gui_textcol1_g"]), toInteger(dbAssoc["svr_gui_textcol1_b"])];
|
this.guiTextColourPrimary = [toInteger(dbAssoc["svr_gui_textcol1_r"]), toInteger(dbAssoc["svr_gui_textcol1_g"]), toInteger(dbAssoc["svr_gui_textcol1_b"])];
|
||||||
//this.guiTextColourSecondary = [toInteger(dbAssoc["svr_gui_textcol2_r"]), toInteger(dbAssoc["svr_gui_textcol2_g"]), toInteger(dbAssoc["svr_gui_textcol2_b"])];
|
//this.guiTextColourSecondary = [toInteger(dbAssoc["svr_gui_textcol2_r"]), toInteger(dbAssoc["svr_gui_textcol2_g"]), toInteger(dbAssoc["svr_gui_textcol2_b"])];
|
||||||
this.inflationMultiplier = toFloat(dbAssoc["svr_inflation_multiplier"]);
|
this.inflationMultiplier = toFloat(dbAssoc["svr_inflation_multiplier"]);
|
||||||
|
this.nameTagDistance = toFloat(dbAssoc["svr_nametag_distance"]);
|
||||||
this.discordBotToken = intToBool(dbAssoc["svr_discord_bot_token"]);
|
this.discordBotToken = intToBool(dbAssoc["svr_discord_bot_token"]);
|
||||||
this.introMusicURL = dbAssoc["svr_intro_music"];
|
this.introMusicURL = dbAssoc["svr_intro_music"];
|
||||||
this.realTimeZone = dbAssoc["svr_time_realtime_timezone"];
|
|
||||||
|
//this.useRealTime = intToBool(toInteger(dbAssoc["svr_real_time_enabled"]));
|
||||||
|
//this.realTimeZone = dbAssoc["svr_real_time_timezone"];
|
||||||
|
|
||||||
this.discord = {
|
this.discord = {
|
||||||
eventChannelWebHookURL: dbAssoc["svr_discord_event_webhook"],
|
sendEvents: intToBool(dbAssoc["svr_discord_send_events"]),
|
||||||
chatChannelWebHookURL: dbAssoc["svr_discord_chat_webhook"],
|
sendChat: intToBool(dbAssoc["svr_discord_send_chat"]),
|
||||||
adminChannelWebHookURL: dbAssoc["svr_discord_admin_webhook"],
|
sendAdmin: intToBool(dbAssoc["svr_discord_send_admin"]),
|
||||||
sendEvents: true,
|
|
||||||
sendChat: true,
|
|
||||||
sendAdminEvents: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.economy = {
|
||||||
|
inflationMultiplier: toFloat(dbAssoc["svr_inflation_multiplier"]),
|
||||||
|
incomeTaxRate: toFloat(dbAssoc["svr_income_tax_rate"]),
|
||||||
|
passiveIncome: toFloat(dbAssoc["svr_passive_income"]),
|
||||||
|
}
|
||||||
|
|
||||||
|
this.devServer = intToBool(toInteger(server.getCVar("vrr_devserver")));
|
||||||
|
this.testerOnly = intToBool(toInteger(server.getCVar("vrr_testeronly")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user