mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
Fixes lathes breaking on ore silo deletion (#91498)
## About The Pull Request - Fixes #91494 - Fixes #91479 - Fixes #90533 The ORM disconnects the machines from its `Destroy()` proc by which time its deleted flag has already been set to TRUE leading to an early return, thus causing the silo to not disconnect properly ## Changelog 🆑 fix: lathes don't break on ore silo deletion /🆑
This commit is contained in:
@@ -75,7 +75,7 @@ handles linking back and forth.
|
||||
/datum/component/remote_materials/Destroy()
|
||||
if(silo)
|
||||
allow_standalone = FALSE
|
||||
disconnect_from(silo)
|
||||
disconnect()
|
||||
mat_container = null
|
||||
|
||||
return ..()
|
||||
@@ -115,14 +115,9 @@ handles linking back and forth.
|
||||
if (!silo && mat_container)
|
||||
mat_container.max_amount = size
|
||||
|
||||
/**
|
||||
* Disconnect this component from the remote silo
|
||||
*
|
||||
* Arguments
|
||||
* old_silo- The silo we are trying to disconnect from
|
||||
*/
|
||||
/datum/component/remote_materials/proc/disconnect_from(obj/machinery/ore_silo/old_silo)
|
||||
if (QDELETED(old_silo) || silo != old_silo)
|
||||
///Disconnects this component from the silo
|
||||
/datum/component/remote_materials/proc/disconnect()
|
||||
if(isnull(silo))
|
||||
return
|
||||
|
||||
UnregisterSignal(parent, list(COMSIG_ATOM_ITEM_INTERACTION, COMSIG_ATOM_ITEM_INTERACTION_SECONDARY))
|
||||
|
||||
Reference in New Issue
Block a user