Skip to content

Commit

Permalink
fixes fish huds hard delete (tgstation#83160)
Browse files Browse the repository at this point in the history
## About The Pull Request
fish huds were consistently hard deleting because their reference wasnt
being removed from the fisher's screen

## Why It's Good For The Game
fixes fish huds hard deleting

## Changelog
  • Loading branch information
Ben10Omintrix authored May 10, 2024
1 parent 92b3d61 commit 17a1132
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/modules/fishing/fishing_minigame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,12 @@
hud_completion = new(null, null, challenge)
vis_contents += list(hud_bait, hud_fish, hud_completion)
challenge.user.client.screen += src
master_ref = WEAKREF(challenge)

/atom/movable/screen/fishing_hud/Destroy()
var/datum/fishing_challenge/challenge = master_ref?.resolve()
if(!isnull(challenge))
challenge.user.client.screen -= src
QDEL_NULL(hud_fish)
QDEL_NULL(hud_bait)
QDEL_NULL(hud_completion)
Expand Down

0 comments on commit 17a1132

Please sign in to comment.