Port over three PRs from TG about component.

This commit is contained in:
variableundefined
2018-09-04 23:19:30 +08:00
parent 040430a23e
commit 17a5454fbc
9 changed files with 99 additions and 42 deletions
+2 -1
View File
@@ -295,11 +295,12 @@ SUBSYSTEM_DEF(garbage)
if(isnull(D.gc_destroyed))
D.SendSignal(COMSIG_PARENT_QDELETED)
SEND_SIGNAL(D, COMSIG_PARENT_QDELETED, force) // Give the components a chance to prevent their parent from being deleted
D.gc_destroyed = GC_CURRENTLY_BEING_QDELETED
var/start_time = world.time
var/start_tick = world.tick_usage
var/hint = D.Destroy(arglist(args.Copy(2))) // Let our friend know they're about to get fucked up.
SEND_SIGNAL(D, COMSIG_PARENT_QDELETED, force, hint) // Let the (remaining) components know about the result of Destroy
if(world.time != start_time)
I.slept_destroy++
else