Skip to content

Commit

Permalink
Potential fix for give alert getting stuck, maybe?
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy committed Jan 18, 2025
1 parent 64a9a69 commit c002bd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions code/datums/status_effects/neutral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@

/// Hook up the specified carbon mob to be offered the item in question, give them the alert and signals and all
/datum/status_effect/offering/proc/register_candidate(mob/living/carbon/possible_candidate)
var/atom/movable/screen/alert/give/G = possible_candidate.throw_alert("[owner]", give_alert_type)
var/atom/movable/screen/alert/give/G = possible_candidate.throw_alert("[REF(owner)]_offer", give_alert_type)
if(!G)
return
LAZYADD(possible_takers, possible_candidate)
Expand All @@ -207,7 +207,7 @@

/// Remove the alert and signals for the specified carbon mob. Automatically removes the status effect when we lost the last taker
/datum/status_effect/offering/proc/remove_candidate(mob/living/carbon/removed_candidate)
removed_candidate.clear_alert("[owner]")
removed_candidate.clear_alert("[REF(owner)]_offer")
LAZYREMOVE(possible_takers, removed_candidate)
UnregisterSignal(removed_candidate, COMSIG_MOVABLE_MOVED)
if(!possible_takers && !QDELING(src))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@
* * I - The item being given by the offerer
*/
/mob/living/proc/take(mob/living/carbon/offerer, obj/item/I, visible_message = TRUE)
clear_alert("[offerer]")
clear_alert("[REF(offerer)]_offer")
if(IS_DEAD_OR_INCAP(src))
to_chat(src, span_warning("You're unable to take anything in your current state!"))
return
Expand Down

0 comments on commit c002bd8

Please sign in to comment.