mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-22 05:17:38 +01:00
8111a8489b
Many, many, many items have inhand sprites in their .dmis but for whatever reasons do not display them in-game. This PR: 1. Updates many item definitions to point to their already-existing inhands correctly. This consists largely of held tools, but also gas tanks and jetpacks mounted in the suit storage slot. 2. Adds a few codersprites made by me for objects with either missing inhands or poorly matching mishands (IE, the tape recorder, which has a black case, reused the white inhand sprites of the health analyzer). The new sprites are modified or recolored variations of other inhand sprites from our repo, except for circuitboards which are new. <img width="444" height="400" alt="image" src="https://github.com/user-attachments/assets/7f107b9a-fe24-4e31-8f16-4d34768ee117" /> 3. Adds inhand sprites for Inflatables and Inflatable Boxes made by Tomixcomics. <img width="424" height="101" alt="image" src="https://github.com/user-attachments/assets/434107c4-8577-49a2-a58e-d6b014c03933" /> 4. Ports inhand sprites for the Hydraulic Rescue Tool from tg's Jaws of Life. <img width="224" height="94" alt="Screenshot 2026-02-07 172931" src="https://github.com/user-attachments/assets/070c7956-f6a8-4fb5-870f-10c64afcc8b3" /> 5. Some additional cleanup while in the area. The 'analyzer' has been renamed the 'gas analyzer' to be consistent with the other analyzer objects, standardized icon_state naming conventions where I saw oddballs, updated code docs to use DMDocs when in the area, etc. ### Asset Licenses The following assets that **have not** been created by myself are included in this PR: | Path | Original Author | License | | --- | --- | --- | | icons/obj/item/hydraulic_rescue_tool.dmi | [SomeAngryMiner (bee station)](https://github.com/BeeStation/BeeStation-Hornet/pull/2487), [maxymax (/tg/station)](https://github.com/tgstation/tgstation/pull/58616) | CC-BY-SA | | icons/obj/item/inflatables.dmi | [Tomixcomics](https://github.com/tomixcomics) | CC-BY-SA |
559 lines
16 KiB
Plaintext
559 lines
16 KiB
Plaintext
#define SIGNAL_OXYGEN 1
|
|
#define SIGNAL_PHORON 2
|
|
#define SIGNAL_NITROGEN 4
|
|
#define SIGNAL_CARBON_DIOXIDE 8
|
|
#define SIGNAL_HYDROGEN 16
|
|
#define SIGNAL_N2O 32
|
|
#define SIGNAL_HELIUM 64
|
|
#define SIGNAL_DEUTERIUM 128
|
|
#define SIGNAL_TRITIUM 256
|
|
#define SIGNAL_HELIUMFUEL 512
|
|
#define SIGNAL_SULFUR_DIOXIDE 1024
|
|
#define SIGNAL_NITROGEN_DIOXIDE 2048
|
|
#define SIGNAL_CHLORINE 4096
|
|
#define SIGNAL_WATERVAPOR 8192
|
|
|
|
/obj/machinery/air_sensor
|
|
name = "gas sensor"
|
|
desc = "Measures the gas content of the atmosphere around the sensor."
|
|
icon = 'icons/obj/stationobjs.dmi'
|
|
icon_state = "gsensor1"
|
|
anchored = TRUE
|
|
|
|
var/state = 0
|
|
|
|
var/id_tag
|
|
var/frequency = 1439
|
|
|
|
var/on = 1
|
|
var/output = 0
|
|
var/output_pressure = TRUE
|
|
var/output_temperature = TRUE
|
|
//Flags:
|
|
// 1 for oxygen concentration
|
|
// 2 for phoron concentration
|
|
// 4 for nitrogen concentration
|
|
// 8 for carbon dioxide concentration
|
|
// 16 for hydrogen concentration
|
|
// 32 for nitrous oxide concentration
|
|
// 64 for helium concentration
|
|
// 128 for deuterium concentration
|
|
// 256 for tritium concentration
|
|
// 512 for helium-3 concentration
|
|
// 1024 for sulfur dioxide concentration
|
|
// 2048 for nitrogen dioxide concentration
|
|
// 4096 for chlorine concentration
|
|
// 8192 for water vapor concentration
|
|
|
|
var/datum/radio_frequency/radio_connection
|
|
|
|
/obj/machinery/air_sensor/update_icon()
|
|
icon_state = "gsensor[on]"
|
|
|
|
/obj/machinery/air_sensor/process()
|
|
if(on)
|
|
var/datum/signal/signal = new
|
|
signal.transmission_method = TRANSMISSION_RADIO
|
|
signal.data["tag"] = id_tag
|
|
signal.data["timestamp"] = world.time
|
|
|
|
var/datum/gas_mixture/air_sample = return_air()
|
|
|
|
if(output_pressure)
|
|
signal.data["pressure"] = num2text(round(air_sample.return_pressure(),0.1),)
|
|
if(output_temperature)
|
|
signal.data["temperature"] = round(air_sample.temperature,0.1)
|
|
|
|
if(output)
|
|
var/total_moles = air_sample.total_moles
|
|
if(total_moles > 0)
|
|
if(output&SIGNAL_OXYGEN)
|
|
signal.data[GAS_OXYGEN] = round(100*air_sample.gas[GAS_OXYGEN]/total_moles,0.1)
|
|
if(output&SIGNAL_PHORON)
|
|
signal.data[GAS_PHORON] = round(100*air_sample.gas[GAS_PHORON]/total_moles,0.1)
|
|
if(output&SIGNAL_NITROGEN)
|
|
signal.data[GAS_NITROGEN] = round(100*air_sample.gas[GAS_NITROGEN]/total_moles,0.1)
|
|
if(output&SIGNAL_CARBON_DIOXIDE)
|
|
signal.data[GAS_CO2] = round(100*air_sample.gas[GAS_CO2]/total_moles,0.1)
|
|
if(output&SIGNAL_HYDROGEN)
|
|
signal.data[GAS_HYDROGEN] = round(100*air_sample.gas[GAS_HYDROGEN]/total_moles,0.1)
|
|
if(output&SIGNAL_N2O)
|
|
signal.data[GAS_N2O] = round(100*air_sample.gas[GAS_N2O]/total_moles,0.1)
|
|
if(output&SIGNAL_HELIUM)
|
|
signal.data[GAS_HELIUM] = round(100*air_sample.gas[GAS_HELIUM]/total_moles,0.1)
|
|
if(output&SIGNAL_DEUTERIUM)
|
|
signal.data[GAS_DEUTERIUM] = round(100*air_sample.gas[GAS_DEUTERIUM]/total_moles,0.1)
|
|
if(output&SIGNAL_TRITIUM)
|
|
signal.data[GAS_TRITIUM] = round(100*air_sample.gas[GAS_TRITIUM]/total_moles,0.1)
|
|
if(output&SIGNAL_HELIUMFUEL)
|
|
signal.data[GAS_HELIUMFUEL] = round(100*air_sample.gas[GAS_HELIUMFUEL]/total_moles,0.1)
|
|
if(output&SIGNAL_SULFUR_DIOXIDE)
|
|
signal.data[GAS_SULFUR] = round(100*air_sample.gas[GAS_SULFUR]/total_moles,0.1)
|
|
if(output&SIGNAL_NITROGEN_DIOXIDE)
|
|
signal.data[GAS_NO2] = round(100*air_sample.gas[GAS_NO2]/total_moles,0.1)
|
|
if(output&SIGNAL_CHLORINE)
|
|
signal.data[GAS_CHLORINE] = round(100*air_sample.gas[GAS_CHLORINE]/total_moles,0.1)
|
|
if(output&SIGNAL_WATERVAPOR)
|
|
signal.data[GAS_WATERVAPOR] = round(100*air_sample.gas[GAS_WATERVAPOR]/total_moles,0.1)
|
|
else
|
|
signal.data[GAS_OXYGEN] = 0
|
|
signal.data[GAS_PHORON] = 0
|
|
signal.data[GAS_NITROGEN] = 0
|
|
signal.data[GAS_CO2] = 0
|
|
signal.data[GAS_HYDROGEN] = 0
|
|
signal.data[GAS_N2O] = 0
|
|
signal.data[GAS_HELIUM] = 0
|
|
signal.data[GAS_DEUTERIUM] = 0
|
|
signal.data[GAS_TRITIUM] = 0
|
|
signal.data[GAS_HELIUMFUEL] = 0
|
|
signal.data[GAS_SULFUR] = 0
|
|
signal.data[GAS_NO2] = 0
|
|
signal.data[GAS_CHLORINE] = 0
|
|
signal.data[GAS_WATERVAPOR]= 0
|
|
signal.data["sigtype"]="status"
|
|
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
|
|
|
|
|
/obj/machinery/air_sensor/proc/set_frequency(new_frequency)
|
|
SSradio.remove_object(src, frequency)
|
|
frequency = new_frequency
|
|
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
|
|
|
|
/obj/machinery/air_sensor/Initialize()
|
|
. = ..()
|
|
set_frequency(frequency)
|
|
|
|
/obj/machinery/air_sensor/Destroy()
|
|
if(SSradio)
|
|
SSradio.remove_object(src,frequency)
|
|
return ..()
|
|
|
|
/obj/machinery/computer/general_air_control
|
|
name = "atmosphere monitoring console"
|
|
desc = "A console that gives an atmospheric condition readout of various sensors connected to it."
|
|
icon_screen = "tank"
|
|
icon_keyboard = "cyan_key"
|
|
icon_keyboard_emis = "cyan_key_mask"
|
|
light_color = LIGHT_COLOR_CYAN
|
|
|
|
var/frequency = 1439
|
|
var/list/sensors = list()
|
|
|
|
var/list/sensor_information = list()
|
|
var/datum/radio_frequency/radio_connection
|
|
var/ui_type = "AtmosControl"
|
|
circuit = /obj/item/circuitboard/air_management
|
|
|
|
/obj/machinery/computer/general_air_control/Destroy()
|
|
if(SSradio)
|
|
SSradio.remove_object(src, frequency)
|
|
return ..()
|
|
|
|
/obj/machinery/computer/general_air_control/ui_data(mob/user)
|
|
var/list/data = list("sensors" = list())
|
|
data["control"] = null
|
|
for(var/id_tag in sensors)
|
|
var/long_name = sensors[id_tag]
|
|
var/list/sdata = sensor_information[id_tag]
|
|
var/list/sensor_data = list("id_tag" = id_tag, "name" = long_name)
|
|
sensor_data["datapoints"] = list()
|
|
for(var/datapoint in list("pressure", "temperature", GAS_OXYGEN, GAS_NITROGEN, GAS_CO2, GAS_PHORON, GAS_HYDROGEN, GAS_N2O, GAS_HELIUM, GAS_DEUTERIUM, GAS_TRITIUM, GAS_HELIUMFUEL, GAS_SULFUR, GAS_NO2, GAS_CHLORINE, GAS_WATERVAPOR))
|
|
var/unit
|
|
if(datapoint == "pressure")
|
|
unit = "kPa"
|
|
else if(datapoint == "temperature")
|
|
unit = "K"
|
|
else
|
|
unit = "%"
|
|
sensor_data["datapoints"] += list(list("datapoint" = datapoint, "data" = sdata[datapoint], "unit" = unit))
|
|
data["sensors"] += list(sensor_data)
|
|
sensor_data = list()
|
|
return data
|
|
|
|
/obj/machinery/computer/general_air_control/attack_hand(mob/user)
|
|
ui_interact(user)
|
|
|
|
/obj/machinery/computer/general_air_control/ui_interact(mob/user, var/datum/tgui/ui)
|
|
ui = SStgui.try_update_ui(user, src, ui)
|
|
if(!ui)
|
|
ui = new(user, src, ui_type, "Atmospherics Control", 460, 470)
|
|
ui.open()
|
|
|
|
/obj/machinery/computer/general_air_control/receive_signal(datum/signal/signal)
|
|
if(!signal || signal.encryption) return
|
|
|
|
var/id_tag = signal.data["tag"]
|
|
if(!id_tag || !sensors.Find(id_tag)) return
|
|
|
|
sensor_information[id_tag] = signal.data
|
|
|
|
/obj/machinery/computer/general_air_control/proc/set_frequency(new_frequency)
|
|
SSradio.remove_object(src, frequency)
|
|
frequency = new_frequency
|
|
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
|
|
|
|
/obj/machinery/computer/general_air_control/Initialize()
|
|
. = ..()
|
|
set_frequency(frequency)
|
|
|
|
|
|
/obj/machinery/computer/general_air_control/large_tank_control
|
|
ui_type = "AtmosControlTank"
|
|
frequency = 1441
|
|
var/input_tag
|
|
var/output_tag
|
|
|
|
var/list/input_info
|
|
var/list/output_info
|
|
|
|
var/default_input_flow_setting = 200
|
|
var/default_pressure_setting = PRESSURE_ONE_THOUSAND * 2
|
|
var/max_input_flow_setting = ATMOS_DEFAULT_VOLUME_PUMP + 500
|
|
var/max_pressure_setting = MAX_VENT_PRESSURE
|
|
circuit = /obj/item/circuitboard/air_management/tank_control
|
|
|
|
/obj/machinery/computer/general_air_control/large_tank_control/terminal
|
|
icon = 'icons/obj/modular_computers/modular_terminal.dmi'
|
|
icon_screen = "tank"
|
|
icon_keyboard = "atmos_key"
|
|
icon_keyboard_emis = "atmos_key_mask"
|
|
is_connected = TRUE
|
|
has_off_keyboards = TRUE
|
|
can_pass_under = FALSE
|
|
light_power_on = 1
|
|
|
|
/obj/machinery/computer/general_air_control/large_tank_control/wall
|
|
icon = 'icons/obj/modular_computers/modular_telescreen.dmi'
|
|
icon_state = "telescreen"
|
|
icon_screen = "engi"
|
|
density = FALSE
|
|
|
|
/obj/machinery/computer/general_air_control/large_tank_control/terminal
|
|
icon = 'icons/obj/modular_computers/modular_terminal.dmi'
|
|
icon_screen = "tank"
|
|
icon_keyboard = "atmos_key"
|
|
icon_keyboard_emis = "atmos_key_mask"
|
|
is_connected = TRUE
|
|
has_off_keyboards = TRUE
|
|
can_pass_under = FALSE
|
|
light_power_on = 1
|
|
|
|
/obj/machinery/computer/general_air_control/large_tank_control/ui_data(mob/user)
|
|
. = ..()
|
|
var/list/data = .
|
|
data["maxrate"] = max_input_flow_setting
|
|
data["maxpressure"] = max_pressure_setting
|
|
if(input_info)
|
|
LAZYINITLIST(data["input"])
|
|
data["input"]["power"] = input_info["power"]
|
|
data["input"]["rate"] = input_info["volume_rate"]
|
|
data["input"]["setrate"] = default_input_flow_setting
|
|
|
|
if(output_info)
|
|
LAZYINITLIST(data["output"])
|
|
data["output"]["power"] = output_info["power"]
|
|
data["output"]["pressure"] = output_info["internal"]
|
|
data["output"]["setpressure"] = default_pressure_setting
|
|
return data
|
|
|
|
/obj/machinery/computer/general_air_control/large_tank_control/receive_signal(datum/signal/signal)
|
|
if(!signal || signal.encryption) return
|
|
|
|
var/id_tag = signal.data["tag"]
|
|
|
|
if(input_tag == id_tag)
|
|
input_info = signal.data
|
|
else if(output_tag == id_tag)
|
|
output_info = signal.data
|
|
else
|
|
..(signal)
|
|
|
|
/obj/machinery/computer/general_air_control/large_tank_control/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
|
|
if(!radio_connection)
|
|
return FALSE
|
|
var/datum/signal/signal = new
|
|
signal.transmission_method = TRANSMISSION_RADIO
|
|
signal.source = src
|
|
switch(action)
|
|
if("in_refresh_status")
|
|
input_info = null
|
|
signal.data = list("tag" = input_tag, "status" = 1)
|
|
. = TRUE
|
|
|
|
if("in_toggle_injector")
|
|
input_info = null
|
|
signal.data = list("tag" = input_tag, "power_toggle" = 1)
|
|
. = TRUE
|
|
|
|
if("in_set_flowrate")
|
|
if(params["in_set_flowrate"] != null)
|
|
var/setrate = between(0, text2num(params["in_set_flowrate"]), max_input_flow_setting)
|
|
input_info = null
|
|
signal.data = list ("tag" = input_tag, "set_volume_rate" = "[setrate]")
|
|
. = TRUE
|
|
|
|
if("out_refresh_status")
|
|
output_info = null
|
|
signal.data = list ("tag" = output_tag, "status" = 1)
|
|
. = TRUE
|
|
|
|
if("out_toggle_power")
|
|
output_info = null
|
|
signal.data = list ("tag" = output_tag, "power_toggle" = 1)
|
|
. = TRUE
|
|
|
|
if("out_set_pressure")
|
|
if(params["out_set_pressure"] != null)
|
|
var/setpressure = between(0, text2num(params["out_set_pressure"]), max_pressure_setting)
|
|
output_info = null
|
|
signal.data = list ("tag" = output_tag, "set_internal_pressure" = "[setpressure]")
|
|
. = TRUE
|
|
|
|
signal.data["sigtype"] = "command"
|
|
INVOKE_ASYNC(radio_connection, TYPE_PROC_REF(/datum/radio_frequency, post_signal), src, signal, filter = RADIO_ATMOSIA)
|
|
|
|
/obj/machinery/computer/general_air_control/supermatter_core
|
|
icon = 'icons/obj/modular_computers/modular_terminal.dmi'
|
|
icon_screen = "tank"
|
|
icon_keyboard = "atmos_key"
|
|
icon_keyboard_emis = "atmos_key_mask"
|
|
ui_type = "AtmosControlSupermatter"
|
|
is_connected = TRUE
|
|
has_off_keyboards = TRUE
|
|
can_pass_under = FALSE
|
|
light_power_on = 1
|
|
|
|
frequency = 1438
|
|
var/input_tag
|
|
var/output_tag
|
|
|
|
var/list/input_info
|
|
var/list/output_info
|
|
|
|
var/default_input_flow_setting = 700
|
|
var/default_pressure_setting = 100
|
|
var/max_input_flow_setting = ATMOS_DEFAULT_VOLUME_PUMP + 500
|
|
var/max_pressure_setting = PRESSURE_ONE_THOUSAND
|
|
circuit = /obj/item/circuitboard/air_management/supermatter_core
|
|
|
|
/obj/machinery/computer/general_air_control/supermatter_core/ui_data(mob/user)
|
|
. = ..()
|
|
var/list/data = .
|
|
data["maxrate"] = max_input_flow_setting
|
|
data["maxpressure"] = max_pressure_setting
|
|
if(input_info)
|
|
LAZYINITLIST(data["input"])
|
|
data["input"]["power"] = input_info["power"]
|
|
data["input"]["rate"] = input_info["volume_rate"]
|
|
data["input"]["setrate"] = default_input_flow_setting
|
|
|
|
if(output_info)
|
|
LAZYINITLIST(data["output"])
|
|
data["output"]["power"] = output_info["power"]
|
|
data["output"]["pressure"] = output_info["external"]
|
|
data["output"]["setpressure"] = default_pressure_setting
|
|
return data
|
|
|
|
/obj/machinery/computer/general_air_control/supermatter_core/receive_signal(datum/signal/signal)
|
|
if(!signal || signal.encryption) return
|
|
|
|
var/id_tag = signal.data["tag"]
|
|
|
|
if(input_tag == id_tag)
|
|
input_info = signal.data
|
|
else if(output_tag == id_tag)
|
|
output_info = signal.data
|
|
else
|
|
..(signal)
|
|
|
|
/obj/machinery/computer/general_air_control/supermatter_core/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
|
|
if(!radio_connection)
|
|
return
|
|
var/datum/signal/signal = new
|
|
signal.transmission_method = TRANSMISSION_RADIO
|
|
signal.source = src
|
|
switch(action)
|
|
if("in_refresh_status")
|
|
input_info = null
|
|
signal.data = list ("tag" = input_tag, "status" = 1)
|
|
. = TRUE
|
|
|
|
if("in_toggle_injector")
|
|
input_info = null
|
|
signal.data = list ("tag" = input_tag, "power_toggle" = 1)
|
|
. = TRUE
|
|
|
|
if("in_set_flowrate")
|
|
if(params["in_set_flowrate"] != null)
|
|
var/setrate = between(0, text2num(params["in_set_flowrate"]), max_input_flow_setting)
|
|
input_info = null
|
|
signal.data = list ("tag" = input_tag, "set_volume_rate" = "[setrate]")
|
|
. = TRUE
|
|
|
|
if("out_refresh_status")
|
|
output_info = null
|
|
signal.data = list ("tag" = output_tag, "status" = 1)
|
|
. = TRUE
|
|
|
|
if("out_toggle_power")
|
|
output_info = null
|
|
signal.data = list ("tag" = output_tag, "power_toggle" = 1)
|
|
. = TRUE
|
|
|
|
if("out_set_pressure")
|
|
if(params["out_set_pressure"] != null)
|
|
var/setpressure = between(0, text2num(params["out_set_pressure"]), max_pressure_setting)
|
|
output_info = null
|
|
signal.data = list ("tag" = output_tag, "set_external_pressure" = "[setpressure]", "checks" = 1)
|
|
. = TRUE
|
|
|
|
signal.data["sigtype"]="command"
|
|
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
|
|
|
/obj/machinery/computer/general_air_control/fuel_injection
|
|
icon_screen = "alert:0"
|
|
icon_keyboard = "cyan_key"
|
|
icon_keyboard_emis = "cyan_key_mask"
|
|
light_color = LIGHT_COLOR_CYAN
|
|
ui_type = "AtmosControlInjector"
|
|
|
|
var/device_tag
|
|
var/list/device_info
|
|
|
|
var/automation = 0
|
|
|
|
var/cutoff_temperature = 2000
|
|
var/on_temperature = 1200
|
|
circuit = /obj/item/circuitboard/air_management/injector_control
|
|
|
|
/obj/machinery/computer/general_air_control/fuel_injection/process()
|
|
if(automation)
|
|
if(!radio_connection)
|
|
return 0
|
|
|
|
var/injecting = 0
|
|
for(var/id_tag in sensor_information)
|
|
var/list/data = sensor_information[id_tag]
|
|
if(data["temperature"])
|
|
if(data["temperature"] >= cutoff_temperature)
|
|
injecting = 0
|
|
break
|
|
if(data["temperature"] <= on_temperature)
|
|
injecting = 1
|
|
|
|
var/datum/signal/signal = new
|
|
signal.transmission_method = TRANSMISSION_RADIO
|
|
signal.source = src
|
|
|
|
signal.data = list(
|
|
"tag" = device_tag,
|
|
"power" = injecting,
|
|
"sigtype"="command"
|
|
)
|
|
|
|
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
|
|
|
..()
|
|
|
|
/obj/machinery/computer/general_air_control/fuel_injection/ui_data(mob/user)
|
|
. = ..()
|
|
var/list/data = .
|
|
if(device_info)
|
|
LAZYINITLIST(data["device"])
|
|
data["device"]["power"] = device_info["power"]
|
|
data["device"]["rate"] = device_info["volume_rate"]
|
|
data["device"]["automation"] = automation
|
|
return data
|
|
|
|
/obj/machinery/computer/general_air_control/fuel_injection/receive_signal(datum/signal/signal)
|
|
if(!signal || signal.encryption) return
|
|
|
|
var/id_tag = signal.data["tag"]
|
|
|
|
if(device_tag == id_tag)
|
|
device_info = signal.data
|
|
else
|
|
..(signal)
|
|
|
|
/obj/machinery/computer/general_air_control/fuel_injection/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
|
|
switch(action)
|
|
if("refresh_status")
|
|
device_info = null
|
|
if(!radio_connection)
|
|
return 0
|
|
|
|
var/datum/signal/signal = new
|
|
signal.transmission_method = TRANSMISSION_RADIO
|
|
signal.source = src
|
|
signal.data = list(
|
|
"tag" = device_tag,
|
|
"status" = 1,
|
|
"sigtype"="command"
|
|
)
|
|
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
|
. = TRUE
|
|
|
|
if("toggle_automation")
|
|
automation = !automation
|
|
. = TRUE
|
|
|
|
if("toggle_injector")
|
|
device_info = null
|
|
if(!radio_connection)
|
|
return 0
|
|
|
|
var/datum/signal/signal = new
|
|
signal.transmission_method = TRANSMISSION_RADIO
|
|
signal.source = src
|
|
signal.data = list(
|
|
"tag" = device_tag,
|
|
"power_toggle" = 1,
|
|
"sigtype"="command"
|
|
)
|
|
|
|
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
|
. = TRUE
|
|
|
|
if("injection")
|
|
if(!radio_connection)
|
|
return 0
|
|
|
|
var/datum/signal/signal = new
|
|
signal.transmission_method = TRANSMISSION_RADIO
|
|
signal.source = src
|
|
signal.data = list(
|
|
"tag" = device_tag,
|
|
"inject" = 1,
|
|
"sigtype"="command"
|
|
)
|
|
|
|
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
|
. = TRUE
|
|
|
|
#undef SIGNAL_OXYGEN
|
|
#undef SIGNAL_PHORON
|
|
#undef SIGNAL_NITROGEN
|
|
#undef SIGNAL_CARBON_DIOXIDE
|
|
#undef SIGNAL_HYDROGEN
|
|
#undef SIGNAL_N2O
|
|
#undef SIGNAL_HELIUM
|
|
#undef SIGNAL_DEUTERIUM
|
|
#undef SIGNAL_TRITIUM
|
|
#undef SIGNAL_HELIUMFUEL
|
|
#undef SIGNAL_SULFUR_DIOXIDE
|
|
#undef SIGNAL_NITROGEN_DIOXIDE
|
|
#undef SIGNAL_CHLORINE
|
|
#undef SIGNAL_WATERVAPOR
|