Adds Destroys.

This commit is contained in:
PsiOmega
2015-04-24 17:11:14 +02:00
parent 1ae0ad6d92
commit e7d85f8edc
91 changed files with 475 additions and 190 deletions
+35 -3
View File
@@ -43,6 +43,11 @@
air_contents.volume = PRESSURE_TANK_VOLUME
update()
/obj/machinery/disposal/Destroy()
eject()
if(trunk)
trunk.linked = null
..()
// attack by item places it in to disposal
/obj/machinery/disposal/attackby(var/obj/item/I, var/mob/user)
@@ -638,6 +643,11 @@
location.assume_air(gas) // vent all gas to turf
return
/obj/structure/disposalholder/Destroy()
qdel(gas)
active = 0
..()
// Disposal pipes
/obj/structure/disposalpipe
@@ -663,7 +673,7 @@
// pipe is deleted
// ensure if holder is present, it is expelled
Del()
Destroy()
var/obj/structure/disposalholder/H = locate() in src
if(H)
// holder was present
@@ -920,6 +930,30 @@
qdel(src)
// pipe is deleted
// ensure if holder is present, it is expelled
/obj/structure/disposalpipe/Destroy()
var/obj/structure/disposalholder/H = locate() in src
if(H)
// holder was present
H.active = 0
var/turf/T = src.loc
if(T.density)
// deleting pipe is inside a dense turf (wall)
// this is unlikely, but just dump out everything into the turf in case
for(var/atom/movable/AM in H)
AM.loc = T
AM.pipe_eject(0)
qdel(H)
..()
return
// otherwise, do normal expel from turf
if(H)
expel(H, T, 0)
..()
// *** TEST verb
//client/verb/dispstop()
// for(var/obj/structure/disposalholder/H in world)
@@ -1468,8 +1502,6 @@
user << "You need more welding fuel to complete this task."
return
// called when movable is expelled from a disposal pipe or outlet
// by default does nothing, override for special behaviour
@@ -307,6 +307,16 @@
return
/obj/structure/bigDelivery/Destroy()
if(wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
wrapped.loc = (get_turf(loc))
if(istype(wrapped, /obj/structure/closet))
var/obj/structure/closet/O = wrapped
O.welded = 0
var/turf/T = get_turf(src)
for(var/atom/movable/AM in contents)
AM.loc = T
..()
/obj/item/device/destTagger
name = "destination tagger"
@@ -440,3 +450,8 @@
else
user << "You need more welding fuel to complete this task."
return
/obj/machinery/disposal/deliveryChute/Destroy()
if(trunk)
trunk.linked = null
..()