diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index f4cf212e8f9..022c5e90acf 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -60,10 +60,11 @@ #define PREFTOGGLE_2_HIDE_ITEM_TOOLTIPS (1<<13) // 8192 #define PREFTOGGLE_2_THOUGHT_BUBBLE (1<<14) // 16384 #define PREFTOGGLE_2_MC_TABS (1<<15) // 32768 +#define PREFTOGGLE_2_DANCE_DISCO (1<<16) // 65536 -#define TOGGLES_2_TOTAL 65535 // 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_TOTAL 131072 // 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|PREFTOGGLE_2_RUNECHAT|PREFTOGGLE_2_DEATHMESSAGE|PREFTOGGLE_2_EMOTE_BUBBLE|PREFTOGGLE_2_SEE_ITEM_OUTLINES|PREFTOGGLE_2_THOUGHT_BUBBLE) +#define TOGGLES_2_DEFAULT (PREFTOGGLE_2_FANCYUI|PREFTOGGLE_2_ITEMATTACK|PREFTOGGLE_2_WINDOWFLASHING|PREFTOGGLE_2_RUNECHAT|PREFTOGGLE_2_DEATHMESSAGE|PREFTOGGLE_2_EMOTE_BUBBLE|PREFTOGGLE_2_SEE_ITEM_OUTLINES|PREFTOGGLE_2_THOUGHT_BUBBLE|PREFTOGGLE_2_DANCE_DISCO) // Sanity checks #if TOGGLES_TOTAL > 16777215 diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm index 7d71f8d8b90..7ed9245996a 100644 --- a/code/game/machinery/dance_machine.dm +++ b/code/game/machinery/dance_machine.dm @@ -328,9 +328,12 @@ /obj/machinery/disco/proc/dance(mob/living/M) //Show your moves set waitfor = FALSE - if(M.client && !(M.client.prefs.sound & SOUND_DISCO)) //We have a client that doesn't want to dance. - rangers -= M //Doing that here as it'll be checked less often than in processing. - return + if(M.client) + if(!(M.client.prefs.sound & SOUND_DISCO)) //they dont want music or dancing + rangers -= M //Doing that here as it'll be checked less often than in processing. + return + if(!(M.client.prefs.toggles2 & PREFTOGGLE_2_DANCE_DISCO)) //they just dont wanna dance + return switch(rand(0,9)) if(0 to 1) dance2(M) diff --git a/code/modules/client/preference/preferences_toggles.dm b/code/modules/client/preference/preferences_toggles.dm index 08930805b2a..c62c400543b 100644 --- a/code/modules/client/preference/preferences_toggles.dm +++ b/code/modules/client/preference/preferences_toggles.dm @@ -365,3 +365,11 @@ prefs.toggles2 ^= PREFTOGGLE_2_MC_TABS prefs.save_preferences(src) to_chat(src, "You will [(prefs.toggles2 & PREFTOGGLE_2_MC_TABS) ? "now" : "no longer"] see the MC tabs on the top right.") + +/client/verb/toggle_dance() + set name = "Toggle Disco Machine Dancing" + set category = "Preferences" + set desc = "Toggles automatic dancing from the radiant dance machine" + prefs.toggles2 ^= PREFTOGGLE_2_DANCE_DISCO + prefs.save_preferences(src) + to_chat(usr, "You will [(prefs.toggles2 & PREFTOGGLE_2_DANCE_DISCO) ? "now" : "no longer"] dance to the radiant dance machine.")