mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-31 07:58:22 +01:00
Merge pull request #9073 from PsiOmegaDelta/QDels
Implementing Destroy():s
This commit is contained in:
@@ -155,32 +155,36 @@
|
||||
if (building==0)
|
||||
init()
|
||||
else
|
||||
area = src.loc.loc:master
|
||||
area = get_area(src)
|
||||
area.apc |= src
|
||||
opened = 1
|
||||
operating = 0
|
||||
name = "[area.name] APC"
|
||||
stat |= MAINT
|
||||
src.update_icon()
|
||||
spawn(5)
|
||||
src.update()
|
||||
|
||||
/obj/machinery/power/apc/initialize()
|
||||
..()
|
||||
src.update()
|
||||
|
||||
/obj/machinery/power/apc/Destroy()
|
||||
if(operating && malf && src.z in config.station_levels) //if (is_type_in_list(get_area(src), the_station_areas))
|
||||
malf.hacked_apcs -= src
|
||||
|
||||
area.apc -= src
|
||||
area.power_light = 0
|
||||
area.power_equip = 0
|
||||
area.power_environ = 0
|
||||
area.power_change()
|
||||
if(wires)
|
||||
wires.Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
if(cell)
|
||||
cell.loc = loc
|
||||
cell = null
|
||||
if(terminal)
|
||||
disconnect_terminal()
|
||||
|
||||
qdel(terminal)
|
||||
terminal = null
|
||||
..()
|
||||
|
||||
/obj/machinery/power/apc/proc/make_terminal()
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
..()
|
||||
charge = maxcharge
|
||||
|
||||
spawn(5)
|
||||
updateicon()
|
||||
/obj/item/weapon/cell/initialize()
|
||||
..()
|
||||
updateicon()
|
||||
|
||||
/obj/item/weapon/cell/drain_power(var/drain_check, var/surge, var/amount = 0)
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
/obj/machinery/power/terminal/Destroy()
|
||||
if(master)
|
||||
master.disconnect_terminal()
|
||||
master = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/terminal/hide(var/i)
|
||||
@@ -36,4 +37,4 @@
|
||||
// Needed so terminals are not removed from machines list.
|
||||
// Powernet rebuilds need this to work properly.
|
||||
/obj/machinery/power/terminal/process()
|
||||
return 1
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user