mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 23:23:28 +01:00
Machine construction.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
overlay_layer = layer
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/Destroy()
|
||||
if(circuit)
|
||||
qdel(circuit)
|
||||
circuit = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/initialize()
|
||||
..()
|
||||
power_change()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user