From 7b493c30d7404f612d75d20a73750fecc5c6ffc6 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Thu, 15 Feb 2018 09:50:11 -0500 Subject: [PATCH] Merge pull request #35664 from AnturK/tooltipruntimes Fixes some tooltip runtimes --- code/_onclick/hud/action_button.dm | 3 ++- code/_onclick/hud/alert.dm | 3 ++- code/game/objects/items.dm | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm index cd24e68cbb..924adcd4c9 100644 --- a/code/_onclick/hud/action_button.dm +++ b/code/_onclick/hud/action_button.dm @@ -108,7 +108,8 @@ /obj/screen/movable/action_button/MouseEntered(location,control,params) - openToolTip(usr,src,params,title = name,content = desc,theme = actiontooltipstyle) + if(!QDELETED(src)) + openToolTip(usr,src,params,title = name,content = desc,theme = actiontooltipstyle) /obj/screen/movable/action_button/MouseExited() diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 4379398a7d..c6a5843b32 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -101,7 +101,8 @@ /obj/screen/alert/MouseEntered(location,control,params) - openToolTip(usr,src,params,title = name,content = desc,theme = alerttooltipstyle) + if(!QDELETED(src)) + openToolTip(usr,src,params,title = name,content = desc,theme = alerttooltipstyle) /obj/screen/alert/MouseExited() diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 3ddeede1b7..9ac53cc85b 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -735,7 +735,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) openToolTip(user,src,params,title = name,content = "[desc]
Force: [force_string]",theme = "") /obj/item/MouseEntered(location, control, params) - if((item_flags & IN_INVENTORY) && usr.client.prefs.enable_tips) + if((item_flags & IN_INVENTORY) && usr.client.prefs.enable_tips && !QDELETED(src)) var/timedelay = usr.client.prefs.tip_delay/100 var/user = usr tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, user), timedelay, TIMER_STOPPABLE)//timer takes delay in deciseconds, but the pref is in milliseconds. dividing by 100 converts it.