Fix a use_power() runtime if the object was in nullspace (was qdel()'d)

Also remove some debug shit in atmospherics I left around.
This commit is contained in:
MrPerson
2014-03-03 01:16:21 -08:00
parent 3c58091437
commit 20027aa442
2 changed files with 1 additions and 36 deletions
-35
View File
@@ -28,41 +28,6 @@ obj/machinery/atmospherics/process()
return PROCESS_KILL
build_network()
/*
obj/machinery/atmospherics/Destroy()
worldm << "Pre Destroy()"
test_pipenet()
..()
world << "Post Destroy()"
test_pipenet()
obj/machinery/atmospherics/verb/test_pipenet()
set src in view()
var/found = 0
var/srcref = "\ref[src]"
var/netref = ""
var/pipelineref = ""
for(var/datum/pipe_network/Network in pipe_networks)
netref = "\ref[Network]"
for(var/obj/machinery/atmospherics/AT in Network.normal_members)
if(AT == src)
world << "Found <A HREF='?_src_=vars;Vars=\ref[src]'>[srcref] - [src.type]</A> in normal_members of pipenet#<A HREF='?_src_=vars;Vars=\ref[Network]'>[netref]</A>"
found++
for(var/datum/pipeline/PL in Network.line_members)
pipelineref = "\ref[PL]"
for(var/obj/machinery/atmospherics/AT in PL.members)
if(AT == src)
world << "Found <A HREF='?_src_=vars;Vars=\ref[src]'>[srcref] - [src.type]</A> in members of pipeline#<A HREF='?_src_=vars;Vars=\ref[PL]'>[pipelineref]</A> in pipenet#<A HREF='?_src_=vars;Vars=\ref[Network]'>[netref]</A>"
found++
for(var/obj/machinery/atmospherics/ATE in PL.edges)
if(ATE == src)
world << "Found <A HREF='?_src_=vars;Vars=\ref[src]'>[srcref] - [src.type]</A> in edges of pipeline#<A HREF='?_src_=vars;Vars=\ref[PL]'>[pipelineref]</A> in pipenet#<A HREF='?_src_=vars;Vars=\ref[Network]'>[netref]</A>"
found++
if(!found)
world << "Unable to find <A HREF='?_src_=vars;Vars=\ref[src]'>[srcref]</A> in any pipenets"
*/
obj/machinery/atmospherics/proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
// Check to see if should be added to network. Add self if so and adjust variables appropriately.
// Note don't forget to have neighbors look as well!
+1 -1
View File
@@ -58,7 +58,7 @@
// increment the power usage stats for an area
/obj/machinery/proc/use_power(var/amount, var/chan = -1) // defaults to power_channel
var/area/A = src.loc.loc // make sure it's in an area
var/area/A = get_area(src) // make sure it's in an area
if(!A || !isarea(A) || !A.master)
return
if(chan == -1)