Fixes a decal hard del (#81093)

## About The Pull Request

Attempting to fix this hard del here: 


![firefox_1QHRZHx9GY](https://github.com/tgstation/tgstation/assets/13398309/871d50e4-1bfc-4b16-82af-972162e8d2e4)

I think the cause is from the turf changing, which
`/datum/elements/connect_loc` does not seem to take into consideration.
Now it should.

Also cleans up the signals in `/datum/component/infective/` which may be
another potential cause of issues.

## Why It's Good For The Game

Code that cleans up after itself is nice.

## Changelog

🆑
fix: fixes a hard del with decals
/🆑
This commit is contained in:
Bloop
2024-01-25 20:23:24 -05:00
committed by GitHub
parent 6062a5c859
commit c190f9d44f
2 changed files with 18 additions and 1 deletions
+17
View File
@@ -161,3 +161,20 @@
/datum/component/infective/proc/try_infect(mob/living/L, target_zone)
for(var/V in diseases)
L.ContactContractDisease(V, target_zone)
/datum/component/infective/UnregisterFromParent()
. = ..()
UnregisterSignal(parent, list(
COMSIG_FOOD_EATEN,
COMSIG_PILL_CONSUMED,
COMSIG_COMPONENT_CLEAN_ACT,
COMSIG_MOVABLE_BUMP,
COMSIG_MOVABLE_IMPACT_ZONE,
COMSIG_ITEM_ATTACK_ZONE,
COMSIG_ITEM_ATTACK,
COMSIG_ITEM_EQUIPPED,
COMSIG_GLASS_DRANK,
COMSIG_ORGAN_IMPLANTED,
COMSIG_GIBS_STREAK,
))
qdel(GetComponent(/datum/component/connect_loc_behalf))
+1 -1
View File
@@ -24,7 +24,7 @@
/datum/element/connect_loc/proc/update_signals(atom/movable/listener)
var/atom/listener_loc = listener.loc
if(isnull(listener_loc))
if(QDELETED(listener) || QDELETED(listener_loc))
return
for (var/signal in connections)