POLARIS: Fix several Destroy()s

This commit is contained in:
Arokha Sieyes
2018-02-20 00:20:46 -05:00
parent 71039bdd12
commit a75cfe0eb1
7 changed files with 26 additions and 10 deletions

View File

@@ -40,6 +40,10 @@ var/global/list/all_exonet_connections = list()
src.holder = holder src.holder = holder
..() ..()
/datum/exonet_protocol/Destroy()
remove_address()
holder = null
return ..()
// Proc: make_address() // Proc: make_address()
// Parameters: 1 (string - used to make into a hash that will be part of the new address) // Parameters: 1 (string - used to make into a hash that will be part of the new address)

View File

@@ -34,8 +34,7 @@
data_core.medical -= src data_core.medical -= src
data_core.general -= src data_core.general -= src
data_core.security -= src data_core.security -= src
..() . = ..()
return QDEL_HINT_FINDREFERENCE // If we must, we can resort to QDEL_HINT_HARDDEL. But lets see how this works in practice ~Leshana
/datum/data/text /datum/data/text
name = "text" name = "text"

View File

@@ -22,8 +22,10 @@
/datum/progressbar/Destroy() /datum/progressbar/Destroy()
if (client) if (client)
client.images -= bar client.images -= bar
qdel(bar) qdel_null(bar)
. = ..() user = null
client = null
return ..()
/datum/progressbar/proc/update(progress) /datum/progressbar/proc/update(progress)
//world << "Update [progress] - [goal] - [(progress / goal)] - [((progress / goal) * 100)] - [round(((progress / goal) * 100), 5)]" //world << "Update [progress] - [goal] - [(progress / goal)] - [((progress / goal) * 100)] - [round(((progress / goal) * 100), 5)]"

View File

@@ -287,17 +287,20 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
to_chat(voice, "<span class='danger'>\icon[src] Connection timed out with remote host.</span>") to_chat(voice, "<span class='danger'>\icon[src] Connection timed out with remote host.</span>")
qdel(voice) qdel(voice)
close_connection(reason = "Connection timed out") close_connection(reason = "Connection timed out")
//Clean up all references we might have to others
communicating.Cut() communicating.Cut()
voice_requests.Cut() voice_requests.Cut()
voice_invites.Cut() voice_invites.Cut()
node = null
//Clean up references that might point at us
all_communicators -= src all_communicators -= src
processing_objects -= src processing_objects -= src
listening_objects.Remove(src) listening_objects.Remove(src)
qdel(camera) qdel_null(camera)
camera = null qdel_null(exonet)
if(exonet)
exonet.remove_address()
exonet = null
return ..() return ..()
// Proc: update_icon() // Proc: update_icon()

View File

@@ -52,7 +52,9 @@
/obj/item/weapon/implant/Destroy() /obj/item/weapon/implant/Destroy()
if(part) if(part)
part.implants.Remove(src) part.implants.Remove(src)
listening_objects.Remove(src)
part = null part = null
imp_in = null
return ..() return ..()
/obj/item/weapon/implant/attackby(obj/item/I, mob/user) /obj/item/weapon/implant/attackby(obj/item/I, mob/user)
@@ -82,7 +84,6 @@
/obj/item/weapon/implant/tracking/implanted(var/mob/source) /obj/item/weapon/implant/tracking/implanted(var/mob/source)
processing_objects.Add(src) processing_objects.Add(src)
listening_objects |= src
return 1 return 1
/obj/item/weapon/implant/tracking/Destroy() /obj/item/weapon/implant/tracking/Destroy()

View File

@@ -94,6 +94,9 @@
var/invis_toggle = FALSE var/invis_toggle = FALSE
var/list/sub_planes var/list/sub_planes
/obj/screen/plane_master/New()
..(null) //Never be in anything ever.
/obj/screen/plane_master/proc/set_desired_alpha(var/new_alpha) /obj/screen/plane_master/proc/set_desired_alpha(var/new_alpha)
if(new_alpha != alpha && new_alpha > 0 && new_alpha <= 255) if(new_alpha != alpha && new_alpha > 0 && new_alpha <= 255)
desired_alpha = new_alpha desired_alpha = new_alpha

View File

@@ -5,6 +5,10 @@
/datum/nano_module/New(var/host) /datum/nano_module/New(var/host)
src.host = host src.host = host
/datum/nano_module/Destroy()
host = null
return ..()
/datum/nano_module/nano_host() /datum/nano_module/nano_host()
return host ? host : src return host ? host : src