From ec10abc480bf7d1f9f1a50d357e0fc38c31798fb Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Sat, 10 Oct 2015 00:16:31 -0400 Subject: [PATCH] Last Few Destroy Fixes --- code/game/objects/effects/effect_system.dm | 48 +++++++++------------- code/modules/computer3/laptop.dm | 7 ++-- 2 files changed, 23 insertions(+), 32 deletions(-) diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index b99a445fed1..1be64e3c31e 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -454,6 +454,11 @@ steam.start() -- spawns the effect var/direction var/obj/chemholder + Destroy() + qdel(chemholder) + chemholder = null + return ..() + New() ..() chemholder = new/obj() @@ -548,35 +553,6 @@ steam.start() -- spawns the effect if(smoke) smoke.delete() src.total_smoke-- -// Goon compat. -/datum/effect/effect/system/chem_smoke_spread/fart - - set_up(var/mob/M, n = 5, c = 0, loca, direct) - if(n > 20) - n = 20 - number = n - cardinals = c - - chemholder.reagents.add_reagent("space_drugs", rand(1,10)) - - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - if(direct) - direction = direct - - var/contained = "\[[chemholder.reagents.get_reagent_ids()]\]" - var/area/A = get_area(location) - - var/where = "[A.name] | [location.x], [location.y]" - var/whereLink=formatJumpTo(location,where) - - var/more = "(?)" - message_admins("[M][more] produced a toxic fart in ([whereLink])[contained].", 0, 1) - log_game("[M][more] produced a toxic fart in ([where])[contained].") - - ///////////////////////////////////////////// // Sleep smoke ///////////////////////////////////////////// @@ -777,6 +753,10 @@ steam.start() -- spawns the effect var/processing = 1 var/on = 1 +/datum/effect/effect/system/ion_trail_follow/Destroy() + oldposition = null + return ..() + /datum/effect/effect/system/ion_trail_follow/set_up(atom/atom) attach(atom) @@ -810,6 +790,12 @@ steam.start() -- spawns the effect /datum/effect/effect/system/ion_trail_follow/space_trail var/turf/oldloc // secondary ion trail loc var/turf/currloc + +/datum/effect/effect/system/ion_trail_follow/space_trail/Destroy() + oldloc = null + currloc = null + return ..() + /datum/effect/effect/system/ion_trail_follow/space_trail/start() if(!src.on) src.on = 1 @@ -870,6 +856,10 @@ steam.start() -- spawns the effect var/processing = 1 var/on = 1 + Destroy() + oldposition = null + return ..() + set_up(atom/atom) attach(atom) oldposition = get_turf(atom) diff --git a/code/modules/computer3/laptop.dm b/code/modules/computer3/laptop.dm index b0789d6a740..037b505d779 100644 --- a/code/modules/computer3/laptop.dm +++ b/code/modules/computer3/laptop.dm @@ -52,7 +52,7 @@ O.forceMove(loc) usr << "\The [src] crumbles to pieces." spawn(5) - qdel(src) + qdel(src) return if(!stored_computer.manipulating) @@ -65,7 +65,7 @@ spawn(5) stored_computer.manipulating = 0 - qdel(src) + qdel(src) else usr << "\red You are already opening the computer!" @@ -73,8 +73,9 @@ AltClick() if(Adjacent(usr)) open_computer() - + Destroy() + ..() return QDEL_HINT_HARDDEL_NOW // Warning: GC'ing will cause the laptop to vanish when it next closes //Quickfix until Snapshot works out how he wants to redo power. ~Z