Skip to content

Commit

Permalink
eating a fish you're showing off will stop showing it off (#22900)
Browse files Browse the repository at this point in the history
* Update fish.dm

* fix this other bug too
  • Loading branch information
ToasterBiome authored Jan 5, 2025
1 parent d4a52bc commit dbe6d39
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion yogstation/code/game/objects/items/fishing/fish.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,14 @@
M.visible_message("[M] shows off [src]. It's [length] inch[length > 1 ? "es" : ""] long and weighs [weight] ounce[weight > 1 ? "s" : ""]!", \
span_notice("You show off [src]. It's [length] inch[length > 1 ? "es" : ""] long and weighs [weight] ounce[weight > 1 ? "s" : ""]!"))
RegisterSignal(M,COMSIG_ATOM_DIR_CHANGE, PROC_REF(stop_overlay),TRUE)
RegisterSignal(src, COMSIG_PREQDELETED, PROC_REF(stop_overlay))
RegisterSignal(src, COMSIG_MOVABLE_PRE_MOVE, PROC_REF(stop_overlay))

/obj/item/reagent_containers/food/snacks/fish/proc/stop_overlay()
if(showoffer && showoff_overlay)
UnregisterSignal(showoffer,COMSIG_ATOM_DIR_CHANGE)
UnregisterSignal(showoffer, COMSIG_ATOM_DIR_CHANGE)
UnregisterSignal(src, COMSIG_PREQDELETED)
UnregisterSignal(src, COMSIG_MOVABLE_PRE_MOVE)
showoffer.cut_overlay(showoff_overlay)
showoffer = null
showoff_overlay = null
Expand Down

0 comments on commit dbe6d39

Please sign in to comment.