Destroy tweaks.

Ports Destroy() proc tweaks from Paradise and /tg/, sourced from https://github.com/ParadiseSS13/Paradise/pull/2091.
Adds returns in Destroy()s, to prepare for future return values.
This commit is contained in:
PsiOmegaDelta
2015-09-25 10:40:05 +02:00
parent 36e61e45bf
commit 9dd1a54191
21 changed files with 85 additions and 58 deletions

View File

@@ -170,21 +170,19 @@
area.power_equip = 0
area.power_environ = 0
area.power_change()
if(wires)
qdel(wires)
wires = null
qdel(wires)
wires = null
qdel(terminal)
terminal = null
if(cell)
cell.loc = loc
cell.forceMove(loc)
cell = null
if(terminal)
qdel(terminal)
terminal = null
// Malf AI, removes the APC from AI's hacked APCs list.
if((hacker) && (hacker.hacked_apcs) && (src in hacker.hacked_apcs))
hacker.hacked_apcs -= src
..()
return ..()
/obj/machinery/power/apc/proc/make_terminal()
// create a terminal object at the same position as original turf loc
@@ -468,7 +466,7 @@
return
user.drop_item()
W.loc = src
W.forceMove(src)
cell = W
user.visible_message(\
"<span class='warning'>[user.name] has inserted the power cell to [src.name]!</span>",\

View File

@@ -127,7 +127,7 @@
/obj/machinery/power/port_gen/pacman/Destroy()
DropFuel()
..()
return ..()
/obj/machinery/power/port_gen/pacman/RefreshParts()
var/temp_rating = 0
@@ -245,11 +245,11 @@
sheets = 0
sheet_left = 0
..()
/obj/machinery/power/port_gen/pacman/emag_act(var/remaining_charges, var/mob/user)
if (active && prob(25))
explode() //if they're foolish enough to emag while it's running
if (!emagged)
emagged = 1
return 1

View File

@@ -30,7 +30,9 @@
/obj/machinery/particle_accelerator/control_box/Destroy()
if(active)
toggle_power()
..()
qdel(wires)
wires = null
return ..()
/obj/machinery/particle_accelerator/control_box/attack_hand(mob/user as mob)
if(construction_state >= 3)

View File

@@ -76,11 +76,11 @@
should_be_mapped = 1
/obj/machinery/power/smes/buildable/Destroy()
..()
qdel(wires)
wires = null
for(var/datum/nano_module/rcon/R in world)
R.FindDevices()
return ..()
// Proc: process()
// Parameters: None