From 0dc7b39740b2b1aa25c2aec57b6640ec93455a52 Mon Sep 17 00:00:00 2001 From: variableundefined <40092670+variableundefined@users.noreply.github.com> Date: Sun, 21 Oct 2018 21:54:50 +0800 Subject: [PATCH] Remove 511 compatibility things --- code/controllers/subsystem/garbage.dm | 8 +------- code/datums/components/_component.dm | 18 +++--------------- code/game/atoms.dm | 6 +----- 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index c9521a4f3c3..457ea9513ab 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -248,8 +248,6 @@ SUBSYSTEM_DEF(garbage) qdel(D, force) #endif -/proc/KillMeIn512(sendsignal) - return 1 // Should be treated as a replacement for the 'del' keyword. // Datums passed to this will be given a chance to clean up references to allow the GC to collect them. /proc/qdel(datum/D, force = FALSE, ...) @@ -263,17 +261,13 @@ SUBSYSTEM_DEF(garbage) if(isnull(D.gc_destroyed)) - #if DM_VERSION > 511 - #warn Remove the garbage bypass code below - #endif if(SEND_SIGNAL(D, COMSIG_PARENT_QDELETED, force)) // Give the components a chance to prevent their parent from being deleted return 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. - var/Removein512too = SEND_SIGNAL(D, COMSIG_PARENT_QDELETED, force, hint) // Let the (remaining) components know about the result of Destroy - KillMeIn512(Removein512too) + 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 diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index 43fa6f23f78..7621828d970 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -56,11 +56,7 @@ if(!force) _RemoveFromParent() if(!silent) - #if DM_VERSION > 511 - #warn Remove the garbage bypass code below - #endif - var/Removein512 = SEND_SIGNAL(P, COMSIG_COMPONENT_REMOVING, src) - KillMeIn512(Removein512) + SEND_SIGNAL(P, COMSIG_COMPONENT_REMOVING, src) parent = null for(var/target in signal_procs) UnregisterSignal(target, signal_procs[target]) @@ -262,11 +258,7 @@ new_comp = new nt(arglist(args)) // Dupes are allowed, act like normal if(!old_comp && !QDELETED(new_comp)) // Nothing related to duplicate components happened and the new component is healthy - #if DM_VERSION > 511 - #warn Remove the garbage bypass code below - #endif - var/Removein512 = SEND_SIGNAL(src, COMSIG_COMPONENT_ADDED, new_comp) - KillMeIn512(Removein512) + SEND_SIGNAL(src, COMSIG_COMPONENT_ADDED, new_comp) return new_comp return old_comp @@ -286,11 +278,7 @@ qdel(C) return C._RemoveFromParent() - #if DM_VERSION > 511 - #warn Remove the garbage bypass code below - #endif - var/Removein512 = SEND_SIGNAL(helicopter, COMSIG_COMPONENT_REMOVING, C) - KillMeIn512(Removein512) + SEND_SIGNAL(helicopter, COMSIG_COMPONENT_REMOVING, C) C.parent = src if(C == AddComponent(C)) C._JoinParent() diff --git a/code/game/atoms.dm b/code/game/atoms.dm index b3be386ff7f..3d2ce12268b 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -290,11 +290,7 @@ to_chat(user, "[reagents.total_volume] units of various reagents.") else to_chat(user, "Nothing.") - #if DM_VERSION > 511 - #warn Remove the garbage bypass code below - #endif - var/Removein512 = SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user) - KillMeIn512(Removein512) + SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user) return distance == -1 || (get_dist(src, user) <= distance) || isobserver(user) //observers do not have a range limit