Clear detached holder before moving assembly (#89946)

## About The Pull Request

If you attached a proximity sensor to a wire and then detached it again,
it would cause a runtime.
This is because when the proximity sensor moved into your tile it would
trigger and attempt to pulse, despite not being attached to anything
To prevent this, we clear its `holder` variable before moving it so that
it knows that there actually isn't anything for it to pulse

## Changelog

Not sure this actually had any player facing effect other than creating
a runtime error
This commit is contained in:
Jacquerel
2025-03-13 11:34:35 +00:00
committed by GitHub
parent cfd18bf5e5
commit edf049d953
+3 -2
View File
@@ -54,9 +54,10 @@
connected = null
if(!holder)
return FALSE
forceMove(holder.drop_location())
SEND_SIGNAL(src, COMSIG_ASSEMBLY_DETACHED, holder)
var/atom/was_holder = holder
holder = null
forceMove(was_holder.drop_location())
SEND_SIGNAL(src, COMSIG_ASSEMBLY_DETACHED, was_holder)
return TRUE
/**