mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Fixes runtime when mousing over items in nullspace (#68507)
This commit is contained in:
@@ -971,7 +971,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
|
||||
|
||||
/obj/item/MouseEntered(location, control, params)
|
||||
. = ..()
|
||||
if(((get(src, /mob) == usr) || src.loc.atom_storage || (src.item_flags & IN_STORAGE)) && !QDELETED(src))
|
||||
if(((get(src, /mob) == usr) || loc?.atom_storage || (item_flags & IN_STORAGE)) && !QDELETED(src)) //nullspace exists.
|
||||
var/mob/living/L = usr
|
||||
if(usr.client.prefs.read_preference(/datum/preference/toggle/enable_tooltips))
|
||||
var/timedelay = usr.client.prefs.read_preference(/datum/preference/numeric/tooltip_delay) / 100
|
||||
@@ -992,7 +992,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
|
||||
remove_filter("hover_outline")
|
||||
|
||||
/obj/item/proc/apply_outline(outline_color = null)
|
||||
if(((get(src, /mob) != usr) && !src.loc.atom_storage && !(src.item_flags & IN_STORAGE)) || QDELETED(src) || isobserver(usr)) //cancel if the item isn't in an inventory, is being deleted, or if the person hovering is a ghost (so that people spectating you don't randomly make your items glow)
|
||||
if(((get(src, /mob) != usr) && !loc?.atom_storage && !(item_flags & IN_STORAGE)) || QDELETED(src) || isobserver(usr)) //cancel if the item isn't in an inventory, is being deleted, or if the person hovering is a ghost (so that people spectating you don't randomly make your items glow)
|
||||
return FALSE
|
||||
var/theme = lowertext(usr.client?.prefs?.read_preference(/datum/preference/choiced/ui_style))
|
||||
if(!outline_color) //if we weren't provided with a color, take the theme's color
|
||||
|
||||
Reference in New Issue
Block a user