Cooking Tooltip Eyesore Fix (#10103)

Cooking appliance tooltips only appear when you shift hover over them, instead of popping up wildly as you hover over the kitchen.
This commit is contained in:
Geeves
2020-09-27 17:34:31 +02:00
committed by GitHub
parent 896f1940c4
commit e1683cbb7e
3 changed files with 12 additions and 2 deletions

View File

@@ -32,7 +32,9 @@
/obj/machinery/appliance/cooker/MouseEntered(location, control, params)
. = ..()
if(get_dist(usr, src) <= 2)
var/list/modifiers = params2list(params)
if(modifiers["shift"] && get_dist(usr, src) <= 2)
params = replacetext(params, "shift=1;", "") // tooltip doesn't appear unless this is stripped
var/description = ""
if(isemptylist(cooking_objs))
description = "It is empty."

View File

@@ -34,7 +34,9 @@
/obj/item/reagent_containers/cooking_container/MouseEntered(location, control, params)
. = ..()
if(get_dist(usr, src) <= 2)
var/list/modifiers = params2list(params)
if(modifiers["shift"] && get_dist(usr, src) <= 2)
params = replacetext(params, "shift=1;", "") // tooltip doesn't appear unless this is stripped
var/description
if(length(contents))
description = get_content_info()