diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index ec5341312ff..ad2e9a77a61 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -57,8 +57,9 @@ #define PREFTOGGLE_2_FORCE_WHITE_RUNECHAT 1024 #define PREFTOGGLE_2_SIMPLE_STAT_PANEL 2048 #define PREFTOGGLE_2_SEE_ITEM_OUTLINES 4096 +#define PREFTOGGLE_2_HIDE_ITEM_TOOLTIPS 8192 -#define TOGGLES_2_TOTAL 8191 // 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 16383 // 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) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index d0b27207dac..05de5fefe0e 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -715,14 +715,14 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons /obj/item/MouseEntered(location, control, params) . = ..() if(in_inventory || in_storage) - var/timedelay = 8 var/mob/user = usr - tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, user), timedelay, TIMER_STOPPABLE) + if(!(user.client.prefs.toggles2 & PREFTOGGLE_2_HIDE_ITEM_TOOLTIPS)) + tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, user), 8, TIMER_STOPPABLE) if(QDELETED(src)) return - var/mob/living/L = user if(!(user.client.prefs.toggles2 & PREFTOGGLE_2_SEE_ITEM_OUTLINES)) return + var/mob/living/L = user if(istype(L) && HAS_TRAIT(L, TRAIT_HANDS_BLOCKED)) apply_outline(L, COLOR_RED_GRAY) //if they're dead or handcuffed, let's show the outline as red to indicate that they can't interact with that right now else diff --git a/code/modules/client/preference/preferences_toggles.dm b/code/modules/client/preference/preferences_toggles.dm index 1df0343433e..c0a7b11ed07 100644 --- a/code/modules/client/preference/preferences_toggles.dm +++ b/code/modules/client/preference/preferences_toggles.dm @@ -342,6 +342,14 @@ prefs.save_preferences(src) to_chat(usr, "You will [(prefs.toggles2 & PREFTOGGLE_2_SEE_ITEM_OUTLINES) ? "now" : "no longer"] see item outlines on hover.") +/client/verb/toggle_item_tooltips() + set name = "Toggle Hover-over Item Tooltips" + set category = "Preferences" + set desc = "Toggles textboxes with the item descriptions after hovering on them in your inventory." + prefs.toggles2 ^= PREFTOGGLE_2_HIDE_ITEM_TOOLTIPS + prefs.save_preferences(src) + to_chat(src, "You will [(prefs.toggles2 & PREFTOGGLE_2_HIDE_ITEM_TOOLTIPS) ? "no longer" : "now"] see item tooltips when you hover over items on your HUD.") + /mob/verb/toggle_anonmode() set name = "Toggle Anonymous Mode" set category = "Preferences"