Wires Panel and Signaler Expansion (#22846)

Fleshes out wire panel skill behavior and signaler management.

Electrical Engineering 4 was very OP for revealing all wire labels of
all machines, and it was super fun while it lasted.

Wire panels now have associated skills with their use, and increased
skill ranks will increase the proportion of wires (chosen at random)
that are easily recognizable on sight for certain types of wiring
panels.
**Professional:** 75% revealed
**Trained:** 50% revealed
**Familiar:** 30% revealed
_(note: having both Electrical and Mechanical engineering at least
Trained gives you that baseline 30%, reflecting how your knowledge can
probably translate to decent guesswork.)_

The following wire panels are affected:
**Electrical Engineering:**
- APCs
- Cameras
- IFF Beacons
- Radios
- Smartfridges
- SMES Units

**Mechanical Engineering**
- Airlocks
- Disposal Units
- Fabricators
- Vending Machines

**Atmospherics Systems**
- Air Alarms

**Reactor Systems**
- Particle Accelerator Control Boxes (lol)

**Robotics**
- Hardsuits
- Suit Storage Units (sharing the love is all)
- Robots
- Tag Scanners

**Xenobiology**
- Stasis Cages

Also, I made it possible to blow out all the lights in an APC's area by
snipping the power regulator cable and then pulsing the lights wire.
Great for signalers.

Speaking of signalers, new app deployed to all Engineering, Research,
and Robotics personal modular computers:
<img width="816" height="722" alt="Screenshot 2026-07-14 144049"
src="https://github.com/user-attachments/assets/3d588712-ebfd-47ac-b699-7cdac2c04907"
/>

Self-explanatory. Please only use corporate-provided software for
behavior within your contract regulations.
This commit is contained in:
Batrachophreno
2026-07-26 18:05:15 +00:00
committed by GitHub
parent 80ace1682c
commit c92d909534
42 changed files with 858 additions and 130 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
icon = 'icons/obj/assemblies/new_assemblies.dmi'
icon_state = ""
obj_flags = OBJ_FLAG_CONDUCTABLE
w_class = WEIGHT_CLASS_SMALL
w_class = WEIGHT_CLASS_TINY
matter = list(MATERIAL_STEEL = 100)
recyclable = TRUE
throwforce = 2
+13 -4
View File
@@ -189,13 +189,22 @@
return FALSE
if(!secured)
audible_message("[icon2html(src, viewers(get_turf(src)))] *beep* *beep*", "*beep* *beep*")
return FALSE
if(normal && a_right && a_left)
if(a_right != D)
a_right.pulsed(FALSE)
if(a_left != D)
a_left.pulsed(FALSE)
var/obj/item/assembly/right = a_right
if(right && right != D && right.holder == src)
right.pulsed(FALSE)
if(QDELETED(src))
return TRUE
var/obj/item/assembly/left = a_left
if(left && left != D && left.holder == src)
left.pulsed(FALSE)
if(QDELETED(src))
return TRUE
if(master)
master.receive_signal()
else
audible_message("[icon2html(src, viewers(get_turf(src)))] *beep* *beep*", "*beep* *beep*")
return TRUE
/obj/item/assembly_holder/hear_talk(mob/living/M, msg, verb, datum/language/speaking)
+3 -2
View File
@@ -72,8 +72,9 @@
switch(action)
if("freq")
var/new_frequency = text2num(params["freq"]) * 10
if(new_frequency < RADIO_LOW_FREQ || new_frequency > RADIO_HIGH_FREQ)
new_frequency = sanitize_frequency(new_frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
new_frequency = sanitize_frequency(new_frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
if(new_frequency > RADIO_HIGH_FREQ)
new_frequency = RADIO_HIGH_FREQ - 1
set_frequency(new_frequency)
if("code")
@@ -1,82 +0,0 @@
/*
* Rig security can be snipped to disable ID access checks on rig.
* Rig AI override can be pulsed to toggle whether or not the AI can take control of the suit.
* System control can be pulsed to toggle some malfunctions.
* Interface lock can be pulsed to toggle whether or not the interface can be accessed.
*/
#define RIG_SECURITY BITFLAG(1)
#define RIG_AI_OVERRIDE BITFLAG(2)
#define RIG_SYSTEM_CONTROL BITFLAG(3)
#define RIG_INTERFACE_LOCK BITFLAG(4)
#define RIG_INTERFACE_SHOCK BITFLAG(5)
/datum/wires/rig
random = 1
holder_type = /obj/item/rig
/datum/wires/rig/New(atom/holder)
wires = list(
RIG_SECURITY,
RIG_AI_OVERRIDE,
RIG_SYSTEM_CONTROL,
RIG_INTERFACE_LOCK,
RIG_INTERFACE_SHOCK
)
add_duds(3)
. = ..()
/datum/wires/rig/on_cut(wire, mend, source)
var/obj/item/rig/rig = holder
switch(wire)
if(RIG_SECURITY)
if(mend)
rig.req_access = initial(rig.req_access)
rig.req_one_access = initial(rig.req_one_access)
if(RIG_INTERFACE_SHOCK)
rig.electrified = mend ? 0 : -1
rig.shock(usr,100)
if(RIG_SYSTEM_CONTROL)
if(mend)
rig.malfunctioning = 0
rig.malfunction_delay = 0
else
rig.malfunctioning += 10
rig.malfunction_delay = 10000000000
/datum/wires/rig/on_pulse(wire)
var/obj/item/rig/rig = holder
switch(wire)
if(RIG_SECURITY)
rig.security_check_enabled = !rig.security_check_enabled
rig.visible_message("\The [rig] twitches as several suit locks [rig.security_check_enabled?"close":"open"].")
if(RIG_AI_OVERRIDE)
rig.ai_override_enabled = !rig.ai_override_enabled
rig.visible_message("A small red light on [rig] [rig.ai_override_enabled?"goes dead":"flickers on"].")
if(RIG_SYSTEM_CONTROL)
rig.malfunctioning += 10
if(rig.malfunction_delay <= 0)
rig.malfunction_delay = 20
rig.shock(usr,100)
if(RIG_INTERFACE_LOCK)
rig.interface_locked = !rig.interface_locked
rig.visible_message("\The [rig] clicks audibly as the software interface [rig.interface_locked?"darkens":"brightens"].")
if(RIG_INTERFACE_SHOCK)
if(rig.electrified != -1)
rig.electrified = 30
rig.shock(usr,100)
/datum/wires/rig/interactable(var/mob/living/L)
if(!..())
return FALSE
var/obj/item/rig/rig = holder
if(rig.open)
return TRUE
return FALSE
#undef RIG_SECURITY
#undef RIG_AI_OVERRIDE
#undef RIG_SYSTEM_CONTROL
#undef RIG_INTERFACE_LOCK
#undef RIG_INTERFACE_SHOCK
@@ -60,6 +60,10 @@
. = ..()
card_slot.stored_item = new /obj/item/pen/silver
/obj/item/modular_computer/handheld/preset/engineering/install_default_hardware()
..()
network_card = new /obj/item/computer_hardware/network_card/signaler(src)
/obj/item/modular_computer/handheld/preset/engineering/atmos
_app_preset_type = /datum/modular_computer_app_presets/engineering/atmos
@@ -86,6 +90,10 @@
/obj/item/modular_computer/handheld/preset/supply/machinist
_app_preset_type = /datum/modular_computer_app_presets/supply/machinist
/obj/item/modular_computer/handheld/preset/supply/machinist/install_default_hardware()
..()
network_card = new /obj/item/computer_hardware/network_card/signaler(src)
// Cargo Delivery
/obj/item/modular_computer/handheld/preset/supply/cargo_delivery
_app_preset_type = /datum/modular_computer_app_presets/cargo_delivery
@@ -125,6 +133,10 @@
. = ..()
card_slot.stored_item = new /obj/item/pen/white
/obj/item/modular_computer/handheld/preset/research/install_default_hardware()
..()
network_card = new /obj/item/computer_hardware/network_card/signaler(src)
/obj/item/modular_computer/handheld/preset/research/rd
_app_preset_type = /datum/modular_computer_app_presets/research/rd
@@ -31,6 +31,11 @@
_app_preset_type = /datum/modular_computer_app_presets/engineering
enrolled = DEVICE_COMPANY
/obj/item/modular_computer/laptop/preset/engineering/install_default_hardware()
..()
QDEL_NULL(network_card)
network_card = new /obj/item/computer_hardware/network_card/signaler(src)
/obj/item/modular_computer/laptop/preset/engineering/ce
name = "chief engineer's laptop"
desc = "A portable computer belonging to the chief engineer."
@@ -58,6 +63,8 @@
/obj/item/modular_computer/laptop/preset/research/install_default_hardware()
..()
ai_slot = new /obj/item/computer_hardware/ai_slot(src)
QDEL_NULL(network_card)
network_card = new /obj/item/computer_hardware/network_card/signaler(src)
/obj/item/modular_computer/laptop/preset/research/rd
name = "research director's laptop"
@@ -130,6 +137,8 @@
/obj/item/modular_computer/laptop/preset/supply/robotics/install_default_hardware()
..()
access_cable_dongle = new /obj/item/computer_hardware/access_cable_dongle(src)
QDEL_NULL(network_card)
network_card = new /obj/item/computer_hardware/network_card/signaler(src)
// Representative
/obj/item/modular_computer/laptop/preset/representative
@@ -60,6 +60,10 @@
. = ..()
card_slot.stored_item = new /obj/item/pen/silver
/obj/item/modular_computer/handheld/pda/engineering/install_default_hardware()
..()
network_card = new /obj/item/computer_hardware/network_card/signaler(src)
/obj/item/modular_computer/handheld/pda/engineering/atmos
_app_preset_type = /datum/modular_computer_app_presets/engineering/atmos
@@ -82,6 +86,10 @@
/obj/item/modular_computer/handheld/pda/supply/machinist
_app_preset_type = /datum/modular_computer_app_presets/supply/machinist
/obj/item/modular_computer/handheld/pda/supply/machinist/install_default_hardware()
..()
network_card = new /obj/item/computer_hardware/network_card/signaler(src)
/obj/item/modular_computer/handheld/pda/supply/om
icon_add = "q"
@@ -117,6 +125,10 @@
. = ..()
card_slot.stored_item = new /obj/item/pen/white
/obj/item/modular_computer/handheld/pda/research/install_default_hardware()
..()
network_card = new /obj/item/computer_hardware/network_card/signaler(src)
/obj/item/modular_computer/handheld/pda/research/rd
_app_preset_type = /datum/modular_computer_app_presets/research/rd
icon_add = "rd"
@@ -154,6 +154,10 @@
. = ..()
card_slot.stored_item = new /obj/item/pen/silver
/obj/item/modular_computer/handheld/wristbound/preset/pda/engineering/install_default_hardware()
..()
network_card = new /obj/item/computer_hardware/network_card/signaler(src)
/obj/item/modular_computer/handheld/wristbound/preset/pda/engineering/atmos
_app_preset_type = /datum/modular_computer_app_presets/engineering/atmos
@@ -183,6 +187,10 @@
/obj/item/modular_computer/handheld/wristbound/preset/pda/supply/machinist
_app_preset_type = /datum/modular_computer_app_presets/supply/machinist
/obj/item/modular_computer/handheld/wristbound/preset/pda/supply/machinist/install_default_hardware()
..()
network_card = new /obj/item/computer_hardware/network_card/signaler(src)
// Medical
/obj/item/modular_computer/handheld/wristbound/preset/pda/medical
@@ -211,6 +219,10 @@
. = ..()
card_slot.stored_item = new /obj/item/pen/white
/obj/item/modular_computer/handheld/wristbound/preset/pda/research/install_default_hardware()
..()
network_card = new /obj/item/computer_hardware/network_card/signaler(src)
/obj/item/modular_computer/handheld/wristbound/preset/pda/research/rd
_app_preset_type = /datum/modular_computer_app_presets/research/rd
icon_add = "rd"
@@ -55,6 +55,7 @@ ABSTRACT_TYPE(/datum/modular_computer_app_presets)
/datum/computer_file/program/camera_monitor,\
/datum/computer_file/program/lighting_control,\
/datum/computer_file/program/fusion_codex,\
/datum/computer_file/program/signaler,\
)
#define COMPUTER_APP_PRESET_HORIZON_MEDICAL list(\
@@ -71,6 +72,7 @@ ABSTRACT_TYPE(/datum/modular_computer_app_presets)
/datum/computer_file/program/scanner/science,\
/datum/computer_file/program/scanner/gas,\
/datum/computer_file/program/away_manifest,\
/datum/computer_file/program/signaler,\
)
#define COMPUTER_APP_PRESET_HORIZON_SECURITY list(\
@@ -294,7 +294,7 @@
/datum/modular_computer_app_presets/supply/machinist/New()
. = ..()
program_list += list(/datum/computer_file/program/records/medical, /datum/computer_file/program/scanner/science, /datum/computer_file/program/robotics)
program_list += list(/datum/computer_file/program/records/medical, /datum/computer_file/program/scanner/science, /datum/computer_file/program/robotics, /datum/computer_file/program/signaler)
//Machinist is the bastard child of supply/operation, it doesn't have access to shit essentially
program_list -= list(/datum/computer_file/program/civilian/cargocontrol, /datum/computer_file/program/civilian/cargodelivery, /datum/computer_file/program/away_manifest)
@@ -4,7 +4,7 @@
program_icon_state = "medcomp"
program_key_icon_state = "teal_key"
extended_desc = "Useful program to reference reaction chains for nuclear fusion reactors."
size = 14
size = 4
requires_access_to_run = PROGRAM_ACCESS_LIST_ONE
required_access_run = list(ACCESS_ENGINE)
required_access_download = list(ACCESS_ENGINE)
@@ -0,0 +1,249 @@
#define NTOS_SIGNALER_CHANNEL_COUNT 8
#define NTOS_SIGNALER_RECEIVE_CHANNELS 2
#define NTOS_SIGNALER_DEFAULT_FREQUENCY 1457
#define NTOS_SIGNALER_DEFAULT_CODE 30
#define NTOS_SIGNALER_MAX_LABEL_LENGTH 24
/datum/computer_file/program/signaler
filename = "signaler"
filedesc = "Signal Manager"
extended_desc = "This program configures signaler-capable network cards for receiving and sending signals on custom frequencies."
program_icon_state = "generic"
program_key_icon_state = "green_key"
color = LIGHT_COLOR_GREEN
size = 1
requires_ntnet = FALSE
available_on_ntnet = TRUE
usage_flags = PROGRAM_ALL_REGULAR
tgui_id = "NTOSSignaler"
var/list/signal_configurations = list()
/datum/computer_file/program/signaler/New(obj/item/modular_computer/comp)
. = ..()
ensure_signal_configurations()
/datum/computer_file/program/signaler/clone(var/rename = FALSE, var/computer)
ensure_signal_configurations()
var/datum/computer_file/program/signaler/signaler_clone = ..(rename, computer)
signaler_clone.signal_configurations = list()
for(var/list/configuration in signal_configurations)
signaler_clone.signal_configurations += list(configuration.Copy())
return signaler_clone
/datum/computer_file/program/signaler/run_program(var/mob/user)
if(!..())
return FALSE
sync_receive_radios()
return TRUE
/datum/computer_file/program/signaler/ui_data(mob/user)
ensure_signal_configurations()
sync_receive_radios()
var/list/data = initial_data()
data["hardware_ready"] = !!get_signaler_card()
data["hardware_status"] = get_hardware_status()
data["min_frequency"] = RADIO_LOW_FREQ
data["max_frequency"] = RADIO_HIGH_FREQ
data["receive_channels"] = NTOS_SIGNALER_RECEIVE_CHANNELS
data["silent"] = silent
data["channels"] = list()
for(var/i = 1 to NTOS_SIGNALER_CHANNEL_COUNT)
var/list/configuration = signal_configurations[i]
data["channels"] += list(list(
"index" = i,
"label" = configuration["label"],
"frequency" = configuration["frequency"],
"code" = configuration["code"],
"receiving" = i <= NTOS_SIGNALER_RECEIVE_CHANNELS,
"receiving_enabled" = configuration["receiving_enabled"],
"last_received_code" = configuration["last_received_code"],
"last_received_time" = configuration["last_received_time"]
))
return data
/datum/computer_file/program/signaler/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
if(..())
return TRUE
if(action == "toggle_silent")
silent = !silent
. = TRUE
return
ensure_signal_configurations()
var/channel_index = clamp(round(text2num(params["index"])), 1, NTOS_SIGNALER_CHANNEL_COUNT)
var/list/configuration = signal_configurations[channel_index]
if(!configuration)
return TRUE
switch(action)
if("rename")
var/new_label = tgui_input_text(usr, "Enter a new label for this [channel_index <= NTOS_SIGNALER_RECEIVE_CHANNELS ? "receiver" : "signaler"].", "Rename Signal", configuration["label"], NTOS_SIGNALER_MAX_LABEL_LENGTH)
if(isnull(new_label))
return TRUE
new_label = sanitize(new_label, NTOS_SIGNALER_MAX_LABEL_LENGTH)
configuration["label"] = length(new_label) ? new_label : default_label(channel_index)
. = TRUE
if("frequency")
configuration["frequency"] = clean_frequency(text2num(params["frequency"]))
if(channel_index <= NTOS_SIGNALER_RECEIVE_CHANNELS)
sync_receive_radios()
. = TRUE
if("toggle_receive")
if(channel_index <= NTOS_SIGNALER_RECEIVE_CHANNELS)
configuration["receiving_enabled"] = !configuration["receiving_enabled"]
if(!configuration["receiving_enabled"])
configuration["last_received_code"] = null
configuration["last_received_time"] = null
sync_receive_radios()
. = TRUE
if("code")
if(channel_index > NTOS_SIGNALER_RECEIVE_CHANNELS)
configuration["code"] = clamp(round(text2num(params["code"])), 1, 100)
. = TRUE
if("reset")
configuration["frequency"] = NTOS_SIGNALER_DEFAULT_FREQUENCY
configuration["code"] = NTOS_SIGNALER_DEFAULT_CODE
if(channel_index <= NTOS_SIGNALER_RECEIVE_CHANNELS)
configuration["receiving_enabled"] = FALSE
configuration["last_received_code"] = null
configuration["last_received_time"] = null
sync_receive_radios()
. = TRUE
if("send")
if(channel_index > NTOS_SIGNALER_RECEIVE_CHANNELS)
send_signal(channel_index, usr)
. = TRUE
/datum/computer_file/program/signaler/proc/ensure_signal_configurations()
for(var/i = 1 to min(length(signal_configurations), NTOS_SIGNALER_CHANNEL_COUNT))
var/list/configuration = signal_configurations[i]
if(!configuration)
continue
if(isnull(configuration["receiving_enabled"]))
configuration["receiving_enabled"] = FALSE
for(var/i = length(signal_configurations) + 1 to NTOS_SIGNALER_CHANNEL_COUNT)
signal_configurations += list(list(
"label" = default_label(i),
"frequency" = NTOS_SIGNALER_DEFAULT_FREQUENCY,
"code" = NTOS_SIGNALER_DEFAULT_CODE,
"receiving_enabled" = FALSE,
"last_received_code" = null,
"last_received_time" = null
))
/datum/computer_file/program/signaler/proc/default_label(var/channel_index)
if(channel_index <= NTOS_SIGNALER_RECEIVE_CHANNELS)
return "Receiver [channel_index]"
return "Signal [channel_index - NTOS_SIGNALER_RECEIVE_CHANNELS]"
/datum/computer_file/program/signaler/proc/clean_frequency(var/frequency)
if(!isnum(frequency))
frequency = NTOS_SIGNALER_DEFAULT_FREQUENCY
frequency = sanitize_frequency(frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
if(frequency > RADIO_HIGH_FREQ)
frequency = RADIO_HIGH_FREQ - 1
return frequency
/datum/computer_file/program/signaler/proc/get_signaler_card()
if(!computer?.network_card)
return null
var/obj/item/computer_hardware/network_card/network_card = computer.network_card
if(!network_card.enabled || !network_card.check_functionality() || !network_card.sradio)
return null
return network_card
/datum/computer_file/program/signaler/proc/get_hardware_status()
if(!computer?.network_card)
return "No network card detected."
var/obj/item/computer_hardware/network_card/network_card = computer.network_card
if(!network_card.sradio)
return "Installed network card does not support signaling."
if(!network_card.enabled)
return "Signaler network card is disabled."
if(!network_card.check_functionality())
return "Signaler network card is damaged."
return "Ready."
/datum/computer_file/program/signaler/proc/sync_receive_radios()
var/obj/item/computer_hardware/network_card/network_card = get_signaler_card()
if(!network_card)
return FALSE
for(var/i = 1 to NTOS_SIGNALER_RECEIVE_CHANNELS)
var/obj/item/integrated_signaler/signal/radio = network_card.get_signaler_radio(i)
var/list/configuration = signal_configurations[i]
if(radio && configuration)
if(configuration["receiving_enabled"])
radio.set_frequency(configuration["frequency"])
radio.set_listening(TRUE)
else
radio.set_listening(FALSE)
return TRUE
/datum/computer_file/program/signaler/proc/send_signal(var/channel_index, var/mob/user)
var/obj/item/computer_hardware/network_card/network_card = get_signaler_card()
if(!network_card)
computer?.output_error(FONT_SMALL(SPAN_WARNING("Hardware Error - Signaler network card unavailable.")))
return FALSE
var/list/configuration = signal_configurations[channel_index]
if(!configuration)
return FALSE
var/obj/item/integrated_signaler/signal/radio = network_card.get_signaler_radio(0)
if(!radio)
return FALSE
var/old_frequency = radio.frequency
var/old_code = radio.code
radio.set_frequency(configuration["frequency"])
radio.code = configuration["code"]
var/sent = radio.send_signal("ACTIVATE", user)
radio.code = old_code
radio.set_frequency(old_frequency)
if(sent)
computer?.output_notice("Signal sent on [format_frequency(configuration["frequency"])]/[configuration["code"]].", 0)
else
computer?.output_error(FONT_SMALL(SPAN_WARNING("Unable to send signal. The transmitter may be cooling down or jammed.")))
return sent
/datum/computer_file/program/signaler/proc/receive_signal(var/channel_index, var/datum/signal/signal)
if(channel_index < 1 || channel_index > NTOS_SIGNALER_RECEIVE_CHANNELS)
return FALSE
ensure_signal_configurations()
var/list/configuration = signal_configurations[channel_index]
if(!configuration)
return FALSE
if(!configuration["receiving_enabled"])
return FALSE
configuration["last_received_code"] = signal.encryption
configuration["last_received_time"] = worldtime2text()
if(computer)
var/received_message = "Signal received on [configuration["label"]]: [isnull(signal.encryption) ? "no code" : signal.encryption]."
if(silent)
computer.output_notice(received_message, 0)
else
playsound(get_turf(computer), 'sound/machines/twobeep.ogg', 20, 1)
computer.audible_message("[icon2html(computer, viewers(1, get_turf(computer)))] [computer] beeps, \"[received_message]\"")
SStgui.update_uis(src)
return TRUE
#undef NTOS_SIGNALER_CHANNEL_COUNT
#undef NTOS_SIGNALER_RECEIVE_CHANNELS
#undef NTOS_SIGNALER_DEFAULT_FREQUENCY
#undef NTOS_SIGNALER_DEFAULT_CODE
#undef NTOS_SIGNALER_MAX_LABEL_LENGTH
@@ -13,6 +13,8 @@ GLOBAL_VAR_INIT(ntnet_card_uid, 1)
var/long_range = FALSE
var/ethernet = FALSE // Hard-wired, therefore always on, ignores NTNet wireless checks.
var/obj/item/integrated_signaler/signal/sradio = FALSE // integrated signaler - not present on basic model.
var/obj/item/integrated_signaler/signal/secondary_sradio = FALSE // second receiver for NTOS signaler software.
var/obj/item/integrated_signaler/signal/transmit_sradio = FALSE // transmitter for NTOS signaler software.
malfunction_probability = 1
/obj/item/computer_hardware/network_card/diagnostics(mob/user)
@@ -41,7 +43,7 @@ GLOBAL_VAR_INIT(ntnet_card_uid, 1)
/obj/item/computer_hardware/network_card/signaler/Initialize()
. = ..()
sradio = new /obj/item/integrated_signaler/signal(src)
initialize_signaler_radios()
/obj/item/computer_hardware/network_card/advanced
name = "advanced NTNet network card"
@@ -54,7 +56,7 @@ GLOBAL_VAR_INIT(ntnet_card_uid, 1)
/obj/item/computer_hardware/network_card/advanced/Initialize()
. = ..()
sradio = new /obj/item/integrated_signaler/signal(src)
initialize_signaler_radios()
/obj/item/computer_hardware/network_card/wired
name = "wired NTNet network card"
@@ -67,7 +69,46 @@ GLOBAL_VAR_INIT(ntnet_card_uid, 1)
/obj/item/computer_hardware/network_card/wired/Initialize()
. = ..()
sradio = new /obj/item/integrated_signaler/signal(src)
initialize_signaler_radios()
/obj/item/computer_hardware/network_card/proc/initialize_signaler_radios()
if(!sradio)
sradio = new /obj/item/integrated_signaler/signal/network_card(src)
sradio.set_listening(FALSE)
if(!secondary_sradio)
secondary_sradio = new /obj/item/integrated_signaler/signal/network_card(src)
secondary_sradio.set_listening(FALSE)
if(!transmit_sradio)
transmit_sradio = new /obj/item/integrated_signaler/signal/network_card(src)
transmit_sradio.set_listening(FALSE)
/obj/item/computer_hardware/network_card/proc/get_signaler_radio(var/channel = 1)
if(channel == 0)
return transmit_sradio
if(channel == 2)
return secondary_sradio
return sradio
/obj/item/computer_hardware/network_card/proc/receive_signaler_signal(var/obj/item/integrated_signaler/signal/receiver, var/datum/signal/signal)
if(!parent_computer || !parent_computer.enabled || !enabled || !check_functionality())
return FALSE
var/channel
if(receiver == sradio)
channel = 1
else if(receiver == secondary_sradio)
channel = 2
else
return FALSE
if(istype(parent_computer.active_program, /datum/computer_file/program/signaler))
var/datum/computer_file/program/signaler/active_signaler = parent_computer.active_program
active_signaler.receive_signal(channel, signal)
for(var/datum/computer_file/program/signaler/signaler_program in parent_computer.idle_threads)
signaler_program.receive_signal(channel, signal)
return TRUE
// Returns a string identifier of this network card
/obj/item/computer_hardware/network_card/proc/get_network_tag()
@@ -106,6 +147,10 @@ GLOBAL_VAR_INIT(ntnet_card_uid, 1)
/obj/item/computer_hardware/network_card/Destroy()
if(sradio)
QDEL_NULL(sradio)
if(secondary_sradio)
QDEL_NULL(secondary_sradio)
if(transmit_sradio)
QDEL_NULL(transmit_sradio)
if(parent_computer?.network_card == src)
parent_computer.network_card = null
parent_computer = null
+2
View File
@@ -175,6 +175,8 @@ ABSTRACT_TYPE(/obj/structure/machinery/power/apc)
/// If we're actually able to charge
var/charge_mode = CHARGE_MODE_CHARGE
var/last_time = 1
/// For doing silly games with blowing out lights
var/light_explosion_safety = TRUE
/obj/structure/machinery/power/apc/mechanics_hints(mob/user, distance, is_adjacent)
. += ..()
+5 -1
View File
@@ -159,6 +159,7 @@
SPAN_NOTICE("You detach [rig] from \the [src]"))
rig.forceMove(get_turf(user))
rig.detached()
rig = null
overlays = new/list()
@@ -176,12 +177,15 @@
if (rig)
to_chat(user, SPAN_WARNING("There is another device in the way."))
return ..()
var/obj/item/assembly_holder/H = attacking_item
if(!H.secured)
to_chat(user, SPAN_WARNING("The assembly must be secured with a screwdriver."))
return TRUE
user.visible_message("[user] begins rigging [attacking_item] to \the [src].", "You begin rigging [attacking_item] to \the [src]")
if(do_after(user, 20))
user.visible_message(SPAN_NOTICE("[user] rigs [attacking_item] to \the [src]."),
SPAN_NOTICE("You rig [attacking_item] to \the [src]"))
var/obj/item/assembly_holder/H = attacking_item
if (istype(H.a_left,/obj/item/assembly/igniter) || istype(H.a_right,/obj/item/assembly/igniter))
message_admins("[key_name_admin(user)] rigged fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]) for explosion. (<A href='byond://?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</a>)")
log_game("[key_name(user)] rigged fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]) for explosion.")