From aceb38b6d7f57e946afcc111eac37cf861cdc41b Mon Sep 17 00:00:00 2001 From: Kapu1178 <75460809+Kapu1178@users.noreply.github.com> Date: Tue, 16 Jan 2024 14:35:13 -0500 Subject: [PATCH 1/2] minor fixes --- .../subsystem/processing/processing.dm | 5 ++- code/game/objects/items/RPD.dm | 1 + .../components/binary_devices/dp_vent_pump.dm | 38 +++++++++++++++++-- .../components/trinary_devices/filter.dm | 2 +- .../modular_computers/hardware/recharger.dm | 1 - 5 files changed, 40 insertions(+), 7 deletions(-) diff --git a/code/controllers/subsystem/processing/processing.dm b/code/controllers/subsystem/processing/processing.dm index 3bf0ed3eb006..35160c299c74 100644 --- a/code/controllers/subsystem/processing/processing.dm +++ b/code/controllers/subsystem/processing/processing.dm @@ -54,5 +54,8 @@ SUBSYSTEM_DEF(processing) */ /datum/proc/process(delta_time) set waitfor = FALSE - stack_trace("[type] called datum process, this is wasting CPU time.") + var/static/list/fuckups = list() + if(!(type in fuckups)) + stack_trace("[type] called datum process, this is wasting CPU time.") + fuckups += type return PROCESS_KILL diff --git a/code/game/objects/items/RPD.dm b/code/game/objects/items/RPD.dm index 98023b4d063e..6303ba6f76fc 100644 --- a/code/game/objects/items/RPD.dm +++ b/code/game/objects/items/RPD.dm @@ -29,6 +29,7 @@ GLOBAL_LIST_INIT(atmos_pipe_recipes, list( new /datum/pipe_info/pipe("Injector", /obj/machinery/atmospherics/components/unary/outlet_injector, TRUE), new /datum/pipe_info/pipe("Scrubber", /obj/machinery/atmospherics/components/unary/vent_scrubber, TRUE), new /datum/pipe_info/pipe("Unary Vent", /obj/machinery/atmospherics/components/unary/vent_pump, TRUE), + new /datum/pipe_info/pipe("Dual-Port Vent", /obj/machinery/atmospherics/components/binary/dp_vent_pump, TRUE), new /datum/pipe_info/pipe("Passive Vent", /obj/machinery/atmospherics/components/unary/passive_vent, TRUE), new /datum/pipe_info/pipe("Manual Valve", /obj/machinery/atmospherics/components/binary/valve, TRUE), new /datum/pipe_info/pipe("Digital Valve", /obj/machinery/atmospherics/components/binary/valve/digital, TRUE), diff --git a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm index caac0667f1af..4307a6456d13 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm @@ -20,7 +20,7 @@ hide = TRUE initial_volume = ATMOS_DEFAULT_VOLUME_PUMP ///Variable for radio frequency - var/frequency = 0 + var/frequency = FREQ_ATMOS_CONTROL ///Variable for radio id var/id = null ///Stores the radio connection @@ -36,10 +36,31 @@ ///Set the flag for the pressure bound var/pressure_checks = EXT_BOUND + var/radio_filter_in + var/radio_filter_out + +/obj/machinery/atmospherics/components/binary/dp_vent_pump/Initialize(mapload) + if(!id_tag) + id_tag = SSpackets.generate_net_id(src) + . = ..() + /obj/machinery/atmospherics/components/binary/dp_vent_pump/Destroy() + var/area/vent_area = get_area(src) + if(vent_area) + vent_area.air_vent_info -= id_tag + GLOB.air_vent_names -= id_tag + SSpackets.remove_object(src, frequency) + radio_connection = null return ..() +/obj/machinery/atmospherics/components/binary/dp_vent_pump/update_name() + . = ..() + if(override_naming) + return + var/area/vent_area = get_area(src) + name = "\proper [vent_area.name] [name] [id_tag]" + /obj/machinery/atmospherics/components/binary/dp_vent_pump/update_icon_nopipes() cut_overlays() if(showpipe) @@ -122,7 +143,7 @@ SSpackets.remove_object(src, frequency) frequency = new_frequency if(frequency) - radio_connection = SSpackets.add_object(src, frequency, filter = RADIO_ATMOSIA) + radio_connection = SSpackets.add_object(src, frequency, radio_filter_in) /** * Called in atmos_init(), send the component status to the radio device connected @@ -142,13 +163,22 @@ "external" = external_pressure_bound, "sigtype" = "status" )) - radio_connection.post_signal(signal, filter = RADIO_ATMOSIA) + + var/area/vent_area = get_area(src) + if(!GLOB.air_vent_names[id_tag]) + update_name() + GLOB.air_vent_names[id_tag] = name + + vent_area.air_vent_info[id_tag] = signal.data + radio_connection.post_signal(signal, filter = radio_filter_out) /obj/machinery/atmospherics/components/binary/dp_vent_pump/atmos_init() - ..() + radio_filter_in = frequency==FREQ_ATMOS_CONTROL?(RADIO_FROM_AIRALARM):null + radio_filter_out = frequency==FREQ_ATMOS_CONTROL?(RADIO_TO_AIRALARM):null if(frequency) set_frequency(frequency) broadcast_status() + ..() /obj/machinery/atmospherics/components/binary/dp_vent_pump/receive_signal(datum/signal/signal) if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command")) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index 41267ae13e75..37feeb3ef95e 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -206,7 +206,7 @@ icon_state = "filter_on-0" /obj/machinery/atmospherics/components/trinary/filter/atmos/n2 name = "nitrogen filter" - filter_type = list(GAS_N2O) + filter_type = list(GAS_NITROGEN) /obj/machinery/atmospherics/components/trinary/filter/atmos/o2 name = "oxygen filter" filter_type = list(GAS_OXYGEN) diff --git a/code/modules/modular_computers/hardware/recharger.dm b/code/modules/modular_computers/hardware/recharger.dm index e80d5706a1fd..b90d886f53ea 100644 --- a/code/modules/modular_computers/hardware/recharger.dm +++ b/code/modules/modular_computers/hardware/recharger.dm @@ -10,7 +10,6 @@ return FALSE /obj/item/computer_hardware/recharger/process() - ..() var/obj/item/computer_hardware/battery/battery_module = holder.all_components[MC_CELL] if(!holder || !battery_module || !battery_module.battery) return From 9f1094826c49894108f61324be4f35590782d328 Mon Sep 17 00:00:00 2001 From: Kapu1178 <75460809+Kapu1178@users.noreply.github.com> Date: Sat, 27 Jan 2024 01:37:28 -0500 Subject: [PATCH 2/2] the world isnt ready --- code/game/objects/items/RPD.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/game/objects/items/RPD.dm b/code/game/objects/items/RPD.dm index 6303ba6f76fc..98023b4d063e 100644 --- a/code/game/objects/items/RPD.dm +++ b/code/game/objects/items/RPD.dm @@ -29,7 +29,6 @@ GLOBAL_LIST_INIT(atmos_pipe_recipes, list( new /datum/pipe_info/pipe("Injector", /obj/machinery/atmospherics/components/unary/outlet_injector, TRUE), new /datum/pipe_info/pipe("Scrubber", /obj/machinery/atmospherics/components/unary/vent_scrubber, TRUE), new /datum/pipe_info/pipe("Unary Vent", /obj/machinery/atmospherics/components/unary/vent_pump, TRUE), - new /datum/pipe_info/pipe("Dual-Port Vent", /obj/machinery/atmospherics/components/binary/dp_vent_pump, TRUE), new /datum/pipe_info/pipe("Passive Vent", /obj/machinery/atmospherics/components/unary/passive_vent, TRUE), new /datum/pipe_info/pipe("Manual Valve", /obj/machinery/atmospherics/components/binary/valve, TRUE), new /datum/pipe_info/pipe("Digital Valve", /obj/machinery/atmospherics/components/binary/valve/digital, TRUE),