Machine construction.

This commit is contained in:
davipatury
2017-03-27 19:00:01 -03:00
parent b91fbe264e
commit 82d8e6ad5c
5 changed files with 23 additions and 11 deletions
+1 -1
View File
@@ -217,7 +217,7 @@ Pipelines + Other Objects -> Pipe network
qdel(src)
/obj/machinery/atmospherics/construction(D, P, C)
/obj/machinery/atmospherics/on_construction(D, P, C)
if(C)
color = C
dir = D
+2 -2
View File
@@ -44,7 +44,7 @@
min_temperature = max(0,T0C - (170 + (T*15)))
current_heat_capacity = 1000 * ((H - 1) ** 2)
/obj/machinery/atmospherics/unary/cold_sink/freezer/construction()
/obj/machinery/atmospherics/unary/cold_sink/freezer/on_construction()
..(dir,dir)
/obj/machinery/atmospherics/unary/cold_sink/freezer/attackby(obj/item/I, mob/user, params)
@@ -193,7 +193,7 @@
component_parts += new /obj/item/stack/cable_coil(src, 1)
RefreshParts()
/obj/machinery/atmospherics/unary/heat_reservoir/heater/construction()
/obj/machinery/atmospherics/unary/heat_reservoir/heater/on_construction()
..(dir,dir)
/obj/machinery/atmospherics/unary/heat_reservoir/heater/RefreshParts()
+6
View File
@@ -19,6 +19,12 @@
overlay_layer = layer
..()
/obj/machinery/computer/Destroy()
if(circuit)
qdel(circuit)
circuit = null
return ..()
/obj/machinery/computer/initialize()
..()
power_change()
+1 -1
View File
@@ -52,7 +52,7 @@
component_parts += new /obj/item/stack/cable_coil(null, 1)
RefreshParts()
/obj/machinery/atmospherics/unary/cryo_cell/construction()
/obj/machinery/atmospherics/unary/cryo_cell/on_construction()
..(dir,dir)
/obj/machinery/atmospherics/unary/cryo_cell/RefreshParts()
+13 -7
View File
@@ -396,15 +396,18 @@ Class Procs:
/obj/machinery/proc/default_deconstruction_crowbar(var/obj/item/weapon/crowbar/C, var/ignore_panel = 0)
if(istype(C) && (panel_open || ignore_panel))
playsound(loc, C.usesound, 50, 1)
spawn_frame()
for(var/obj/item/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.forceMove(loc)
qdel(src)
deconstruct()
return 1
return 0
/obj/machinery/proc/deconstruct()
on_deconstruction()
spawn_frame()
for(var/obj/item/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.forceMove(loc)
qdel(src)
/obj/machinery/proc/spawn_frame()
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc)
@@ -573,7 +576,10 @@ Class Procs:
return 0
//called on machinery construction (i.e from frame to machinery) but not on initialization
/obj/machinery/proc/construction()
/obj/machinery/proc/on_construction()
return
/obj/machinery/proc/on_deconstruction()
return
/obj/machinery/proc/can_be_overridden()