Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor fixes #770

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion code/controllers/subsystem/processing/processing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion code/modules/modular_computers/hardware/recharger.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading