Fixes balloon alerts sourced on turfs (heavy rain edition) (#64472)

Balloon alerts sourced from turfs will now properly only show on one turf.
get_atom_on_turf() will now CRASH() if passed a turf instead of an atom/movable. I look through all uses and made sure any place that may send a turf won't, but it SHOULD be fine.
This commit is contained in:
MrMelbert
2022-01-29 02:37:00 -08:00
committed by GitHub
parent 6e47027a0a
commit 29b6d829cf
3 changed files with 21 additions and 12 deletions
+1 -1
View File
@@ -42,7 +42,7 @@
var/atom/movable/movable_source = src
bound_width = movable_source.bound_width
var/image/balloon_alert = image(loc = get_atom_on_turf(src), layer = ABOVE_MOB_LAYER)
var/image/balloon_alert = image(loc = isturf(src) ? src : get_atom_on_turf(src), layer = ABOVE_MOB_LAYER)
balloon_alert.plane = BALLOON_CHAT_PLANE
balloon_alert.alpha = 0
balloon_alert.appearance_flags = RESET_ALPHA|RESET_COLOR|RESET_TRANSFORM