Ports tg's garbage collector subsystem and Destroy() returning qdel hints.
This commit is contained in:
PsiOmegaDelta
2017-06-05 22:10:06 -04:00
committed by Leshana
parent 35230b4e7c
commit ebe5cc916d
49 changed files with 479 additions and 366 deletions
@@ -1,8 +1,4 @@
// Keep these two together, they *must* be defined on both
// If /client ever becomes /datum/client or similar, they can be merged
/client/proc/get_view_variables_header()
return "<b>[src]</b>"
/datum/proc/get_view_variables_header()
return "<b>[src]</b>"
@@ -31,9 +27,6 @@
</font>
"}
// Same for these as for get_view_variables_header() above
/client/proc/get_view_variables_options()
return ""
/datum/proc/get_view_variables_options()
return ""
+1 -1
View File
@@ -187,4 +187,4 @@
if(radio_controller)
radio_controller.remove_object(src,frequency)
frequency = 0
..()
. = ..()
+4
View File
@@ -1,4 +1,8 @@
/client
//////////////////////
//BLACK MAGIC THINGS//
//////////////////////
parent_type = /datum
////////////////
//ADMIN THINGS//
////////////////
+3
View File
@@ -181,6 +181,9 @@
clients -= src
return ..()
/client/Destroy()
..()
return QDEL_HINT_HARDDEL_NOW
// here because it's similar to below
@@ -116,7 +116,7 @@
var/obj/effect/plant/child = new(get_turf(src),seed,parent)
spawn(1) // This should do a little bit of animation.
if(deleted(child))
if(QDELETED(child))
return
//move out to the destination
+1 -1
View File
@@ -131,4 +131,4 @@
T.lighting_overlay = null
T.luminosity = 1
return ..()
. = ..()
@@ -443,7 +443,7 @@ var/global/list/damage_icon_parts = list()
//For legacy support.
/mob/living/carbon/human/regenerate_icons()
..()
if(transforming) return
if(transforming || QDELETED(src)) return
update_mutations(0)
update_body(0)
@@ -184,7 +184,7 @@
wrapped.force = 0.0
wrapped.attack(M,user)
M.attackby(wrapped, user) //attackby reportedly gets procced by being clicked on, at least according to Anewbe.
if(deleted(wrapped) || wrapped.loc != src.loc)
if(QDELETED(wrapped) || wrapped.loc != src.loc)
wrapped = null
return 1
return 0
+1
View File
@@ -14,6 +14,7 @@
spellremove(src)
ghostize()
..()
return QDEL_HINT_HARDDEL_NOW
/mob/proc/remove_screen_obj_references()
hands = null
+9 -3
View File
@@ -83,7 +83,9 @@
//This makes sure that the grab screen object is displayed in the correct hand.
/obj/item/weapon/grab/proc/synch()
/obj/item/weapon/grab/proc/synch() //why is this needed?
if(QDELETED(src))
return
if(affecting)
if(assailant.r_hand == src)
hud.screen_loc = ui_rhand
@@ -91,7 +93,7 @@
hud.screen_loc = ui_lhand
/obj/item/weapon/grab/process()
if(gcDestroyed) // GC is trying to delete us, we'll kill our processing so we can cleanly GC
if(QDELETED(src)) // GC is trying to delete us, we'll kill our processing so we can cleanly GC
return PROCESS_KILL
confirm()
@@ -221,6 +223,8 @@
animate(affecting, pixel_x =-shift, pixel_y = 0, 5, 1, LINEAR_EASING)
/obj/item/weapon/grab/proc/s_click(obj/screen/S)
if(QDELETED(src))
return
if(!affecting)
return
if(state == GRAB_UPGRADING)
@@ -291,6 +295,8 @@
return 1
/obj/item/weapon/grab/attack(mob/M, mob/living/user)
if(QDELETED(src))
return
if(!affecting)
return
if(world.time < (last_action + 20))
@@ -336,7 +342,7 @@
/obj/item/weapon/grab/dropped()
loc = null
if(!destroying)
if(!QDELETED(src))
qdel(src)
/obj/item/weapon/grab/proc/reset_kill_state()
+2 -4
View File
@@ -67,10 +67,8 @@
brainmob.client.screen.len = null //clear the hud
/obj/item/organ/internal/brain/Destroy()
if(brainmob)
qdel(brainmob)
brainmob = null
..()
qdel_null(brainmob)
. = ..()
/obj/item/organ/internal/brain/proc/transfer_identity(var/mob/living/carbon/H)
+1 -1
View File
@@ -23,7 +23,7 @@
chemical_reagents_list[D.id] = D
/datum/reagents/Destroy()
..()
. = ..()
if(chemistryProcess)
chemistryProcess.active_holders -= src
+1 -1
View File
@@ -488,7 +488,7 @@
var/amount_to_take = max(0,min(stack.amount,round(remaining_volume/REAGENTS_PER_SHEET)))
if(amount_to_take)
stack.use(amount_to_take)
if(deleted(stack))
if(QDELETED(stack))
holdingitems -= stack
beaker.reagents.add_reagent(sheet_reagents[stack.type], (amount_to_take*REAGENTS_PER_SHEET))
continue
+1 -1
View File
@@ -118,8 +118,8 @@
return null
/datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
..()
holder = null
. = ..()
/* DEPRECATED - TODO: REMOVE EVERYWHERE */
@@ -210,8 +210,8 @@
/obj/item/weapon/reagent_containers/food/snacks/Destroy()
if(contents)
for(var/atom/movable/something in contents)
something.loc = get_turf(src)
..()
something.dropInto(loc)
. = ..()
////////////////////////////////////////////////////////////////////////////////
/// FOOD END
+3 -3
View File
@@ -55,7 +55,7 @@
check_failure()
set_opacity(1)
spawn(20) if(!deleted(src)) set_opacity(0)
spawn(20) if(!QDELETED(src)) set_opacity(0)
..()
@@ -64,7 +64,7 @@
..()
check_failure()
set_opacity(1)
spawn(20) if(!deleted(src)) set_opacity(0)
spawn(20) if(!QDELETED(src)) set_opacity(0)
/obj/machinery/shield/ex_act(severity)
switch(severity)
@@ -114,7 +114,7 @@
//The shield becomes dense to absorb the blow.. purely asthetic.
set_opacity(1)
spawn(20) if(!deleted(src)) set_opacity(0)
spawn(20) if(!QDELETED(src)) set_opacity(0)
..()
return
+1 -1
View File
@@ -79,7 +79,7 @@
update_connections(1) // Update tables around us to ignore us (material=null forces no connections)
for(var/obj/structure/table/T in oview(src, 1))
T.update_icon()
..()
. = ..()
/obj/structure/table/examine(mob/user)
. = ..()