diff --git a/SQL/paradise_schema.sql b/SQL/paradise_schema.sql index a447c7993ba..ead94c0ec9a 100644 --- a/SQL/paradise_schema.sql +++ b/SQL/paradise_schema.sql @@ -255,20 +255,15 @@ CREATE TABLE `player` ( `be_role` mediumtext, `default_slot` smallint(4) DEFAULT '1', `toggles` int(8) DEFAULT '383', + `toggles_2` int(8) DEFAULT '14', `sound` mediumint(8) DEFAULT '31', - `randomslot` tinyint(1) DEFAULT '0', `volume` smallint(4) DEFAULT '100', - `nanoui_fancy` smallint(4) DEFAULT '1', - `show_ghostitem_attack` smallint(4) DEFAULT '1', `lastchangelog` varchar(32) NOT NULL DEFAULT '0', - `windowflashing` smallint(4) DEFAULT '1', - `ghost_anonsay` tinyint(1) NOT NULL DEFAULT '0', `exp` mediumtext, `clientfps` smallint(4) DEFAULT '0', `atklog` smallint(4) DEFAULT '0', `fuid` bigint(20) NULL DEFAULT NULL, `fupdate` smallint(4) NULL DEFAULT '0', - `afk_watch` tinyint(1) NOT NULL DEFAULT '0', `parallax` tinyint(1) DEFAULT '8', PRIMARY KEY (`id`), UNIQUE KEY `ckey` (`ckey`) diff --git a/SQL/paradise_schema_prefixed.sql b/SQL/paradise_schema_prefixed.sql index 6096f0547e6..c8589a4c74c 100644 --- a/SQL/paradise_schema_prefixed.sql +++ b/SQL/paradise_schema_prefixed.sql @@ -254,20 +254,15 @@ CREATE TABLE `SS13_player` ( `be_role` mediumtext, `default_slot` smallint(4) DEFAULT '1', `toggles` int(8) DEFAULT '383', + `toggles_2` int(8) DEFAULT '14', `sound` mediumint(8) DEFAULT '31', - `randomslot` tinyint(1) DEFAULT '0', `volume` smallint(4) DEFAULT '100', - `nanoui_fancy` smallint(4) DEFAULT '1', - `show_ghostitem_attack` smallint(4) DEFAULT '1', `lastchangelog` varchar(32) NOT NULL DEFAULT '0', - `windowflashing` smallint(4) DEFAULT '1', - `ghost_anonsay` tinyint(1) NOT NULL DEFAULT '0', `exp` mediumtext, `clientfps` smallint(4) DEFAULT '0', `atklog` smallint(4) DEFAULT '0', `fuid` bigint(20) NULL DEFAULT NULL, `fupdate` smallint(4) NULL DEFAULT '0', - `afk_watch` tinyint(1) NOT NULL DEFAULT '0', `parallax` tinyint(1) DEFAULT '8', PRIMARY KEY (`id`), UNIQUE KEY `ckey` (`ckey`) diff --git a/SQL/updates/12-13.sql b/SQL/updates/12-13.sql new file mode 100644 index 00000000000..efa808d3cc7 --- /dev/null +++ b/SQL/updates/12-13.sql @@ -0,0 +1,22 @@ +#Updating the SQL from version 12 to version 13. -AffectedArc07 +#Modifying the player table to remove old columns and add a new bitflag column for toggles +#Includes conversion from old to new + +ALTER TABLE `player` ADD COLUMN `toggles_2` INT NULL DEFAULT '0' AFTER `toggles`; + +# The following lines will update the new toggles_2 column based on existing data +UPDATE `player` SET `toggles_2` = `toggles_2` + 1 WHERE `randomslot` = 1; +UPDATE `player` SET `toggles_2` = `toggles_2` + 2 WHERE `nanoui_fancy` = 1; +UPDATE `player` SET `toggles_2` = `toggles_2` + 4 WHERE `show_ghostitem_attack` = 1; +UPDATE `player` SET `toggles_2` = `toggles_2` + 8 WHERE `windowflashing` = 1; +UPDATE `player` SET `toggles_2` = `toggles_2` + 16 WHERE `ghost_anonsay` = 1; +UPDATE `player` SET `toggles_2` = `toggles_2` + 32 WHERE `afk_watch` = 1; + +# Remove the old columns +ALTER TABLE `player` + DROP COLUMN `randomslot`, + DROP COLUMN `nanoui_fancy`, + DROP COLUMN `show_ghostitem_attack`, + DROP COLUMN `windowflashing`, + DROP COLUMN `ghost_anonsay`, + DROP COLUMN `afk_watch`; diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 5852a5a6a72..e04a95bcae2 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -363,7 +363,7 @@ #define INVESTIGATE_BOMB "bombs" // The SQL version required by this version of the code -#define SQL_VERSION 12 +#define SQL_VERSION 13 // Vending machine stuff #define CAT_NORMAL 1 diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index eb5fad0ff27..7d8528d2da3 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -12,34 +12,57 @@ #define SOUND_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|SOUND_HEARTBEAT|SOUND_BUZZ|SOUND_INSTRUMENTS|SOUND_MENTORHELP|SOUND_DISCO|SOUND_AI_VOICE) -#define CHAT_OOC 1 -#define CHAT_DEAD 2 -#define CHAT_GHOSTEARS 4 -#define CHAT_GHOSTSIGHT 8 -#define CHAT_PRAYER 16 -#define CHAT_RADIO 32 -#define AZERTY 64 -#define CHAT_DEBUGLOGS 128 -#define CHAT_LOOC 256 -#define CHAT_GHOSTRADIO 512 -#define SHOW_TYPING 1024 -#define DISABLE_SCOREBOARD 2048 -#define DISABLE_KARMA_REMINDER 4096 -#define MEMBER_PUBLIC 8192 -#define CHAT_NO_ADMINLOGS 16384 -#define DONATOR_PUBLIC 32768 -#define CHAT_NO_TICKETLOGS 65536 -#define UI_DARKMODE 131072 -#define DISABLE_KARMA 262144 -#define CHAT_NO_MENTORTICKETLOGS 524288 -#define TYPING_ONCE 1048576 -#define AMBIENT_OCCLUSION 2097152 -#define CHAT_GHOSTPDA 4194304 -#define NUMPAD_TARGET 8388608 -#define TOGGLES_TOTAL 16777215 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined. +#define PREFTOGGLE_CHAT_OOC 1 +#define PREFTOGGLE_CHAT_DEAD 2 +#define PREFTOGGLE_CHAT_GHOSTEARS 4 +#define PREFTOGGLE_CHAT_GHOSTSIGHT 8 +#define PREFTOGGLE_CHAT_PRAYER 16 +#define PREFTOGGLE_CHAT_RADIO 32 +#define PREFTOGGLE_AZERTY 64 +#define PREFTOGGLE_CHAT_DEBUGLOGS 128 +#define PREFTOGGLE_CHAT_LOOC 256 +#define PREFTOGGLE_CHAT_GHOSTRADIO 512 +#define PREFTOGGLE_SHOW_TYPING 1024 +#define PREFTOGGLE_DISABLE_SCOREBOARD 2048 +#define PREFTOGGLE_DISABLE_KARMA_REMINDER 4096 +#define PREFTOGGLE_MEMBER_PUBLIC 8192 +#define PREFTOGGLE_CHAT_NO_ADMINLOGS 16384 +#define PREFTOGGLE_DONATOR_PUBLIC 32768 +#define PREFTOGGLE_CHAT_NO_TICKETLOGS 65536 +#define PREFTOGGLE_UI_DARKMODE 131072 +#define PREFTOGGLE_DISABLE_KARMA 262144 +#define PREFTOGGLE_CHAT_NO_MENTORTICKETLOGS 524288 +#define PREFTOGGLE_TYPING_ONCE 1048576 +#define PREFTOGGLE_AMBIENT_OCCLUSION 2097152 +#define PREFTOGGLE_CHAT_GHOSTPDA 4194304 +#define PREFTOGGLE_NUMPAD_TARGET 8388608 + +#define TOGGLES_TOTAL 16777215 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined. + +#define TOGGLES_DEFAULT (PREFTOGGLE_CHAT_OOC|PREFTOGGLE_CHAT_DEAD|PREFTOGGLE_CHAT_GHOSTEARS|PREFTOGGLE_CHAT_GHOSTSIGHT|PREFTOGGLE_CHAT_PRAYER|PREFTOGGLE_CHAT_RADIO|PREFTOGGLE_CHAT_LOOC|PREFTOGGLE_MEMBER_PUBLIC|PREFTOGGLE_DONATOR_PUBLIC|PREFTOGGLE_AMBIENT_OCCLUSION|PREFTOGGLE_CHAT_GHOSTPDA|PREFTOGGLE_NUMPAD_TARGET) + +// toggles_2 variables. These MUST be prefixed with PREFTOGGLE_2 +#define PREFTOGGLE_2_RANDOMSLOT 1 +#define PREFTOGGLE_2_FANCYUI 2 +#define PREFTOGGLE_2_ITEMATTACK 4 +#define PREFTOGGLE_2_WINDOWFLASHING 8 +#define PREFTOGGLE_2_ANONDCHAT 16 +#define PREFTOGGLE_2_AFKWATCH 32 + +#define TOGGLES_2_TOTAL 63 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined. + +#define TOGGLES_2_DEFAULT (PREFTOGGLE_2_FANCYUI|PREFTOGGLE_2_ITEMATTACK|PREFTOGGLE_2_WINDOWFLASHING) + +// Sanity checks +#if TOGGLES_TOTAL > 16777215 +#error toggles bitflag over 16777215. Please use toggles_2. +#endif + +#if TOGGLES_2_TOTAL > 16777215 +#error toggles_2 bitflag over 16777215. Please make an issue report and postpone the feature you are working on. +#endif -#define TOGGLES_DEFAULT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_LOOC|MEMBER_PUBLIC|DONATOR_PUBLIC|AMBIENT_OCCLUSION|CHAT_GHOSTPDA|NUMPAD_TARGET) // Admin attack logs filter system, see /proc/add_attack_logs and /proc/msg_admin_attack #define ATKLOG_ALL 0 diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index a3154834fe4..32fe8b70b2d 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -39,7 +39,7 @@ GLOBAL_VAR_INIT(log_end, (world.system_type == UNIX ? ascii2text(13) : "")) WRITE_LOG(GLOB.world_game_log, "DEBUG: [text][GLOB.log_end]") for(var/client/C in GLOB.admins) - if(check_rights(R_DEBUG, 0, C.mob) && (C.prefs.toggles & CHAT_DEBUGLOGS)) + if(check_rights(R_DEBUG, 0, C.mob) && (C.prefs.toggles & PREFTOGGLE_CHAT_DEBUGLOGS)) to_chat(C, "DEBUG: [text]") /proc/log_game(text) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 8fb1c88feef..150de317bb1 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -229,7 +229,7 @@ var/turf/ear = get_turf(M) if(ear) // Ghostship is magic: Ghosts can hear radio chatter from anywhere - if(speaker_coverage[ear] || (istype(M, /mob/dead/observer) && M.get_preference(CHAT_GHOSTRADIO))) + if(speaker_coverage[ear] || (istype(M, /mob/dead/observer) && M.get_preference(PREFTOGGLE_CHAT_GHOSTRADIO))) . |= M // Since we're already looping through mobs, why bother using |= ? This only slows things down. return . @@ -469,7 +469,7 @@ var/mob/M = C if(M.client) C = M.client - if(!C || !C.prefs.windowflashing) + if(!C || !C.prefs.toggles2 & PREFTOGGLE_2_WINDOWFLASHING) return winset(C, "mainwindow", "flash=5") diff --git a/code/_onclick/hud/plane_master.dm b/code/_onclick/hud/plane_master.dm index d8a6e3e9e87..e5cd410a27b 100644 --- a/code/_onclick/hud/plane_master.dm +++ b/code/_onclick/hud/plane_master.dm @@ -46,7 +46,7 @@ blend_mode = BLEND_OVERLAY /obj/screen/plane_master/game_world/backdrop(mob/mymob) - if(istype(mymob) && mymob.client && mymob.client.prefs && (mymob.client.prefs.toggles & AMBIENT_OCCLUSION)) + if(istype(mymob) && mymob.client && mymob.client.prefs && (mymob.client.prefs.toggles & PREFTOGGLE_AMBIENT_OCCLUSION)) add_filter(AMBIENT_OCCLUSION_FILTER_KEY, FILTER_AMBIENT_OCCLUSION) /obj/screen/plane_master/lighting diff --git a/code/controllers/subsystem/afk.dm b/code/controllers/subsystem/afk.dm index 25ccda3349c..3d82762cc42 100644 --- a/code/controllers/subsystem/afk.dm +++ b/code/controllers/subsystem/afk.dm @@ -29,7 +29,7 @@ SUBSYSTEM_DEF(afk) var/turf/T // Only players and players with the AFK watch enabled // No dead, unconcious, restrained, people without jobs or people on other Z levels than the station - if(!H.client || !H.client.prefs.afk_watch || !H.mind || \ + if(!H.client || !H.client.prefs.toggles2 & PREFTOGGLE_2_AFKWATCH || !H.mind || \ H.stat || H.restrained() || !H.job || !is_station_level((T = get_turf(H)).z)) // Assign the turf as last. Small optimization if(afk_players[H.ckey]) toRemove += H.ckey diff --git a/code/controllers/subsystem/changelog.dm b/code/controllers/subsystem/changelog.dm index 98188599abd..eef8ee6da62 100644 --- a/code/controllers/subsystem/changelog.dm +++ b/code/controllers/subsystem/changelog.dm @@ -57,7 +57,7 @@ SUBSYSTEM_DEF(changelog) return // Only return here, we dont have to worry about a queue list because this will be called from ShowChangelog() // Technically this is only for the date but we can also do the UI button at the same time var/datum/preferences/P = GLOB.preferences_datums[C.ckey] - if(P.toggles & UI_DARKMODE) + if(P.toggles & PREFTOGGLE_UI_DARKMODE) winset(C, "rpane.changelog", "background-color=#40628a;font-color=#ffffff;font-style=none") else winset(C, "rpane.changelog", "background-color=none;font-style=none") @@ -74,7 +74,7 @@ SUBSYSTEM_DEF(changelog) /datum/controller/subsystem/changelog/proc/UpdatePlayerChangelogButton(client/C) // If SQL aint even enabled, just set the button to default style if(!GLOB.dbcon.IsConnected()) - if(C.prefs.toggles & UI_DARKMODE) + if(C.prefs.toggles & PREFTOGGLE_UI_DARKMODE) winset(C, "rpane.changelog", "background-color=#40628a;text-color=#FFFFFF") else winset(C, "rpane.changelog", "background-color=none;text-color=#000000") @@ -83,7 +83,7 @@ SUBSYSTEM_DEF(changelog) // If SQL is enabled but we aint ready, queue them up, and use the default style if(!ss_ready) startup_clients_button |= C - if(C.prefs.toggles & UI_DARKMODE) + if(C.prefs.toggles & PREFTOGGLE_UI_DARKMODE) winset(C, "rpane.changelog", "background-color=#40628a;text-color=#FFFFFF") else winset(C, "rpane.changelog", "background-color=none;text-color=#000000") @@ -96,7 +96,7 @@ SUBSYSTEM_DEF(changelog) winset(C, "rpane.changelog", "background-color=#bb7700;text-color=#FFFFFF;font-style=bold") to_chat(C, "Changelog has changed since your last visit.") else - if(C.prefs.toggles & UI_DARKMODE) + if(C.prefs.toggles & PREFTOGGLE_UI_DARKMODE) winset(C, "rpane.changelog", "background-color=#40628a;text-color=#FFFFFF") else winset(C, "rpane.changelog", "background-color=none;text-color=#000000") diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm index 729c4dbe67b..0c223dc16df 100644 --- a/code/controllers/subsystem/jobs.dm +++ b/code/controllers/subsystem/jobs.dm @@ -285,7 +285,7 @@ SUBSYSTEM_DEF(jobs) for(var/mob/new_player/player in GLOB.player_list) if(player.ready && player.has_valid_preferences() && player.mind && !player.mind.assigned_role) unassigned += player - if(player.client.prefs.randomslot) + if(player.client.prefs.toggles2 & PREFTOGGLE_2_RANDOMSLOT) player.client.prefs.load_random_character_slot(player.client) Debug("DO, Len: [unassigned.len]") diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index d463c85eaf6..a3b6dff7905 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -561,7 +561,7 @@ // Who can see the attack? var/list/viewing = list() for(var/mob/M in viewers(A)) - if(M.client && M.client.prefs.show_ghostitem_attack) + if(M.client && M.client.prefs.toggles2 & PREFTOGGLE_2_ITEMATTACK) viewing |= M.client flick_overlay(I, viewing, 5) // 5 ticks/half a second diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm index 2e370db5f7a..fb10923e657 100644 --- a/code/game/gamemodes/scoreboard.dm +++ b/code/game/gamemodes/scoreboard.dm @@ -157,7 +157,7 @@ to_chat(world, "The crew's final score is:") to_chat(world, "[GLOB.score_crewscore]") for(var/mob/E in GLOB.player_list) - if(E.client && !E.get_preference(DISABLE_SCOREBOARD)) + if(E.client && !E.get_preference(PREFTOGGLE_DISABLE_SCOREBOARD)) E.scorestats() // A recursive function to properly determine the wealthiest escapee diff --git a/code/game/machinery/tcomms/_base.dm b/code/game/machinery/tcomms/_base.dm index 892392a8c54..fc9a26771c2 100644 --- a/code/game/machinery/tcomms/_base.dm +++ b/code/game/machinery/tcomms/_base.dm @@ -332,7 +332,7 @@ GLOBAL_LIST_EMPTY(tcomms_machines) /* --- Loop through the receivers and categorize them --- */ - if(is_admin(R) && !R.get_preference(CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios. + if(is_admin(R) && !R.get_preference(PREFTOGGLE_CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios. continue if(isnewplayer(R)) // we don't want new players to hear messages. rare but generates runtimes. diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 04ee5901054..264ee580b87 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -6,7 +6,7 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00") //Checks if the client already has a text input open /client/proc/checkTyping() - return (prefs.toggles & TYPING_ONCE && typing) + return (prefs.toggles & PREFTOGGLE_TYPING_ONCE && typing) /client/verb/ooc(msg = "" as text) set name = "OOC" @@ -36,7 +36,7 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00") if(!msg) return - if(!(prefs.toggles & CHAT_OOC)) + if(!(prefs.toggles & PREFTOGGLE_CHAT_OOC)) to_chat(src, "You have OOC muted.") return @@ -68,20 +68,20 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00") if(prefs.unlock_content) if(display_colour == GLOB.normal_ooc_colour) - if((prefs.toggles & MEMBER_PUBLIC)) + if((prefs.toggles & PREFTOGGLE_MEMBER_PUBLIC)) display_colour = GLOB.member_ooc_colour for(var/client/C in GLOB.clients) - if(C.prefs.toggles & CHAT_OOC) + if(C.prefs.toggles & PREFTOGGLE_CHAT_OOC) var/display_name = key if(prefs.unlock_content) - if(prefs.toggles & MEMBER_PUBLIC) + if(prefs.toggles & PREFTOGGLE_MEMBER_PUBLIC) var/icon/byond = icon('icons/member_content.dmi', "blag") display_name = "[bicon(byond)][display_name]" if(donator_level > 0) - if((prefs.toggles & DONATOR_PUBLIC)) + if((prefs.toggles & PREFTOGGLE_DONATOR_PUBLIC)) var/icon/donator = icon('icons/ooc_tag_16x.dmi', "donator") display_name = "[bicon(donator)][display_name]" @@ -192,7 +192,7 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00") if(!msg) return - if(!(prefs.toggles & CHAT_LOOC)) + if(!(prefs.toggles & PREFTOGGLE_CHAT_LOOC)) to_chat(src, "You have LOOC muted.") return @@ -217,7 +217,7 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00") display_name = mob.name for(var/client/target in GLOB.clients) - if(target.prefs.toggles & CHAT_LOOC) + if(target.prefs.toggles & PREFTOGGLE_CHAT_LOOC) var/prefix = "" var/admin_stuff = "" var/send = 0 diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 5b9d219d16c..2c029dbe5b5 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -6,7 +6,7 @@ GLOBAL_VAR_INIT(nologevent, 0) msg = "ADMIN LOG: [msg]" for(var/client/C in GLOB.admins) if(R_ADMIN & C.holder.rights) - if(C.prefs && !(C.prefs.toggles & CHAT_NO_ADMINLOGS)) + if(C.prefs && !(C.prefs.toggles & PREFTOGGLE_CHAT_NO_ADMINLOGS)) to_chat(C, msg) /proc/msg_admin_attack(var/text, var/loglevel) @@ -30,7 +30,7 @@ GLOBAL_VAR_INIT(nologevent, 0) /proc/message_adminTicket(msg, important = FALSE) for(var/client/C in GLOB.admins) if(R_ADMIN & C.holder.rights) - if(important || (C.prefs && !(C.prefs.toggles & CHAT_NO_TICKETLOGS))) + if(important || (C.prefs && !(C.prefs.toggles & PREFTOGGLE_CHAT_NO_TICKETLOGS))) to_chat(C, msg) if(important) if(C.prefs?.sound & SOUND_ADMINHELP) @@ -47,7 +47,7 @@ GLOBAL_VAR_INIT(nologevent, 0) /proc/message_mentorTicket(msg, important = FALSE) for(var/client/C in GLOB.admins) if(check_rights(R_ADMIN | R_MENTOR | R_MOD, 0, C.mob)) - if(important || (C.prefs && !(C.prefs.toggles & CHAT_NO_MENTORTICKETLOGS))) + if(important || (C.prefs && !(C.prefs.toggles & PREFTOGGLE_CHAT_NO_TICKETLOGS))) to_chat(C, msg) if(important) if(C.prefs?.sound & SOUND_MENTORHELP) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index ef6f039df77..10ef3e2e3a7 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -888,9 +888,9 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( if(!check_rights(R_ADMIN)) return - prefs.toggles ^= CHAT_NO_ADMINLOGS + prefs.toggles ^= PREFTOGGLE_CHAT_NO_ADMINLOGS prefs.save_preferences(src) - if(prefs.toggles & CHAT_NO_ADMINLOGS) + if(prefs.toggles & PREFTOGGLE_CHAT_NO_ADMINLOGS) to_chat(usr, "You now won't get admin log messages.") else to_chat(usr, "You now will get admin log messages.") @@ -902,9 +902,9 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( if(!check_rights(R_MENTOR|R_ADMIN)) return - prefs.toggles ^= CHAT_NO_MENTORTICKETLOGS + prefs.toggles ^= PREFTOGGLE_CHAT_NO_MENTORTICKETLOGS prefs.save_preferences(src) - if(prefs.toggles & CHAT_NO_MENTORTICKETLOGS) + if(prefs.toggles & PREFTOGGLE_CHAT_NO_MENTORTICKETLOGS) to_chat(usr, "You now won't get mentor ticket messages.") else to_chat(usr, "You now will get mentor ticket messages.") @@ -916,9 +916,9 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( if(!check_rights(R_ADMIN)) return - prefs.toggles ^= CHAT_NO_TICKETLOGS + prefs.toggles ^= PREFTOGGLE_CHAT_NO_TICKETLOGS prefs.save_preferences(src) - if(prefs.toggles & CHAT_NO_TICKETLOGS) + if(prefs.toggles & PREFTOGGLE_CHAT_NO_TICKETLOGS) to_chat(usr, "You now won't get admin ticket messages.") else to_chat(usr, "You now will get admin ticket messages.") @@ -941,9 +941,9 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( if(!check_rights(R_DEBUG)) return - prefs.toggles ^= CHAT_DEBUGLOGS + prefs.toggles ^= PREFTOGGLE_CHAT_DEBUGLOGS prefs.save_preferences(src) - if(prefs.toggles & CHAT_DEBUGLOGS) + if(prefs.toggles & PREFTOGGLE_CHAT_DEBUGLOGS) to_chat(usr, "You now will get debug log messages") else to_chat(usr, "You now won't get debug log messages") diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index aae13ad882d..fc816b4e5a9 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -2,18 +2,18 @@ set category = "Admin" set name = "Dsay" //Gave this shit a shorter name so you only have to time out "dsay" rather than "dead say" to use it --NeoFite set hidden = 1 - + if(!check_rights(R_ADMIN|R_MOD)) return - + if(!src.mob) return - + if(prefs.muted & MUTE_DEADCHAT) to_chat(src, "You cannot send DSAY messages (muted).") return - if(!(prefs.toggles & CHAT_DEAD)) + if(!(prefs.toggles & PREFTOGGLE_CHAT_DEAD)) to_chat(src, "You have deadchat muted.") return diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index ddf24587212..3f0ffc86498 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -398,14 +398,14 @@ check_ip_intel() send_resources() - if(prefs.toggles & UI_DARKMODE) // activates dark mode if its flagged. -AA07 + if(prefs.toggles & PREFTOGGLE_UI_DARKMODE) // activates dark mode if its flagged. -AA07 activate_darkmode() else // activate_darkmode() calls the CL update button proc, so we dont want it double called SSchangelog.UpdatePlayerChangelogButton(src) - if(prefs.toggles & DISABLE_KARMA) // activates if karma is disabled + if(prefs.toggles & PREFTOGGLE_DISABLE_KARMA) // activates if karma is disabled if(establish_db_connection()) to_chat(src,"You have disabled karma gains.") // reminds those who have it disabled else diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index e0a3349f46d..5c70fc9f87b 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -83,20 +83,14 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts var/ooccolor = "#b82e00" var/list/be_special = list() //Special role selection var/UI_style = "Midnight" - var/nanoui_fancy = TRUE var/toggles = TOGGLES_DEFAULT + var/toggles2 = TOGGLES_2_DEFAULT // Created because 1 column has a bitflag limit of 24 (BYOND limitation not MySQL) var/sound = SOUND_DEFAULT - var/show_ghostitem_attack = TRUE var/UI_style_color = "#ffffff" var/UI_style_alpha = 255 - var/windowflashing = TRUE var/clientfps = 0 var/atklog = ATKLOG_ALL var/fuid // forum userid - var/afk_watch = FALSE // If the player wants to be kept track of by the AFK system - - //ghostly preferences - var/ghost_anonsay = 0 //character preferences var/real_name //our character's name @@ -190,9 +184,6 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts var/slot_name = "" var/saved = FALSE // Indicates whether the character comes from the database or not - // Whether or not to use randomized character slots - var/randomslot = 0 - // jukebox volume var/volume = 100 @@ -447,24 +438,24 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts dat += "

General Settings

" if(user.client.holder) dat += "Adminhelp sound: [(sound & SOUND_ADMINHELP)?"On":"Off"]
" - dat += "AFK Cryoing: [(afk_watch) ? "Yes" : "No"]
" - dat += "Ambient Occlusion: [toggles & AMBIENT_OCCLUSION ? "Enabled" : "Disabled"]
" - dat += "Attack Animations: [(show_ghostitem_attack) ? "Yes" : "No"]
" + dat += "AFK Cryoing: [(toggles2 & PREFTOGGLE_2_AFKWATCH) ? "Yes" : "No"]
" + dat += "Ambient Occlusion: [toggles & PREFTOGGLE_AMBIENT_OCCLUSION ? "Enabled" : "Disabled"]
" + dat += "Attack Animations: [(toggles2 & PREFTOGGLE_2_ITEMATTACK) ? "Yes" : "No"]
" if(unlock_content) - dat += "BYOND Membership Publicity: [(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]
" + dat += "BYOND Membership Publicity: [(toggles & PREFTOGGLE_MEMBER_PUBLIC) ? "Public" : "Hidden"]
" dat += "Custom UI settings:
" dat += " - Alpha (transparency): [UI_style_alpha]
" dat += " - Color: [UI_style_color]    
" dat += " - UI Style: [UI_style]
" - dat += "Deadchat Anonymity: [ghost_anonsay ? "Anonymous" : "Not Anonymous"]
" + dat += "Deadchat Anonymity: [toggles2 & PREFTOGGLE_2_ANONDCHAT ? "Anonymous" : "Not Anonymous"]
" if(user.client.donator_level > 0) - dat += "Donator Publicity: [(toggles & DONATOR_PUBLIC) ? "Public" : "Hidden"]
" - dat += "Fancy NanoUI: [(nanoui_fancy) ? "Yes" : "No"]
" + dat += "Donator Publicity: [(toggles & PREFTOGGLE_DONATOR_PUBLIC) ? "Public" : "Hidden"]
" + dat += "Fancy NanoUI: [(toggles2 & PREFTOGGLE_2_FANCYUI) ? "Yes" : "No"]
" dat += "FPS: [clientfps]
" - dat += "Ghost Ears: [(toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
" - dat += "Ghost Radio: [(toggles & CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]
" - dat += "Ghost Sight: [(toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]
" - dat += "Ghost PDA: [(toggles & CHAT_GHOSTPDA) ? "All PDA Messages" : "No PDA Messages"]
" + dat += "Ghost Ears: [(toggles & PREFTOGGLE_CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
" + dat += "Ghost Radio: [(toggles & PREFTOGGLE_CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]
" + dat += "Ghost Sight: [(toggles & PREFTOGGLE_CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]
" + dat += "Ghost PDA: [(toggles & PREFTOGGLE_CHAT_GHOSTPDA) ? "All PDA Messages" : "No PDA Messages"]
" if(check_rights(R_ADMIN,0)) dat += "OOC Color:     Change
" if(config.allow_Metadata) @@ -484,8 +475,8 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts dat += "
" dat += "Play Admin MIDIs: [(sound & SOUND_MIDI) ? "Yes" : "No"]
" dat += "Play Lobby Music: [(sound & SOUND_LOBBY) ? "Yes" : "No"]
" - dat += "Randomized Character Slot: [randomslot ? "Yes" : "No"]
" - dat += "Window Flashing: [(windowflashing) ? "Yes" : "No"]
" + dat += "Randomized Character Slot: [toggles2 & PREFTOGGLE_2_RANDOMSLOT ? "Yes" : "No"]
" + dat += "Window Flashing: [(toggles2 & PREFTOGGLE_2_WINDOWFLASHING) ? "Yes" : "No"]
" // RIGHT SIDE OF THE PAGE dat += "" dat += "

Special Role Settings

" @@ -1952,11 +1943,11 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts switch(href_list["preference"]) if("publicity") if(unlock_content) - toggles ^= MEMBER_PUBLIC + toggles ^= PREFTOGGLE_MEMBER_PUBLIC if("donor_public") if(user.client.donator_level > 0) - toggles ^= DONATOR_PUBLIC + toggles ^= PREFTOGGLE_DONATOR_PUBLIC if("gender") if(!S.has_gender) @@ -1997,21 +1988,21 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts H.remake_hud() if("nanoui") - nanoui_fancy = !nanoui_fancy + toggles2 ^= PREFTOGGLE_2_FANCYUI if("ghost_att_anim") - show_ghostitem_attack = !show_ghostitem_attack + toggles2 ^= PREFTOGGLE_2_ITEMATTACK if("winflash") - windowflashing = !windowflashing + toggles2 ^= PREFTOGGLE_2_WINDOWFLASHING if("afk_watch") - if(!afk_watch) + if(!(toggles2 & PREFTOGGLE_2_AFKWATCH)) to_chat(user, "You will now get put into cryo dorms after [config.auto_cryo_afk] minutes. \ Then after [config.auto_despawn_afk] minutes you will be fully despawned. You will receive a visual and auditory warning before you will be put into cryodorms.") else to_chat(user, "Automatic cryoing turned off.") - afk_watch = !afk_watch + toggles2 ^= PREFTOGGLE_2_AFKWATCH if("UIcolor") var/UI_style_color_new = input(user, "Choose your UI color, dark colors are not recommended!", UI_style_color) as color|null @@ -2040,7 +2031,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts be_random_name = !be_random_name if("randomslot") - randomslot = !randomslot + toggles2 ^= PREFTOGGLE_2_RANDOMSLOT if(isnewplayer(usr)) var/mob/new_player/N = usr N.new_player_panel_proc() @@ -2056,22 +2047,22 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts user.stop_sound_channel(CHANNEL_LOBBYMUSIC) if("ghost_ears") - toggles ^= CHAT_GHOSTEARS + toggles ^= PREFTOGGLE_CHAT_GHOSTEARS if("ghost_sight") - toggles ^= CHAT_GHOSTSIGHT + toggles ^= PREFTOGGLE_CHAT_GHOSTSIGHT if("ghost_radio") - toggles ^= CHAT_GHOSTRADIO + toggles ^= PREFTOGGLE_CHAT_GHOSTRADIO if("ghost_radio") - toggles ^= CHAT_GHOSTRADIO + toggles ^= PREFTOGGLE_CHAT_GHOSTRADIO if("ghost_pda") - toggles ^= CHAT_GHOSTPDA + toggles ^= PREFTOGGLE_CHAT_GHOSTPDA if("ghost_anonsay") - ghost_anonsay = !ghost_anonsay + toggles2 ^= PREFTOGGLE_2_ANONDCHAT if("save") save_preferences(user) @@ -2110,11 +2101,11 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts if("ambientocclusion") - toggles ^= AMBIENT_OCCLUSION + toggles ^= PREFTOGGLE_AMBIENT_OCCLUSION if(parent && parent.screen && parent.screen.len) var/obj/screen/plane_master/game_world/PM = locate(/obj/screen/plane_master/game_world) in parent.screen PM.remove_filter(AMBIENT_OCCLUSION_FILTER_KEY) - if(toggles & AMBIENT_OCCLUSION) + if(toggles & PREFTOGGLE_AMBIENT_OCCLUSION) PM.add_filter(AMBIENT_OCCLUSION_FILTER_KEY, FILTER_AMBIENT_OCCLUSION) if("parallax") diff --git a/code/modules/client/preference/preferences_mysql.dm b/code/modules/client/preference/preferences_mysql.dm index e889ec5a181..04f8f700bbd 100644 --- a/code/modules/client/preference/preferences_mysql.dm +++ b/code/modules/client/preference/preferences_mysql.dm @@ -8,19 +8,14 @@ be_role, default_slot, toggles, + toggles_2, sound, - randomslot, volume, - nanoui_fancy, - show_ghostitem_attack, lastchangelog, - windowflashing, - ghost_anonsay, exp, clientfps, atklog, fuid, - afk_watch, parallax FROM [format_table_name("player")] WHERE ckey='[C.ckey]'"} @@ -42,41 +37,31 @@ be_special = params2list(query.item[5]) default_slot = text2num(query.item[6]) toggles = text2num(query.item[7]) - sound = text2num(query.item[8]) - randomslot = text2num(query.item[9]) + toggles2 = text2num(query.item[8]) + sound = text2num(query.item[9]) volume = text2num(query.item[10]) - nanoui_fancy = text2num(query.item[11]) - show_ghostitem_attack = text2num(query.item[12]) - lastchangelog = query.item[13] - windowflashing = text2num(query.item[14]) - ghost_anonsay = text2num(query.item[15]) - exp = query.item[16] - clientfps = text2num(query.item[17]) - atklog = text2num(query.item[18]) - fuid = text2num(query.item[19]) - afk_watch = text2num(query.item[20]) - parallax = text2num(query.item[21]) + lastchangelog = query.item[11] + exp = query.item[12] + clientfps = text2num(query.item[13]) + atklog = text2num(query.item[14]) + fuid = text2num(query.item[15]) + parallax = text2num(query.item[16]) //Sanitize ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor)) UI_style = sanitize_inlist(UI_style, list("White", "Midnight"), initial(UI_style)) default_slot = sanitize_integer(default_slot, 1, max_save_slots, initial(default_slot)) toggles = sanitize_integer(toggles, 0, TOGGLES_TOTAL, initial(toggles)) + toggles2 = sanitize_integer(toggles2, 0, TOGGLES_2_TOTAL, initial(toggles)) sound = sanitize_integer(sound, 0, 65535, initial(sound)) UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color)) UI_style_alpha = sanitize_integer(UI_style_alpha, 0, 255, initial(UI_style_alpha)) - randomslot = sanitize_integer(randomslot, 0, 1, initial(randomslot)) volume = sanitize_integer(volume, 0, 100, initial(volume)) - nanoui_fancy = sanitize_integer(nanoui_fancy, 0, 1, initial(nanoui_fancy)) - show_ghostitem_attack = sanitize_integer(show_ghostitem_attack, 0, 1, initial(show_ghostitem_attack)) lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog)) - windowflashing = sanitize_integer(windowflashing, 0, 1, initial(windowflashing)) - ghost_anonsay = sanitize_integer(ghost_anonsay, 0, 1, initial(ghost_anonsay)) exp = sanitize_text(exp, initial(exp)) clientfps = sanitize_integer(clientfps, 0, 1000, initial(clientfps)) atklog = sanitize_integer(atklog, 0, 100, initial(atklog)) fuid = sanitize_integer(fuid, 0, 10000000, initial(fuid)) - afk_watch = sanitize_integer(afk_watch, 0, 1, initial(afk_watch)) parallax = sanitize_integer(parallax, 0, 16, initial(parallax)) return 1 @@ -97,18 +82,13 @@ be_role='[sanitizeSQL(list2params(be_special))]', default_slot='[default_slot]', toggles='[num2text(toggles, CEILING(log(10, (TOGGLES_TOTAL)), 1))]', + toggles_2='[num2text(toggles2, CEILING(log(10, (TOGGLES_2_TOTAL)), 1))]', atklog='[atklog]', sound='[sound]', - randomslot='[randomslot]', volume='[volume]', - nanoui_fancy='[nanoui_fancy]', - show_ghostitem_attack='[show_ghostitem_attack]', lastchangelog='[lastchangelog]', - windowflashing='[windowflashing]', - ghost_anonsay='[ghost_anonsay]', clientfps='[clientfps]', atklog='[atklog]', - afk_watch='[afk_watch]', parallax='[parallax]' WHERE ckey='[C.ckey]'"} ) diff --git a/code/modules/client/preference/preferences_toggles.dm b/code/modules/client/preference/preferences_toggles.dm index 0f4317e3ce2..d14fbe84b46 100644 --- a/code/modules/client/preference/preferences_toggles.dm +++ b/code/modules/client/preference/preferences_toggles.dm @@ -3,8 +3,8 @@ set name = "Show/Hide GhostEars" set category = "Preferences" set desc = ".Toggle Between seeing all mob speech, and only speech of nearby mobs" - prefs.toggles ^= CHAT_GHOSTEARS - to_chat(src, "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTEARS) ? "see all speech in the world" : "only see speech from nearby mobs"].") + prefs.toggles ^= PREFTOGGLE_CHAT_GHOSTEARS + to_chat(src, "As a ghost, you will now [(prefs.toggles & PREFTOGGLE_CHAT_GHOSTEARS) ? "see all speech in the world" : "only see speech from nearby mobs"].") prefs.save_preferences(src) feedback_add_details("admin_verb","TGE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -12,8 +12,8 @@ set name = "Show/Hide GhostSight" set category = "Preferences" set desc = ".Toggle Between seeing all mob emotes, and only emotes of nearby mobs" - prefs.toggles ^= CHAT_GHOSTSIGHT - to_chat(src, "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTSIGHT) ? "see all emotes in the world" : "only see emotes from nearby mobs"].") + prefs.toggles ^= PREFTOGGLE_CHAT_GHOSTSIGHT + to_chat(src, "As a ghost, you will now [(prefs.toggles & PREFTOGGLE_CHAT_GHOSTSIGHT) ? "see all emotes in the world" : "only see emotes from nearby mobs"].") prefs.save_preferences(src) feedback_add_details("admin_verb","TGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -21,8 +21,8 @@ set name = "Enable/Disable GhostRadio" set category = "Preferences" set desc = ".Toggle between hearing all radio chatter, or only from nearby speakers" - prefs.toggles ^= CHAT_GHOSTRADIO - to_chat(src, "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTRADIO) ? "hear all radio chat in the world" : "only hear from nearby speakers"].") + prefs.toggles ^= PREFTOGGLE_CHAT_GHOSTRADIO + to_chat(src, "As a ghost, you will now [(prefs.toggles & PREFTOGGLE_CHAT_GHOSTRADIO) ? "hear all radio chat in the world" : "only hear from nearby speakers"].") prefs.save_preferences(src) feedback_add_details("admin_verb","TGR") @@ -32,9 +32,9 @@ set desc = "Toggle seeing radiochatter from radios and speakers" if(!check_rights(R_ADMIN)) return - prefs.toggles ^= CHAT_RADIO + prefs.toggles ^= PREFTOGGLE_CHAT_RADIO prefs.save_preferences(src) - to_chat(usr, "You will [(prefs.toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from radios or speakers") + to_chat(usr, "You will [(prefs.toggles & PREFTOGGLE_CHAT_RADIO) ? "now" : "no longer"] see radio chatter from radios or speakers") feedback_add_details("admin_verb","THR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/verb/toggle_ai_voice_annoucements() @@ -72,13 +72,13 @@ set name = "Show/Hide Deadchat" set category = "Preferences" set desc ="Toggles seeing deadchat" - prefs.toggles ^= CHAT_DEAD + prefs.toggles ^= PREFTOGGLE_CHAT_DEAD prefs.save_preferences(src) if(src.holder) - to_chat(src, "You will [(prefs.toggles & CHAT_DEAD) ? "now" : "no longer"] see deadchat.") + to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_CHAT_DEAD) ? "now" : "no longer"] see deadchat.") else - to_chat(src, "As a ghost, you will [(prefs.toggles & CHAT_DEAD) ? "now" : "no longer"] see deadchat.") + to_chat(src, "As a ghost, you will [(prefs.toggles & PREFTOGGLE_CHAT_DEAD) ? "now" : "no longer"] see deadchat.") feedback_add_details("admin_verb","TDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -86,27 +86,27 @@ set name = "Show/Hide Prayers" set category = "Preferences" set desc = "Toggles seeing prayers" - prefs.toggles ^= CHAT_PRAYER + prefs.toggles ^= PREFTOGGLE_CHAT_PRAYER prefs.save_preferences(src) - to_chat(src, "You will [(prefs.toggles & CHAT_PRAYER) ? "now" : "no longer"] see prayerchat.") + to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_CHAT_PRAYER) ? "now" : "no longer"] see prayerchat.") feedback_add_details("admin_verb","TP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/verb/togglescoreboard() set name = "Hide/Display End Round Scoreboard" set category = "Preferences" set desc = "Toggles displaying end of round scoreboard" - prefs.toggles ^= DISABLE_SCOREBOARD + prefs.toggles ^= PREFTOGGLE_DISABLE_SCOREBOARD prefs.save_preferences(src) - to_chat(src, "You will [(prefs.toggles & DISABLE_SCOREBOARD) ? "no longer" : "now"] see the end of round scoreboard.") + to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_DISABLE_SCOREBOARD) ? "no longer" : "now"] see the end of round scoreboard.") feedback_add_details("admin_verb","TScoreboard") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/verb/togglekarmareminder() set name = "Hide/Display End Round Karma Reminder" set category = "Preferences" set desc = "Toggles displaying end of round karma reminder" - prefs.toggles ^= DISABLE_KARMA_REMINDER + prefs.toggles ^= PREFTOGGLE_DISABLE_KARMA_REMINDER prefs.save_preferences(src) - to_chat(src, "You will [(prefs.toggles & DISABLE_KARMA_REMINDER) ? "no longer" : "now"] see the end of round karma reminder.") + to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_DISABLE_KARMA_REMINDER) ? "no longer" : "now"] see the end of round karma reminder.") feedback_add_details("admin_verb","TKarmabugger") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/verb/toggletitlemusic() @@ -143,9 +143,9 @@ set name = "Show/Hide OOC" set category = "Preferences" set desc = "Toggles seeing OutOfCharacter chat" - prefs.toggles ^= CHAT_OOC + prefs.toggles ^= PREFTOGGLE_CHAT_OOC prefs.save_preferences(src) - to_chat(src, "You will [(prefs.toggles & CHAT_OOC) ? "now" : "no longer"] see messages on the OOC channel.") + to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_CHAT_OOC) ? "now" : "no longer"] see messages on the OOC channel.") feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -153,9 +153,9 @@ set name = "Show/Hide LOOC" set category = "Preferences" set desc = "Toggles seeing Local OutOfCharacter chat" - prefs.toggles ^= CHAT_LOOC + prefs.toggles ^= PREFTOGGLE_CHAT_LOOC prefs.save_preferences(src) - to_chat(src, "You will [(prefs.toggles & CHAT_LOOC) ? "now" : "no longer"] see messages on the LOOC channel.") + to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_CHAT_LOOC) ? "now" : "no longer"] see messages on the LOOC channel.") feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -236,9 +236,9 @@ set name = "Toggle Darkmode" set category = "Preferences" set desc = "Toggles UI style between dark and light" - prefs.toggles ^= UI_DARKMODE + prefs.toggles ^= PREFTOGGLE_UI_DARKMODE prefs.save_preferences(src) - if(prefs.toggles & UI_DARKMODE) + if(prefs.toggles & PREFTOGGLE_UI_DARKMODE) activate_darkmode() else deactivate_darkmode() @@ -248,9 +248,9 @@ set name = "Toggle Karma Gains" set category = "Special Verbs" set desc = "This button will allow you to stop other people giving you karma." - prefs.toggles ^= DISABLE_KARMA + prefs.toggles ^= PREFTOGGLE_DISABLE_KARMA prefs.save_preferences(src) - if(prefs.toggles & DISABLE_KARMA) + if(prefs.toggles & PREFTOGGLE_DISABLE_KARMA) to_chat(usr, "You have disabled karma gains.") else to_chat(usr, "You have enabled karma gains.") @@ -259,9 +259,9 @@ set name = "Toggle Text Popup Limiter" set category = "Preferences" set desc = "Will let you limit the text input popups to one at a time." - prefs.toggles ^= TYPING_ONCE + prefs.toggles ^= PREFTOGGLE_TYPING_ONCE prefs.save_preferences(src) - if(prefs.toggles & TYPING_ONCE) + if(prefs.toggles & PREFTOGGLE_TYPING_ONCE) to_chat(usr, "You have enabled text popup limiting.") else to_chat(usr, "You have disabled text popup limiting.") @@ -271,9 +271,9 @@ set name = "Toggle Numpad targetting" set category = "Preferences" set desc = "This button will allow you to enable or disable Numpad Targetting" - prefs.toggles ^= NUMPAD_TARGET + prefs.toggles ^= PREFTOGGLE_NUMPAD_TARGET prefs.save_preferences(src) - if (prefs.toggles & NUMPAD_TARGET) + if (prefs.toggles & PREFTOGGLE_NUMPAD_TARGET) to_chat(usr, "You have enabled Numpad Targetting.") else to_chat(usr, "You have disabled Numpad Targetting.") @@ -283,9 +283,9 @@ set name = "Toggle QWERTY/AZERTY" set category = "Preferences" set desc = "This button will switch you between QWERTY and AZERTY control sets" - prefs.toggles ^= AZERTY + prefs.toggles ^= PREFTOGGLE_AZERTY prefs.save_preferences(src) - if (prefs.toggles & AZERTY) + if (prefs.toggles & PREFTOGGLE_AZERTY) to_chat(usr, "You are now in AZERTY mode.") else to_chat(usr, "You are now in QWERTY mode.") @@ -294,8 +294,8 @@ set name = "Show/Hide GhostPDA" set category = "Preferences" set desc = ".Toggle seeing PDA messages as an observer." - prefs.toggles ^= CHAT_GHOSTPDA - to_chat(src, "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTPDA) ? "see all PDA messages" : "no longer see PDA messages"].") + prefs.toggles ^= PREFTOGGLE_CHAT_GHOSTPDA + to_chat(src, "As a ghost, you will now [(prefs.toggles & PREFTOGGLE_CHAT_GHOSTPDA) ? "see all PDA messages" : "no longer see PDA messages"].") prefs.save_preferences(src) feedback_add_details("admin_verb","TGP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/karma/karma.dm b/code/modules/karma/karma.dm index 6df1ce19ba7..8f3df05bdac 100644 --- a/code/modules/karma/karma.dm +++ b/code/modules/karma/karma.dm @@ -85,7 +85,7 @@ GLOBAL_LIST_EMPTY(karma_spenders) log_game("Illegal karma spending attempt detected from [key] to [M.key]. Using the same IP!") to_chat(src, "You can't spend karma on someone connected from the same IP.") return FALSE - if(M.get_preference(DISABLE_KARMA)) + if(M.get_preference(PREFTOGGLE_DISABLE_KARMA)) to_chat(src, "That player has turned off incoming karma.") return FALSE return TRUE diff --git a/code/modules/keybindings/bindings_atom.dm b/code/modules/keybindings/bindings_atom.dm index c5b157ba6c0..1a8cbca4ef6 100644 --- a/code/modules/keybindings/bindings_atom.dm +++ b/code/modules/keybindings/bindings_atom.dm @@ -5,7 +5,7 @@ if(!user.keys_held["Ctrl"]) var/movement_dir = NONE var/list/movement = SSinput.movement_keys - if(user.prefs.toggles & AZERTY) + if(user.prefs.toggles & PREFTOGGLE_AZERTY) movement = SSinput.alt_movement_keys for(var/_key in user.keys_held) movement_dir = movement_dir | movement[_key] diff --git a/code/modules/keybindings/bindings_client.dm b/code/modules/keybindings/bindings_client.dm index 840b04dfd3f..c312d8d3251 100644 --- a/code/modules/keybindings/bindings_client.dm +++ b/code/modules/keybindings/bindings_client.dm @@ -44,7 +44,7 @@ current_key_address = ((current_key_address + 1) % HELD_KEY_BUFFER_LENGTH) var/movement = SSinput.movement_keys[_key] - if (prefs.toggles & AZERTY) movement = SSinput.alt_movement_keys[_key] + if (prefs.toggles & PREFTOGGLE_AZERTY) movement = SSinput.alt_movement_keys[_key] if(!(next_move_dir_sub & movement) && !keys_held["Ctrl"]) next_move_dir_add |= movement @@ -85,7 +85,7 @@ keys_held[i] = null break var/movement = SSinput.movement_keys[_key] - if (prefs.toggles & AZERTY) movement = SSinput.alt_movement_keys[_key] + if (prefs.toggles & PREFTOGGLE_AZERTY) movement = SSinput.alt_movement_keys[_key] if(!(next_move_dir_add & movement)) next_move_dir_sub |= movement diff --git a/code/modules/keybindings/bindings_mob.dm b/code/modules/keybindings/bindings_mob.dm index b5b81dd129e..12755c5f522 100644 --- a/code/modules/keybindings/bindings_mob.dm +++ b/code/modules/keybindings/bindings_mob.dm @@ -3,7 +3,7 @@ // Or we can have NPC's send actual keypresses and detect that by seeing no client /mob/key_down(_key, client/user) - if(user.prefs.toggles & AZERTY) + if(user.prefs.toggles & PREFTOGGLE_AZERTY) switch(_key) if("Delete") if(!pulling) @@ -70,7 +70,7 @@ toggle_move_intent() return //Bodypart selections - if(client.prefs.toggles & NUMPAD_TARGET) + if(client.prefs.toggles & PREFTOGGLE_NUMPAD_TARGET) switch(_key) if("Numpad8") user.body_toggle_head() @@ -107,7 +107,7 @@ if("Numpad4") a_intent_change("harm") return - if(client.keys_held["Ctrl"] && client.prefs.toggles & AZERTY) + if(client.keys_held["Ctrl"] && client.prefs.toggles & PREFTOGGLE_AZERTY) switch(SSinput.alt_movement_keys[_key]) if(NORTH) northface() diff --git a/code/modules/keybindings/bindings_robot.dm b/code/modules/keybindings/bindings_robot.dm index f85264308a0..578530197d8 100644 --- a/code/modules/keybindings/bindings_robot.dm +++ b/code/modules/keybindings/bindings_robot.dm @@ -10,9 +10,9 @@ cycle_modules() return if("Q") - if(!(client.prefs.toggles & AZERTY)) + if(!(client.prefs.toggles & PREFTOGGLE_AZERTY)) on_drop_hotkey_press() // User is in QWERTY hotkey mode. if("A") - if(client.prefs.toggles & AZERTY) + if(client.prefs.toggles & PREFTOGGLE_AZERTY) on_drop_hotkey_press() return ..() diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 2d9966669e8..341f84afc7f 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -647,8 +647,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set name = "Toggle Anonymous Dead-chat" set category = "Ghost" set desc = "Toggles showing your key in dead chat." - client.prefs.ghost_anonsay = !client.prefs.ghost_anonsay - to_chat(src, "As a ghost, your key will [(client.prefs.ghost_anonsay) ? "no longer" : "now"] be shown when you speak in dead chat.") + client.prefs.toggles2 ^= PREFTOGGLE_2_ANONDCHAT + to_chat(src, "As a ghost, your key will [(client.prefs.toggles2 & PREFTOGGLE_2_ANONDCHAT) ? "no longer" : "now"] be shown when you speak in dead chat.") client.prefs.save_preferences(src) /mob/dead/observer/verb/toggle_ghostsee() diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index 99e0af0ca6a..5d55e103852 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -72,7 +72,7 @@ if(findtext(message, " snores.")) //Because we have so many sleeping people. break - if(isobserver(M) && M.get_preference(CHAT_GHOSTSIGHT) && !(M in viewers(src, null)) && client) // The client check makes sure people with ghost sight don't get spammed by simple mobs emoting. + if(isobserver(M) && M.get_preference(PREFTOGGLE_CHAT_GHOSTSIGHT) && !(M in viewers(src, null)) && client) // The client check makes sure people with ghost sight don't get spammed by simple mobs emoting. M.show_message(message) // Type 1 (Visual) emotes are sent to anyone in view of the item @@ -111,7 +111,7 @@ to_chat(src, "You cannot send deadchat emotes (muted).") return - if(!(client.prefs.toggles & CHAT_DEAD)) + if(!(client.prefs.toggles & PREFTOGGLE_CHAT_DEAD)) to_chat(src, "You have deadchat muted.") return @@ -138,8 +138,8 @@ if(isnewplayer(M)) continue - if(check_rights(R_ADMIN|R_MOD, 0, M) && M.get_preference(CHAT_DEAD)) // Show the emote to admins/mods + if(check_rights(R_ADMIN|R_MOD, 0, M) && M.get_preference(PREFTOGGLE_CHAT_DEAD)) // Show the emote to admins/mods to_chat(M, message) - else if(M.stat == DEAD && M.get_preference(CHAT_DEAD)) // Show the emote to regular ghosts with deadchat toggled on + else if(M.stat == DEAD && M.get_preference(PREFTOGGLE_CHAT_DEAD)) // Show the emote to regular ghosts with deadchat toggled on M.show_message(message, 2) diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 2514ce68b06..b053e70eab1 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -51,7 +51,7 @@ if(!client) return 0 - if(isobserver(src) && client.prefs.toggles & CHAT_GHOSTEARS) + if(isobserver(src) && client.prefs.toggles & PREFTOGGLE_CHAT_GHOSTEARS) if(speaker && !speaker.client && !(speaker in view(src))) //Does the speaker have a client? It's either random stuff that observers won't care about (Experiment 97B says, 'EHEHEHEHEHEHEHE') //Or someone snoring. So we make it where they won't hear it. @@ -90,7 +90,7 @@ if(speaker_name != speaker.real_name && speaker.real_name) speaker_name = "[speaker.real_name] ([speaker_name])" track = "([ghost_follow_link(speaker, ghost=src)]) " - if(client.prefs.toggles & CHAT_GHOSTEARS && (speaker in view(src))) + if(client.prefs.toggles & PREFTOGGLE_CHAT_GHOSTEARS && (speaker in view(src))) message = "[message]" if(!can_hear()) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 87a327f3427..650677df354 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -986,7 +986,7 @@ if(isnewplayer(M)) continue - if(isobserver(M) && M.get_preference(CHAT_GHOSTSIGHT) && !(M in viewers(src, null)) && client) // The client check makes sure people with ghost sight don't get spammed by simple mobs emoting. + if(isobserver(M) && M.get_preference(PREFTOGGLE_CHAT_GHOSTSIGHT) && !(M in viewers(src, null)) && client) // The client check makes sure people with ghost sight don't get spammed by simple mobs emoting. M.show_message(message) switch(m_type) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index f9d6fc436cf..7d526df51a1 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -251,7 +251,7 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key) continue if(isobserver(M)) - if(M.get_preference(CHAT_GHOSTEARS) && client) // The client check is so that ghosts don't have to listen to mice. + if(M.get_preference(PREFTOGGLE_CHAT_GHOSTEARS) && client) // The client check is so that ghosts don't have to listen to mice. listening |= M continue @@ -311,7 +311,7 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key) if(isnewplayer(M)) continue - if(isobserver(M) && M.get_preference(CHAT_GHOSTSIGHT) && !(M in viewers(src, null)) && client) // The client check makes sure people with ghost sight don't get spammed by simple mobs emoting. + if(isobserver(M) && M.get_preference(PREFTOGGLE_CHAT_GHOSTSIGHT) && !(M in viewers(src, null)) && client) // The client check makes sure people with ghost sight don't get spammed by simple mobs emoting. M.show_message(message) switch(type) @@ -418,7 +418,7 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key) continue if(isobserver(M)) - if(M.get_preference(CHAT_GHOSTEARS)) // The client check is so that ghosts don't have to listen to mice. + if(M.get_preference(PREFTOGGLE_CHAT_GHOSTEARS)) // The client check is so that ghosts don't have to listen to mice. listening |= M continue diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 6acfb92a515..50588b0fc3b 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -459,7 +459,7 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM name = realname for(var/mob/M in GLOB.player_list) - if(M.client && ((!isnewplayer(M) && M.stat == DEAD) || check_rights(R_ADMIN|R_MOD,0,M)) && M.get_preference(CHAT_DEAD)) + if(M.client && ((!isnewplayer(M) && M.stat == DEAD) || check_rights(R_ADMIN|R_MOD,0,M)) && M.get_preference(PREFTOGGLE_CHAT_DEAD)) var/follow var/lname if(subject) @@ -471,9 +471,9 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM if(istype(subject, /mob/dead/observer)) DM = subject if(check_rights(R_ADMIN|R_MOD,0,M)) // What admins see - lname = "[keyname][(DM && DM.client && DM.client.prefs.ghost_anonsay) ? "*" : (DM ? "" : "^")] ([name])" + lname = "[keyname][(DM && DM.client && DM.client.prefs.toggles2 & PREFTOGGLE_2_ANONDCHAT) ? "*" : (DM ? "" : "^")] ([name])" else - if(DM && DM.client && DM.client.prefs.ghost_anonsay) // If the person is actually observer they have the option to be anonymous + if(DM && DM.client && DM.client.prefs.toggles2 & PREFTOGGLE_2_ANONDCHAT) // If the person is actually observer they have the option to be anonymous lname = "Ghost of [name]" else if(DM) // Non-anons lname = "[keyname] ([name])" diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 2bb2466ce02..617629e1b9a 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -60,7 +60,7 @@ /mob/new_player/proc/new_player_panel_proc() var/real_name = client.prefs.real_name - if(client.prefs.randomslot) + if(client.prefs.toggles2 & PREFTOGGLE_2_RANDOMSLOT) real_name = "Random Character Slot" var/output = "

Setup Character
[real_name]

" @@ -250,7 +250,7 @@ to_chat(usr, "There is an administrative lock on entering the game!") return - if(client.prefs.randomslot) + if(client.prefs.toggles2 & PREFTOGGLE_2_RANDOMSLOT) client.prefs.load_random_character_slot(client) if(client.prefs.species in GLOB.whitelisted_species) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 7a26de718b6..e3a2282228f 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -55,7 +55,7 @@ to_chat(src, "You cannot talk in deadchat (muted).") return - if(!(client.prefs.toggles & CHAT_DEAD)) + if(!(client.prefs.toggles & PREFTOGGLE_CHAT_DEAD)) to_chat(src, "You have deadchat muted.") return diff --git a/code/modules/mob/typing_indicator.dm b/code/modules/mob/typing_indicator.dm index a2ca226147c..4eee3653a9d 100644 --- a/code/modules/mob/typing_indicator.dm +++ b/code/modules/mob/typing_indicator.dm @@ -21,7 +21,7 @@ GLOBAL_LIST_EMPTY(typing_indicator) return if(client) - if((client.prefs.toggles & SHOW_TYPING) || stat != CONSCIOUS || is_muzzled()) + if((client.prefs.toggles & PREFTOGGLE_SHOW_TYPING) || stat != CONSCIOUS || is_muzzled()) overlays -= GLOB.typing_indicator[bubble_icon] else if(state) @@ -61,7 +61,7 @@ GLOBAL_LIST_EMPTY(typing_indicator) /mob/proc/handle_typing_indicator() if(client) - if(!(client.prefs.toggles & SHOW_TYPING) && !hud_typing) + if(!(client.prefs.toggles & PREFTOGGLE_SHOW_TYPING) && !hud_typing) var/temp = winget(client, "input", "text") if(temp != last_typed) @@ -83,12 +83,12 @@ GLOBAL_LIST_EMPTY(typing_indicator) set name = "Show/Hide Typing Indicator" set category = "Preferences" set desc = "Toggles showing an indicator when you are typing emote or say message." - prefs.toggles ^= SHOW_TYPING + prefs.toggles ^= PREFTOGGLE_SHOW_TYPING prefs.save_preferences(src) - to_chat(src, "You will [(prefs.toggles & SHOW_TYPING) ? "no longer" : "now"] display a typing indicator.") + to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_SHOW_TYPING) ? "no longer" : "now"] display a typing indicator.") // Clear out any existing typing indicator. - if(prefs.toggles & SHOW_TYPING) + if(prefs.toggles & PREFTOGGLE_SHOW_TYPING) if(istype(mob)) mob.set_typing_indicator(0) feedback_add_details("admin_verb","TID") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index 526ca1ffe04..23d84fda4d1 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -186,7 +186,7 @@ nanoui is used to open and update nano browser uis "mapZLevel" = map_z_level, "user" = list( "name" = user.name, - "fancy" = user.client.prefs.nanoui_fancy + "fancy" = user.client.prefs.toggles2 & PREFTOGGLE_2_FANCYUI ), "window" = list( "width" = width, @@ -418,7 +418,7 @@ nanoui is used to open and update nano browser uis // Preset the can_rezie and titlebar values on uis if the user has fancy uis set // Prevents the ui from flickering when opened - if(user.client.prefs.nanoui_fancy) + if(user.client.prefs.toggles2 & PREFTOGGLE_2_FANCYUI) set_window_options("focus=0;can_close=1;can_minimize=1;can_maximize=0;can_resize=0;titlebar=0;") user << browse(get_html(), "window=[window_id];[window_size][window_options]") diff --git a/code/modules/pda/messenger.dm b/code/modules/pda/messenger.dm index 4f17cbf041e..e7d57c3d5f8 100644 --- a/code/modules/pda/messenger.dm +++ b/code/modules/pda/messenger.dm @@ -177,7 +177,7 @@ // Show it to ghosts for(var/mob/M in GLOB.dead_mob_list) - if(isobserver(M) && M.client && (M.client.prefs.toggles & CHAT_GHOSTPDA)) + if(isobserver(M) && M.client && (M.client.prefs.toggles & PREFTOGGLE_CHAT_GHOSTPDA)) var/ghost_message = "[pda.owner] ([ghost_follow_link(pda, ghost=M)]) PDA Message --> [P.owner] ([ghost_follow_link(P, ghost=M)]): [t]" to_chat(M, "[ghost_message]") diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 3fb173e7ac2..cafe92bcc87 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -267,7 +267,7 @@ timer = world.time GLOB.priority_announcement.Announce("The Emergency Shuttle has left the station. Estimate [timeLeft(600)] minutes until the shuttle docks at Central Command.") for(var/mob/M in GLOB.player_list) - if(!isnewplayer(M) && !M.client.karma_spent && !(M.client.ckey in GLOB.karma_spenders) && !M.get_preference(DISABLE_KARMA_REMINDER)) + if(!isnewplayer(M) && !M.client.karma_spent && !(M.client.ckey in GLOB.karma_spenders) && !M.get_preference(PREFTOGGLE_DISABLE_KARMA_REMINDER)) to_chat(M, "You have not yet spent your karma for the round; was there a player worthy of receiving your reward? Look under Special Verbs tab, Award Karma.") if(SHUTTLE_ESCAPE) diff --git a/code/modules/tgui/tgui.dm b/code/modules/tgui/tgui.dm index 5157d0c9fed..d9bf56b555c 100644 --- a/code/modules/tgui/tgui.dm +++ b/code/modules/tgui/tgui.dm @@ -106,7 +106,7 @@ window_options += "size=[width]x[height];" // Remove titlebar and resize handles for a fancy window - if(user.client.prefs.nanoui_fancy) + if(user.client.prefs.toggles2 & PREFTOGGLE_2_FANCYUI) window_options += "titlebar=0;can_resize=0;" else window_options += "titlebar=1;can_resize=1;" @@ -196,7 +196,7 @@ "title" = title, "status" = status, "interface" = interface, - "fancy" = user.client.prefs.nanoui_fancy, + "fancy" = user.client.prefs.toggles2 & PREFTOGGLE_2_FANCYUI, "observer" = isobserver(user), "window" = window_id, "map" = (GLOB.using_map && GLOB.using_map.name) ? GLOB.using_map.name : "Unknown", @@ -252,8 +252,7 @@ src_object.tgui_shared_states[key] = value SStgui.update_uis(src_object) if("tgui:setFancy") - var/value = text2num(params["value"]) - user.client.prefs.nanoui_fancy = value + user.client.prefs.toggles2 ^= PREFTOGGLE_2_FANCYUI if("tgui:log") // Force window to show frills on fatal errors if(params["fatal"]) diff --git a/config/example/dbconfig.txt b/config/example/dbconfig.txt index 2ab248072cf..f1a96ae3d74 100644 --- a/config/example/dbconfig.txt +++ b/config/example/dbconfig.txt @@ -9,7 +9,7 @@ ## This value must be set to the version of the paradise schema in use. ## If this value does not match, the SQL database will not be loaded and an error will be generated. ## Roundstart will be delayed. -DB_VERSION 12 +DB_VERSION 13 ## Server the MySQL database can be found at. # Examples: localhost, 200.135.5.43, www.mysqldb.com, etc. diff --git a/tools/travis/dbconfig.txt b/tools/travis/dbconfig.txt index 911828e37a7..07da8e74371 100644 --- a/tools/travis/dbconfig.txt +++ b/tools/travis/dbconfig.txt @@ -2,7 +2,7 @@ # Dont use it ingame # Remember to update this when you increase the SQL version! -aa SQL_ENABLED -DB_VERSION 12 +DB_VERSION 13 ADDRESS 127.0.0.1 PORT 3306 FEEDBACK_DATABASE feedback