Use db for some svr config stuff

This commit is contained in:
Vortrex
2022-04-30 13:18:56 -05:00
parent 968b263ff4
commit 63f25f99bd

View File

@@ -57,6 +57,7 @@ class ServerConfigData {
this.inflationMultiplier = 1; this.inflationMultiplier = 1;
this.testerOnly = false; this.testerOnly = false;
this.devServer = false; this.devServer = false;
this.nameTagDistance = 50.0;
this.antiCheat = { this.antiCheat = {
enabled: false, enabled: false,
@@ -107,27 +108,22 @@ 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_start_snow_falling"])); this.fallingSnow = intToBool(toInteger(dbAssoc["svr_snow_falling"]));
//this.groundSnow = intToBool(toInteger(dbAssoc["svr_start_snow_ground"])); this.groundSnow = intToBool(toInteger(dbAssoc["svr_snow_ground"]));
//this.useGUI = intToBool(toInteger(dbAssoc["svr_gui_enabled"])); this.useGUI = intToBool(toInteger(dbAssoc["svr_gui"]));
//this.showLogo = intToBool(toInteger(dbAssoc["svr_logo_enabled"])); this.showLogo = intToBool(toInteger(dbAssoc["svr_logo"]));
//this.testerOnly = intToBool(toInteger(dbAssoc["svr_tester_only"])); 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.createJobPickups = intToBool(toInteger(dbAssoc["svr_job_pickups_enabled"])); this.createJobBlips = intToBool(toInteger(dbAssoc["svr_job_blips"]));
this.createBusinessPickups = intToBool(toInteger(dbAssoc["svr_biz_pickups_enabled"])); this.createBusinessBlips = intToBool(toInteger(dbAssoc["svr_biz_blips"]));
this.createHousePickups = intToBool(toInteger(dbAssoc["svr_house_pickups_enabled"])); this.createHouseBlips = intToBool(toInteger(dbAssoc["svr_house_blips"]));
this.createJobBlips = intToBool(toInteger(dbAssoc["svr_job_blips_enabled"]));
this.createBusinessBlips = intToBool(toInteger(dbAssoc["svr_biz_blips_enabled"]));
this.createHouseBlips = intToBool(toInteger(dbAssoc["svr_house_blips_enabled"]));
*/
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"];