Del The World: Unit testing for hard deletes (#59612)

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
LemonInTheDark
2021-08-15 21:09:26 -07:00
committed by GitHub
co-authored by SteelSlayer
parent 0304206af3
commit cd576ab519
91 changed files with 788 additions and 168 deletions
+4 -1
View File
@@ -30,6 +30,9 @@
var/obj/structure/closet/supplypod/centcompod/linked_pod
/mob/living/simple_animal/pet/gondola/gondolapod/Initialize(mapload, pod)
if(!pod)
stack_trace("Gondola pod created with no pod")
return INITIALIZE_HINT_QDEL
linked_pod = pod
name = linked_pod.name
desc = linked_pod.desc
@@ -73,6 +76,6 @@
update_appearance()
/mob/living/simple_animal/pet/gondola/gondolapod/death()
qdel(linked_pod) //Will cause the open() proc for the linked supplypod to be called with the "broken" parameter set to true, meaning that it will dump its contents on death
QDEL_NULL(linked_pod) //Will cause the open() proc for the linked supplypod to be called with the "broken" parameter set to true, meaning that it will dump its contents on death
qdel(src)
..()
+6
View File
@@ -552,6 +552,9 @@
/obj/effect/pod_landingzone_effect/Initialize(mapload, obj/structure/closet/supplypod/pod)
. = ..()
if(!pod)
stack_trace("Pod landingzone effect created with no pod")
return INITIALIZE_HINT_QDEL
transform = matrix() * 1.5
animate(src, transform = matrix()*0.01, time = pod.delays[POD_TRANSIT]+pod.delays[POD_FALLING])
@@ -570,6 +573,9 @@
/obj/effect/pod_landingzone/Initialize(mapload, podParam, single_order = null, clientman)
. = ..()
if(!podParam)
stack_trace("Pod landingzone created with no pod")
return INITIALIZE_HINT_QDEL
if (ispath(podParam)) //We can pass either a path for a pod (as expressconsoles do), or a reference to an instantiated pod (as the centcom_podlauncher does)
podParam = new podParam() //If its just a path, instantiate it
pod = podParam