mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 20:47:10 +01:00
SS Conversion: Atoms, Machines, n' Mobs
This converts the machine and mob processes to the SMC. Additionally, it adds the Atom subsystem, which handles all Initialize() calls in place of the old gameticker. Due to incompatibility with our atmospherics (FUCK OUR ATMOSPHERICS FOR FUCKING EVER JESUS CHRIST WHO THE FUCK MADE THIS PIECE OF GODDAMN SHIT) atmospherics machines do not use Initialize() as they should, instead opting for a custom atmos_init proc that the air controller handles.
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
nullifyPipenet(parent2)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/initialize()
|
||||
/obj/machinery/atmospherics/binary/atmos_init()
|
||||
..()
|
||||
var/node2_connect = dir
|
||||
var/node1_connect = turn(dir, 180)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/initialize()
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/atmos_init()
|
||||
..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
@@ -90,7 +90,7 @@
|
||||
else
|
||||
vent_icon += "[on ? "[pump_direction ? "out" : "in"]" : "off"]"
|
||||
|
||||
overlays += icon_manager.get_atmos_icon("device", , , vent_icon)
|
||||
overlays += GLOB.pipe_icon_manager.get_atmos_icon("device", , , vent_icon)
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/update_underlays()
|
||||
if(..())
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/initialize()
|
||||
/obj/machinery/atmospherics/binary/passive_gate/atmos_init()
|
||||
..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
@@ -110,7 +110,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/initialize()
|
||||
/obj/machinery/atmospherics/binary/pump/atmos_init()
|
||||
..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
if(frequency)
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/digital/initialize()
|
||||
/obj/machinery/atmospherics/binary/valve/digital/atmos_init()
|
||||
..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
@@ -38,7 +38,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
on = 1
|
||||
icon_state = "map_on"
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/initialize()
|
||||
/obj/machinery/atmospherics/binary/volume_pump/atmos_init()
|
||||
..()
|
||||
set_frequency(frequency)
|
||||
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
/datum/omni_port/proc/connect()
|
||||
if(node)
|
||||
return
|
||||
master.initialize()
|
||||
master.atmos_init()
|
||||
if(node)
|
||||
node.initialize()
|
||||
node.atmos_init()
|
||||
node.addMember(master)
|
||||
master.build_network()
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
nullifyPipenet(P.parent)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/omni/initialize()
|
||||
/obj/machinery/atmospherics/omni/atmos_init()
|
||||
..()
|
||||
for(var/datum/omni_port/P in ports)
|
||||
if(P.node || P.mode == 0)
|
||||
@@ -143,11 +143,11 @@
|
||||
|
||||
//directional icons are layers 1-4, with the core icon on layer 5
|
||||
if(core_icon)
|
||||
overlays_off[5] = icon_manager.get_atmos_icon("omni", , , core_icon)
|
||||
overlays_on[5] = icon_manager.get_atmos_icon("omni", , , core_icon + "_glow")
|
||||
overlays_off[5] = GLOB.pipe_icon_manager.get_atmos_icon("omni", , , core_icon)
|
||||
overlays_on[5] = GLOB.pipe_icon_manager.get_atmos_icon("omni", , , core_icon + "_glow")
|
||||
|
||||
overlays_error[1] = icon_manager.get_atmos_icon("omni", , , core_icon)
|
||||
overlays_error[2] = icon_manager.get_atmos_icon("omni", , , "error")
|
||||
overlays_error[1] = GLOB.pipe_icon_manager.get_atmos_icon("omni", , , core_icon)
|
||||
overlays_error[2] = GLOB.pipe_icon_manager.get_atmos_icon("omni", , , "error")
|
||||
|
||||
/obj/machinery/atmospherics/omni/proc/update_port_icons()
|
||||
if(!check_icon_cache())
|
||||
@@ -203,19 +203,19 @@
|
||||
ic_on += "_filter"
|
||||
ic_off += "_out"
|
||||
|
||||
ic_on = icon_manager.get_atmos_icon("omni", , , ic_on)
|
||||
ic_off = icon_manager.get_atmos_icon("omni", , , ic_off)
|
||||
ic_on = GLOB.pipe_icon_manager.get_atmos_icon("omni", , , ic_on)
|
||||
ic_off = GLOB.pipe_icon_manager.get_atmos_icon("omni", , , ic_off)
|
||||
|
||||
var/pipe_state
|
||||
var/turf/T = get_turf(src)
|
||||
if(!istype(T))
|
||||
return
|
||||
if(T.intact && istype(P.node, /obj/machinery/atmospherics/pipe) && P.node.level == 1 )
|
||||
//pipe_state = icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node))
|
||||
pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "down")
|
||||
//pipe_state = GLOB.pipe_icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node))
|
||||
pipe_state = GLOB.pipe_icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "down")
|
||||
else
|
||||
//pipe_state = icon_manager.get_atmos_icon("underlay_intact", P.dir, color_cache_name(P.node))
|
||||
pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "intact")
|
||||
//pipe_state = GLOB.pipe_icon_manager.get_atmos_icon("underlay_intact", P.dir, color_cache_name(P.node))
|
||||
pipe_state = GLOB.pipe_icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "intact")
|
||||
|
||||
return list("on_icon" = ic_on, "off_icon" = ic_off, "pipe_icon" = pipe_state)
|
||||
|
||||
@@ -241,6 +241,7 @@
|
||||
for(var/datum/omni_port/P in ports)
|
||||
if(!P.parent)
|
||||
P.parent = new /datum/pipeline()
|
||||
log_debug("[P.type] \[\ref[P]] added to parent (omni_base, 244)")
|
||||
P.parent.build_pipeline(src)
|
||||
..()
|
||||
|
||||
@@ -282,6 +283,7 @@
|
||||
for(var/datum/omni_port/PO in ports)
|
||||
if(A == PO.node)
|
||||
PO.parent = P
|
||||
log_debug("[PO.type] \[\ref[PO]] added to parent (omni_base, 286)")
|
||||
|
||||
/obj/machinery/atmospherics/omni/returnPipenet(obj/machinery/atmospherics/A)
|
||||
for(var/datum/omni_port/P in ports)
|
||||
@@ -292,6 +294,7 @@
|
||||
for(var/datum/omni_port/P in ports)
|
||||
if(Old == P.parent)
|
||||
P.parent = New
|
||||
log_debug("[P.type] \[\ref[P]] added to parent (omni_base, 297)")
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/omni/process_atmos()
|
||||
|
||||
@@ -149,7 +149,7 @@ Filter types:
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/initialize()
|
||||
/obj/machinery/atmospherics/trinary/filter/atmos_init()
|
||||
set_frequency(frequency)
|
||||
..()
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
nullifyPipenet(parent3)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/trinary/initialize()
|
||||
/obj/machinery/atmospherics/trinary/atmos_init()
|
||||
..()
|
||||
//Mixer:
|
||||
//1 and 2 is input
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
if(frequency)
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/digital/initialize()
|
||||
/obj/machinery/atmospherics/trinary/tvalve/digital/atmos_init()
|
||||
..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_exchanger/initialize()
|
||||
/obj/machinery/atmospherics/unary/heat_exchanger/atmos_init()
|
||||
if(!partner)
|
||||
var/partner_connect = turn(dir,180)
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/initialize()
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/atmos_init()
|
||||
..()
|
||||
set_frequency(frequency)
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
nullifyPipenet(parent)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/unary/initialize()
|
||||
/obj/machinery/atmospherics/unary/atmos_init()
|
||||
..()
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src, dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
@@ -43,9 +43,9 @@
|
||||
node.disconnect(src)
|
||||
node = null
|
||||
nullifyPipenet(parent)
|
||||
initialize()
|
||||
atmos_init()
|
||||
if(node)
|
||||
node.initialize()
|
||||
node.atmos_init()
|
||||
node.addMember(src)
|
||||
build_network()
|
||||
. = 1
|
||||
@@ -54,6 +54,7 @@
|
||||
if(!parent)
|
||||
parent = new /datum/pipeline()
|
||||
parent.build_pipeline(src)
|
||||
log_debug("[type] \[\ref[src]] added to parent (unary_base, 57)")
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/unary/disconnect(obj/machinery/atmospherics/reference)
|
||||
@@ -79,6 +80,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/unary/setPipenet(datum/pipeline/P)
|
||||
parent = P
|
||||
log_debug("[type] \[\ref[src]] added to parent (unary_base, 83)")
|
||||
|
||||
/obj/machinery/atmospherics/unary/returnPipenet()
|
||||
return parent
|
||||
@@ -86,6 +88,7 @@
|
||||
/obj/machinery/atmospherics/unary/replacePipenet(datum/pipeline/Old, datum/pipeline/New)
|
||||
if(Old == parent)
|
||||
parent = New
|
||||
log_debug("[type] \[\ref[src]] added to parent (unary_base, 91)")
|
||||
|
||||
/obj/machinery/atmospherics/unary/unsafe_pressure_release(var/mob/user,var/pressures)
|
||||
..()
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
else
|
||||
vent_icon += "[on ? "[pump_direction ? "out" : "in"]" : "off"]"
|
||||
|
||||
overlays += icon_manager.get_atmos_icon("device", , , vent_icon)
|
||||
overlays += GLOB.pipe_icon_manager.get_atmos_icon("device", , , vent_icon)
|
||||
|
||||
update_pipe_image()
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/initialize()
|
||||
/obj/machinery/atmospherics/unary/vent_pump/atmos_init()
|
||||
..()
|
||||
|
||||
//some vents work his own special way
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
if(welded)
|
||||
scrubber_icon = "scrubberweld"
|
||||
|
||||
overlays += icon_manager.get_atmos_icon("device", , , scrubber_icon)
|
||||
overlays += GLOB.pipe_icon_manager.get_atmos_icon("device", , , scrubber_icon)
|
||||
update_pipe_image()
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/update_underlays()
|
||||
@@ -169,7 +169,7 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/initialize()
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/atmos_init()
|
||||
..()
|
||||
radio_filter_in = frequency==initial(frequency)?(RADIO_FROM_AIRALARM):null
|
||||
radio_filter_out = frequency==initial(frequency)?(RADIO_TO_AIRALARM):null
|
||||
|
||||
Reference in New Issue
Block a user