Add wires/radio Destroy().

This commit is contained in:
ESwordTheCat
2014-07-18 01:19:44 -08:00
parent c97874c64b
commit c779c35e46
2 changed files with 10 additions and 1 deletions

View File

@@ -48,6 +48,10 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
var/list/wires = same_wires[holder_type]
src.wires = wires // Reference the wires list.
/datum/wires/Destroy()
if(holder)
holder = null
/datum/wires/proc/GenerateWires()
var/list/colours_to_pick = wireColours.Copy() // Get a copy, not a reference.
var/list/indexes_to_pick = list()

View File

@@ -838,4 +838,9 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
R.radio = null
..()
if(wires)
wires.Destroy()
wires = null
..()