Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit a76e015

Browse files
guhhhh (#22633)
1 parent a5e10c2 commit a76e015

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

code/_onclick/hud/alert.dm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,14 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
308308
add_overlay(receiving)
309309
src.receiving = receiving
310310
src.giver = giver
311+
// if any of these move the alert should go away
312+
RegisterSignal(receiving, COMSIG_MOVABLE_MOVED, TYPE_PROC_REF(/atom/movable/screen/alert/give, removeAlert))
313+
RegisterSignal(giver, COMSIG_MOVABLE_MOVED, TYPE_PROC_REF(/atom/movable/screen/alert/give, removeAlert))
311314
RegisterSignal(taker, COMSIG_MOVABLE_MOVED, TYPE_PROC_REF(/atom/movable/screen/alert/give, removeAlert))
312315

313316
/atom/movable/screen/alert/give/proc/removeAlert()
314317
to_chat(mob_viewer, span_warning("You moved out of range of [giver]!"))
315-
mob_viewer.clear_alert("[giver]")
318+
mob_viewer.clear_alert("[REF(giver)]-[REF(receiving)]")
316319

317320
/atom/movable/screen/alert/give/Click(location, control, params)
318321
. = ..()

code/modules/mob/living/carbon/inventory.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@
338338
for(var/mob/living/carbon/C in orange(1, src))
339339
if(!CanReach(C))
340340
return
341-
var/atom/movable/screen/alert/give/G = C.throw_alert("[src]", /atom/movable/screen/alert/give)
341+
var/atom/movable/screen/alert/give/G = C.throw_alert("[REF(src)]-[REF(receiving)]", /atom/movable/screen/alert/give)
342342
if(!G)
343343
return
344344
G.setup(C, src, receiving)

0 commit comments

Comments
 (0)