mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
NTNet Extensibility (#22908)
Fixes https://github.com/Aurorastation/Aurora.3/issues/21944 Spiritual successor of https://github.com/Aurorastation/Aurora.3/pull/22352 Cherrypicked changes from the C3 Crew Management branch, this PR contains all NTNet extensibility features, including Field Relay construction, off-site camera usage (contingent on standing up remote hardware and being out of jamming), etc. This also fixes a handful of outstanding telecomms and view/mobeye-related bugs adjacent to where I was working. changes: - rscadd: "Adds NTNet extensibility, requires new machinery constructed on away-site z-levels." - rscadd: "Breaks NTNet Relay machinery into Quantum Relay ('core' obj on Horizon) and Field Relay (deployable off-site constructions)." - qol: "Embedded cameras (basically every video camera EXCEPT those which are installed on walls) can now be viewed from NTNet-connected z-level, not just connected ones." - rscadd: "Adds several public camera monitor consoles to the Horizon (near where public sensor grid feed consoles already exist)." - rscadd: "Adds some spare camera console boards to Horizon technical storage." - qol: "Adds action button for 'cancel-camera-view' verb while viewing cameras or looking up/down z-level." - bugfix: "Fixes Jockey comms (frequency was missing from ANTAG_FREQS)." - bugfix: "Fixes look-up/look-down actions intermittently failing without first using cancel-camera-view."
This commit is contained in:
@@ -8,13 +8,19 @@ GLOBAL_VAR_INIT(ntnet_card_uid, 1)
|
||||
critical = FALSE
|
||||
icon_state = "netcard_basic"
|
||||
hardware_size = 1
|
||||
var/identification_id // Identification ID. Technically MAC address of this device. Can't be changed by user.
|
||||
var/identification_string = "" // Identification string, technically nickname seen in the network. Can be set by user.
|
||||
/// Identification ID. Technically MAC address of this device. Can't be changed by user.
|
||||
var/identification_id
|
||||
/// Identification string, technically nickname seen in the network. Can be set by user.
|
||||
var/identification_string = ""
|
||||
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.
|
||||
/// Hard-wired, therefore always on, ignores NTNet wireless checks.
|
||||
var/ethernet = FALSE
|
||||
/// integrated signaler - not present on basic model.
|
||||
var/obj/item/integrated_signaler/signal/sradio = FALSE
|
||||
/// second receiver for NTOS signaler software.
|
||||
var/obj/item/integrated_signaler/signal/secondary_sradio = FALSE
|
||||
/// transmitter for NTOS signaler software.
|
||||
var/obj/item/integrated_signaler/signal/transmit_sradio = FALSE
|
||||
malfunction_probability = 1
|
||||
|
||||
/obj/item/computer_hardware/network_card/diagnostics(mob/user)
|
||||
@@ -47,7 +53,7 @@ GLOBAL_VAR_INIT(ntnet_card_uid, 1)
|
||||
|
||||
/obj/item/computer_hardware/network_card/advanced
|
||||
name = "advanced NTNet network card"
|
||||
desc = "An advanced network card for usage with standard NTNet frequencies. Its transmitter is strong enough to connect even off-station."
|
||||
desc = "An advanced network card for usage with standard NTNet frequencies. Its transmitter can sustain high-bandwidth links to nearby NTNet relays."
|
||||
long_range = TRUE
|
||||
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 2)
|
||||
power_usage = 150 // Better range but higher power usage.
|
||||
@@ -110,11 +116,11 @@ GLOBAL_VAR_INIT(ntnet_card_uid, 1)
|
||||
|
||||
return TRUE
|
||||
|
||||
// Returns a string identifier of this network card
|
||||
/// Returns a string identifier of this network card
|
||||
/obj/item/computer_hardware/network_card/proc/get_network_tag()
|
||||
return "[identification_string] (NID [identification_id])"
|
||||
|
||||
// 0 - No signal, 1 - Low signal, 2 - High signal. 3 - Wired Connection
|
||||
/// 0 - No signal, 1 - Low signal, 2 - High signal. 3 - Wired Connection
|
||||
/obj/item/computer_hardware/network_card/proc/get_signal(var/specific_action = 0)
|
||||
if(!parent_computer) // Hardware is not installed in anything. No signal. How did this even get called?
|
||||
return 0
|
||||
@@ -122,27 +128,10 @@ GLOBAL_VAR_INIT(ntnet_card_uid, 1)
|
||||
return 0
|
||||
if(!check_functionality())
|
||||
return 0
|
||||
if(!GLOB.ntnet_global || !GLOB.ntnet_global.check_function(specific_action))
|
||||
if(!GLOB.ntnet_global)
|
||||
return 0
|
||||
|
||||
if(parent_computer)
|
||||
var/turf/T = get_turf(parent_computer)
|
||||
if((T && istype(T)) && is_station_level(T.z))
|
||||
// Computer is on station. Low/High signal depending on what type of network card you have
|
||||
if(ethernet)
|
||||
return 3
|
||||
else if(long_range)
|
||||
return 2
|
||||
else
|
||||
return 1
|
||||
var/area/A = get_area(parent_computer)
|
||||
if(A.centcomm_area && ethernet)
|
||||
return 3
|
||||
|
||||
if(long_range) // Computer is not on station, but it has upgraded network card. Low signal.
|
||||
return 1
|
||||
|
||||
return 0 // Computer is not on station and does not have upgraded network card. No signal.
|
||||
return GLOB.ntnet_global.get_signal_for_endpoint(parent_computer, specific_action, ethernet, long_range)
|
||||
|
||||
/obj/item/computer_hardware/network_card/Destroy()
|
||||
if(sradio)
|
||||
|
||||
Reference in New Issue
Block a user