diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm
index eba85018d34..ac619b10b20 100644
--- a/code/__DEFINES/atmospherics.dm
+++ b/code/__DEFINES/atmospherics.dm
@@ -107,7 +107,4 @@
#define MAX_HIGH_PRESSURE_DAMAGE 4 //This used to be 20... I got this much random rage for some retarded decision by polymorph?! Polymorph now lies in a pool of blood with a katana jammed in his spleen. ~Errorage --PS: The katana did less than 20 damage to him :(
#define LOW_PRESSURE_DAMAGE 2 //The amounb of damage someone takes when in a low pressure area (The pressure threshold is so low that it doesn't make sense to do any calculations, so it just applies this flat value).
-#define PRESSURE_SUIT_REDUCTION_COEFFICIENT 0.8 //This is how much (percentual) a suit with the flag STOPSPRESSUREDMAGE reduces pressure.
-#define PRESSURE_HEAD_REDUCTION_COEFFICIENT 0.4 //This is how much (percentual) a helmet/hat with the flag STOPSPRESSUREDMAGE reduces pressure.
-
#define COLD_SLOWDOWN_FACTOR 20 //Humans are slowed by the difference between bodytemp and BODYTEMP_COLD_DAMAGE_LIMIT divided by this
\ No newline at end of file
diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm
index 040232d7baa..c33ecb81ac9 100644
--- a/code/controllers/subsystem/ticker.dm
+++ b/code/controllers/subsystem/ticker.dm
@@ -17,6 +17,7 @@ var/datum/subsystem/ticker/ticker
var/event = 0
var/login_music //music played in pregame lobby
+ var/round_end_sound //music/jingle played when the world reboots
var/list/datum/mind/minds = list() //The characters in the game. Used for objective tracking.
@@ -50,6 +51,8 @@ var/datum/subsystem/ticker/ticker
if(SSevent.holidays && SSevent.holidays[APRIL_FOOLS])
login_music = 'sound/ambience/clown.ogg'
+ round_end_sound = pick('sound/AI/newroundsexy.ogg','sound/misc/apcdestroyed.ogg','sound/misc/bangindonk.ogg','sound/misc/leavingtg.ogg')
+
/datum/subsystem/ticker/Initialize()
if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase()
if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm
index 844f52bbe5b..a21f41baa54 100644
--- a/code/game/gamemodes/shadowling/shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm
@@ -72,7 +72,7 @@
P.SetLuminosity(0) //failsafe
if(H != usr)
H << "You feel a chill and are plunged into darkness."
- H.luminosity = 0 //This is required with the object-based lighting
+ H.SetLuminosity(0) //This is required with the object-based lighting
diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcasting.dm
similarity index 70%
rename from code/game/machinery/telecomms/broadcaster.dm
rename to code/game/machinery/telecomms/broadcasting.dm
index 1fc7a5bf311..b6ab78b9fc1 100644
--- a/code/game/machinery/telecomms/broadcaster.dm
+++ b/code/game/machinery/telecomms/broadcasting.dm
@@ -1,591 +1,441 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-
-/*
- The broadcaster sends processed messages to all radio devices in the game. They
- do not have to be headsets; intercoms and station-bounced radios suffice.
-
- They receive their message from a server after the message has been logged.
-*/
-
-var/list/recentmessages = list() // global list of recent messages broadcasted : used to circumvent massive radio spam
-var/message_delay = 0 // To make sure restarting the recentmessages list is kept in sync
-
-/obj/machinery/telecomms/broadcaster
- name = "subspace broadcaster"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "broadcaster"
- desc = "A dish-shaped machine used to broadcast processed subspace signals."
- density = 1
- anchored = 1
- use_power = 1
- idle_power_usage = 25
- machinetype = 5
- /*heatgen = 0
- delay = 7*/
- circuitboard = "/obj/item/weapon/circuitboard/telecomms/broadcaster"
-
-/obj/machinery/telecomms/broadcaster/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
- // Don't broadcast rejected signals
- if(signal.data["reject"])
- return
-
- if(signal.data["message"])
-
-
- // Prevents massive radio spam
- signal.data["done"] = 1 // mark the signal as being broadcasted
- // Search for the original signal and mark it as done as well
- var/datum/signal/original = signal.data["original"]
- if(original)
- original.data["done"] = 1
- original.data["compression"] = signal.data["compression"]
- original.data["level"] = signal.data["level"]
-
- var/signal_message = "[signal.frequency]:[signal.data["message"]]:[signal.data["realname"]]"
- if(signal_message in recentmessages)
- return
- recentmessages.Add(signal_message)
-
- if(signal.data["slow"] > 0)
- sleep(signal.data["slow"]) // simulate the network lag if necessary
-
- signal.data["level"] |= listening_level
-
- /** #### - Normal Broadcast - #### **/
-
- if(signal.data["type"] == 0)
-
- /* ###### Broadcast a message using signal.data ###### */
- Broadcast_Message(signal.data["mob"],
- signal.data["vmask"], signal.data["radio"],
- signal.data["message"], signal.data["name"], signal.data["job"], signal.data["realname"],
- 0, signal.data["compression"], signal.data["level"], signal.frequency, signal.data["spans"],
- signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"])
-
-
- /** #### - Simple Broadcast - #### **/
-
- if(signal.data["type"] == 1)
-
- /* ###### Broadcast a message using signal.data ###### */
- Broadcast_SimpleMessage(signal.data["name"], signal.frequency,
- signal.data["message"],null, null,
- signal.data["compression"], listening_level)
-
-
- /** #### - Artificial Broadcast - #### **/
- // (Imitates a mob)
-
- if(signal.data["type"] == 2)
-
- /* ###### Broadcast a message using signal.data ###### */
- // Parameter "data" as 4: AI can't track this person/mob
- Broadcast_Message(signal.data["mob"],
- signal.data["vmask"],
- signal.data["radio"], signal.data["message"],
- signal.data["name"], signal.data["job"],
- signal.data["realname"], 4, signal.data["compression"], signal.data["level"], signal.frequency, signal.data["spans"],
- signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"])
-
- if(!message_delay)
- message_delay = 1
- spawn(10)
- message_delay = 0
- recentmessages = list()
-
- /* --- Do a snazzy animation! --- */
- flick("broadcaster_send", src)
-
-/obj/machinery/telecomms/broadcaster/Destroy()
- // In case message_delay is left on 1, otherwise it won't reset the list and people can't say the same thing twice anymore.
- if(message_delay)
- message_delay = 0
- ..()
-
-
-/*
- Basically just an empty shell for receiving and broadcasting radio messages. Not
- very flexible, but it gets the job done.
-*/
-
-/obj/machinery/telecomms/allinone
- name = "telecommunications mainframe"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "comm_server"
- desc = "A compact machine used for portable subspace telecommuniations processing."
- density = 1
- anchored = 1
- use_power = 0
- idle_power_usage = 0
- machinetype = 6
- //heatgen = 0
- var/intercept = 0 // if nonzero, broadcasts all messages to syndicate channel
-
-/obj/machinery/telecomms/allinone/receive_signal(datum/signal/signal)
-
- if(!on) // has to be on to receive messages
- return
-
- if(is_freq_listening(signal)) // detect subspace signals
-
- signal.data["done"] = 1 // mark the signal as being broadcasted
- signal.data["compression"] = 0
-
- // Search for the original signal and mark it as done as well
- var/datum/signal/original = signal.data["original"]
- if(original)
- original.data["done"] = 1
-
- if(signal.data["slow"] > 0)
- sleep(signal.data["slow"]) // simulate the network lag if necessary
-
- /* ###### Broadcast a message using signal.data ###### */
- if(signal.frequency == SYND_FREQ) // if syndicate broadcast, just
- Broadcast_Message(signal.data["mob"],
- signal.data["vmask"],
- signal.data["radio"], signal.data["message"],
- signal.data["name"], signal.data["job"],
- signal.data["realname"],, signal.data["compression"], list(0, z), signal.frequency, signal.data["spans"],
- signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"])
-
-
-/**
-
- Here is the big, bad function that broadcasts a message given the appropriate
- parameters.
-
- @param M:
- Reference to the mob/speaker, stored in signal.data["mob"]
-
- @param vmask:
- Boolean value if the mob is "hiding" its identity via voice mask, stored in
- signal.data["vmask"]
-
- @param vmessage:
- If specified, will display this as the message; such as "chimpering"
- for monkeys if the mob is not understood. Stored in signal.data["vmessage"].
-
- @param radio:
- Reference to the radio broadcasting the message, stored in signal.data["radio"]
-
- @param message:
- The actual string message to display to mobs who understood mob M. Stored in
- signal.data["message"]
-
- @param name:
- The name to display when a mob receives the message. signal.data["name"]
-
- @param job:
- The name job to display for the AI when it receives the message. signal.data["job"]
-
- @param realname:
- The "real" name associated with the mob. signal.data["realname"]
-
- @param vname:
- If specified, will use this name when mob M is not understood. signal.data["vname"]
-
- @param data:
- If specified:
- 1 -- Will only broadcast to intercoms
- 2 -- Will only broadcast to intercoms and station-bounced radios
- 3 -- Broadcast to syndicate frequency
- 4 -- AI can't track down this person. Useful for imitation broadcasts where you can't find the actual mob
-
- @param compression:
- If 0, the signal is audible
- If nonzero, the signal may be partially inaudible or just complete gibberish.
-
- @param level:
- The list of Z levels that the sending radio is broadcasting to. Having 0 in the list broadcasts on all levels
-
- @param freq
- The frequency of the signal
-
-**/
-
-
-/proc/Broadcast_Message(var/atom/movable/AM,
- var/vmask, var/obj/item/device/radio/radio,
- var/message, var/name, var/job, var/realname,
- var/data, var/compression, var/list/level, var/freq, var/list/spans,
- var/verb_say, var/verb_ask, var/verb_exclaim, var/verb_yell)
-
- message = copytext(message, 1, MAX_BROADCAST_LEN)
-
- if(!message)
- return
-
- var/list/radios = list()
-
- var/atom/movable/virtualspeaker/virt = PoolOrNew(/atom/movable/virtualspeaker,null)
- virt.name = name
- virt.job = job
- virt.languages = AM.languages
- virt.source = AM
- virt.faketrack = data == 4 ? 1 : 0
- virt.radio = radio
- virt.verb_say = verb_say
- virt.verb_ask = verb_ask
- virt.verb_exclaim = verb_exclaim
- virt.verb_yell = verb_yell
-
- if(compression > 0)
- message = Gibberish(message, compression + 40)
-
- // --- Broadcast only to intercom devices ---
-
- if(data == 1)
- for(var/obj/item/device/radio/intercom/R in all_radios["[freq]"])
- if(R.receive_range(freq, level) > -1)
- radios += R
-
- // --- Broadcast only to intercoms and station-bounced radios ---
-
- else if(data == 2)
-
- for(var/obj/item/device/radio/R in all_radios["[freq]"])
- if(R.subspace_transmission)
- continue
-
- if(R.receive_range(freq, level) > -1)
- radios += R
-
- // --- This space left blank for Syndicate data ---
-
- // --- Centcom radio, yo. ---
-
- else if(data == 4)
-
- for(var/obj/item/device/radio/R in all_radios["[freq]"])
- if(!R.centcom)
- continue
-
- if(R.receive_range(freq, level) > -1)
- radios += R
-
- // --- Broadcast to ALL radio devices ---
-
- else
- for(var/obj/item/device/radio/R in all_radios["[freq]"])
- if(R.receive_range(freq, level) > -1)
- radios += R
-
- var/freqtext = num2text(freq)
- for(var/obj/item/device/radio/R in all_radios["[SYND_FREQ]"]) //syndicate radios use magic that allows them to hear everything. this was already the case, now it just doesn't need the allinone anymore. solves annoying bugs that aren't worth solving.
- if(R.receive_range(SYND_FREQ, list(R.z)) > -1 && freqtext in radiochannelsreverse)
- radios |= R
-
- // Get a list of mobs who can hear from the radios we collected.
- var/list/receive = get_mobs_in_radio_ranges(radios) //this includes all hearers.
-
- for(var/mob/R in receive) //Filter receiver list.
- if (R.client && R.client.holder && !(R.client.prefs.chat_toggles & CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
- receive -= R
-
- for(var/mob/M in player_list)
- if(isobserver(M) && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTRADIO))
- receive |= M
-
- var/rendered = virt.compose_message(virt, virt.languages, message, freq, spans) //Always call this on the virtualspeaker to advoid issues.
- for(var/atom/movable/hearer in receive)
- hearer.Hear(rendered, virt, AM.languages, message, freq, spans)
-
- if(length(receive))
- // --- This following recording is intended for research and feedback in the use of department radio channels ---
-
- var/blackbox_msg = "[AM] [AM.say_quote(message, spans)]"
- if(istype(blackbox))
- switch(freq)
- if(1459)
- blackbox.msg_common += blackbox_msg
- if(1351)
- blackbox.msg_science += blackbox_msg
- if(1353)
- blackbox.msg_command += blackbox_msg
- if(1355)
- blackbox.msg_medical += blackbox_msg
- if(1357)
- blackbox.msg_engineering += blackbox_msg
- if(1359)
- blackbox.msg_security += blackbox_msg
- if(1441)
- blackbox.msg_deathsquad += blackbox_msg
- if(1213)
- blackbox.msg_syndicate += blackbox_msg
- if(1349)
- blackbox.msg_service += blackbox_msg
- if(1347)
- blackbox.msg_cargo += blackbox_msg
- else
- blackbox.messages += blackbox_msg
-
- spawn(50)
- PlaceInPool(virt)
-
-/proc/Broadcast_SimpleMessage(var/source, var/frequency, var/text, var/data, var/mob/M, var/compression, var/level)
-
- /* ###### Prepare the radio connection ###### */
-
- if(!M)
- var/mob/living/carbon/human/H = new
- M = H
-
- var/datum/radio_frequency/connection = radio_controller.return_frequency(frequency)
-
- var/display_freq = connection.frequency
-
- var/list/receive = list()
-
-
- // --- Broadcast only to intercom devices ---
-
- if(data == 1)
- for (var/obj/item/device/radio/intercom/R in connection.devices["[RADIO_CHAT]"])
- var/turf/position = get_turf(R)
- if(position && position.z == level)
- receive |= R.send_hear(display_freq, level)
-
-
- // --- Broadcast only to intercoms and station-bounced radios ---
-
- else if(data == 2)
- for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"])
- if(R.subspace_transmission)
- continue
- var/turf/position = get_turf(R)
- if(position && position.z == level)
- receive |= R.send_hear(display_freq)
-
-
- // --- Broadcast to syndicate radio! ---
-
- else if(data == 3)
- var/datum/radio_frequency/syndicateconnection = radio_controller.return_frequency(SYND_FREQ)
-
- for (var/obj/item/device/radio/R in syndicateconnection.devices["[RADIO_CHAT]"])
- var/turf/position = get_turf(R)
- if(position && position.z == level)
- receive |= R.send_hear(SYND_FREQ)
-
- // --- Centcom radio, yo. ---
-
- else if(data == 4)
-
- for(var/obj/item/device/radio/R in all_radios["[RADIO_CHAT]"])
- if(R.centcom)
- receive |= R.send_hear(CENTCOM_FREQ)
-
- // --- Broadcast to ALL radio devices ---
-
- else
- for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"])
- var/turf/position = get_turf(R)
- if(position && position.z == level)
- receive |= R.send_hear(display_freq)
-
-
- /* ###### Organize the receivers into categories for displaying the message ###### */
-
- // Understood the message:
- var/list/heard_normal = list() // normal message
-
- // Did not understand the message:
- var/list/heard_garbled = list() // garbled message (ie "f*c* **u, **i*er!")
- var/list/heard_gibberish= list() // completely screwed over message (ie "F%! (O*# *#!<>&**%!")
-
- for (var/mob/R in receive)
-
- /* --- Loop through the receivers and categorize them --- */
-
- if (R.client && !(R.client.prefs.chat_toggles & CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
- continue
-
-
- // --- Check for compression ---
- if(compression > 0)
-
- heard_gibberish += R
- continue
-
- // --- Can understand the speech ---
-
- if (R.languages & M.languages)
-
- heard_normal += R
-
- // --- Can't understand the speech ---
-
- else
- // - Just display a garbled message -
-
- heard_garbled += R
-
-
- /* ###### Begin formatting and sending the message ###### */
- if (length(heard_normal) || length(heard_garbled) || length(heard_gibberish))
-
- /* --- Some miscellaneous variables to format the string output --- */
- var/part_a = "" // goes in the actual output
- var/freq_text // the name of the channel
-
- // --- Set the name of the channel ---
- switch(display_freq)
-
- if(SYND_FREQ)
- freq_text = "#unkn"
- if(COMM_FREQ)
- freq_text = "Command"
- if(SCI_FREQ)
- freq_text = "Science"
- if(MED_FREQ)
- freq_text = "Medical"
- if(ENG_FREQ)
- freq_text = "Engineering"
- if(SEC_FREQ)
- freq_text = "Security"
- if(SERV_FREQ)
- freq_text = "Service"
- if(SUPP_FREQ)
- freq_text = "Supply"
- if(AIPRIV_FREQ)
- freq_text = "AI Private"
- //There's probably a way to use the list var of channels in code\game\communications.dm to make the dept channels non-hardcoded, but I wasn't in an experimentive mood. --NEO
-
-
- // --- If the frequency has not been assigned a name, just use the frequency as the name ---
-
- if(!freq_text)
- freq_text = format_frequency(display_freq)
-
- // --- Some more pre-message formatting ---
-
- var/part_b_extra = ""
- if(data == 3) // intercepted radio message
- part_b_extra = " (Intercepted)"
-
- // Create a radio headset for the sole purpose of using its icon
- var/obj/item/device/radio/headset/radio = new
-
- var/part_b = " \icon[radio]\[[freq_text]\][part_b_extra] "
- var/part_c = ""
-
- if (display_freq==SYND_FREQ)
- part_a = ""
- else if (display_freq==COMM_FREQ)
- part_a = ""
- else if (display_freq==SCI_FREQ)
- part_a = ""
- else if (display_freq==MED_FREQ)
- part_a = ""
- else if (display_freq==ENG_FREQ)
- part_a = ""
- else if (display_freq==SEC_FREQ)
- part_a = ""
- else if (display_freq==SERV_FREQ)
- part_a = ""
- else if (display_freq==SUPP_FREQ)
- part_a = ""
- else if (display_freq==CENTCOM_FREQ)
- part_a = ""
- else if (display_freq==AIPRIV_FREQ)
- part_a = ""
-
- // --- This following recording is intended for research and feedback in the use of department radio channels ---
-
- var/part_blackbox_b = " \[[freq_text]\] "
- var/blackbox_msg = "[part_a][source][part_blackbox_b]\"[text]\"[part_c]"
- //var/blackbox_admin_msg = "[part_a][M.name] (Real name: [M.real_name])[part_blackbox_b][quotedmsg][part_c]"
-
- //BR.messages_admin += blackbox_admin_msg
- if(istype(blackbox))
- switch(display_freq)
- if(1459)
- blackbox.msg_common += blackbox_msg
- if(1351)
- blackbox.msg_science += blackbox_msg
- if(1353)
- blackbox.msg_command += blackbox_msg
- if(1355)
- blackbox.msg_medical += blackbox_msg
- if(1357)
- blackbox.msg_engineering += blackbox_msg
- if(1359)
- blackbox.msg_security += blackbox_msg
- if(1441)
- blackbox.msg_deathsquad += blackbox_msg
- if(1213)
- blackbox.msg_syndicate += blackbox_msg
- if(1349)
- blackbox.msg_service += blackbox_msg
- if(1347)
- blackbox.msg_cargo += blackbox_msg
- else
- blackbox.messages += blackbox_msg
-
- //End of research and feedback code.
-
- /* ###### Send the message ###### */
-
- /* --- Process all the mobs that heard the voice normally (understood) --- */
-
- if (length(heard_normal))
- var/rendered = "[part_a][source][part_b]\"[text]\"[part_c]"
-
- for (var/mob/R in heard_normal)
- R.show_message(rendered, 2)
-
- /* --- Process all the mobs that heard a garbled voice (did not understand) --- */
- // Displays garbled message (ie "f*c* **u, **i*er!")
-
- if (length(heard_garbled))
- var/quotedmsg = "\"[stars(text)]\""
- var/rendered = "[part_a][source][part_b][quotedmsg][part_c]"
-
- for (var/mob/R in heard_garbled)
- R.show_message(rendered, 2)
-
-
- /* --- Complete gibberish. Usually happens when there's a compressed message --- */
-
- if (length(heard_gibberish))
- var/quotedmsg = "\"[Gibberish(text, compression + 50)]\""
- var/rendered = "[part_a][Gibberish(source, compression + 50)][part_b][quotedmsg][part_c]"
-
- for (var/mob/R in heard_gibberish)
- R.show_message(rendered, 2)
-
-//Use this to test if an obj can communicate with a Telecommunications Network
-
-/atom/proc/test_telecomms()
- var/datum/signal/signal = src.telecomms_process()
- var/turf/position = get_turf(src)
- return (position.z in signal.data["level"] && signal.data["done"])
-
-/atom/proc/telecomms_process()
-
- // First, we want to generate a new radio signal
- var/datum/signal/signal = new
- signal.transmission_method = 2 // 2 would be a subspace transmission.
- var/turf/pos = get_turf(src)
-
- // --- Finally, tag the actual signal with the appropriate values ---
- signal.data = list(
- "slow" = 0, // how much to sleep() before broadcasting - simulates net lag
- "message" = "TEST",
- "compression" = rand(45, 50), // If the signal is compressed, compress our message too.
- "traffic" = 0, // dictates the total traffic sum that the signal went through
- "type" = 4, // determines what type of radio input it is: test broadcast
- "reject" = 0,
- "done" = 0,
- "level" = pos.z // The level it is being broadcasted at.
- )
- signal.frequency = 1459// Common channel
-
- //#### Sending the signal to all subspace receivers ####//
- for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
- R.receive_signal(signal)
-
- sleep(rand(10,25))
-
- return signal
-
+
+/**
+
+ Here is the big, bad function that broadcasts a message given the appropriate
+ parameters.
+
+ @param M:
+ Reference to the mob/speaker, stored in signal.data["mob"]
+
+ @param vmask:
+ Boolean value if the mob is "hiding" its identity via voice mask, stored in
+ signal.data["vmask"]
+
+ @param vmessage:
+ If specified, will display this as the message; such as "chimpering"
+ for monkeys if the mob is not understood. Stored in signal.data["vmessage"].
+
+ @param radio:
+ Reference to the radio broadcasting the message, stored in signal.data["radio"]
+
+ @param message:
+ The actual string message to display to mobs who understood mob M. Stored in
+ signal.data["message"]
+
+ @param name:
+ The name to display when a mob receives the message. signal.data["name"]
+
+ @param job:
+ The name job to display for the AI when it receives the message. signal.data["job"]
+
+ @param realname:
+ The "real" name associated with the mob. signal.data["realname"]
+
+ @param vname:
+ If specified, will use this name when mob M is not understood. signal.data["vname"]
+
+ @param data:
+ If specified:
+ 1 -- Will only broadcast to intercoms
+ 2 -- Will only broadcast to intercoms and station-bounced radios
+ 3 -- Broadcast to syndicate frequency
+ 4 -- AI can't track down this person. Useful for imitation broadcasts where you can't find the actual mob
+
+ @param compression:
+ If 0, the signal is audible
+ If nonzero, the signal may be partially inaudible or just complete gibberish.
+
+ @param level:
+ The list of Z levels that the sending radio is broadcasting to. Having 0 in the list broadcasts on all levels
+
+ @param freq
+ The frequency of the signal
+
+**/
+
+
+/proc/Broadcast_Message(var/atom/movable/AM,
+ var/vmask, var/obj/item/device/radio/radio,
+ var/message, var/name, var/job, var/realname,
+ var/data, var/compression, var/list/level, var/freq, var/list/spans,
+ var/verb_say, var/verb_ask, var/verb_exclaim, var/verb_yell)
+
+ message = copytext(message, 1, MAX_BROADCAST_LEN)
+
+ if(!message)
+ return
+
+ var/list/radios = list()
+
+ var/atom/movable/virtualspeaker/virt = PoolOrNew(/atom/movable/virtualspeaker,null)
+ virt.name = name
+ virt.job = job
+ virt.languages = AM.languages
+ virt.source = AM
+ virt.faketrack = data == 4 ? 1 : 0
+ virt.radio = radio
+ virt.verb_say = verb_say
+ virt.verb_ask = verb_ask
+ virt.verb_exclaim = verb_exclaim
+ virt.verb_yell = verb_yell
+
+ if(compression > 0)
+ message = Gibberish(message, compression + 40)
+
+ // --- Broadcast only to intercom devices ---
+
+ if(data == 1)
+ for(var/obj/item/device/radio/intercom/R in all_radios["[freq]"])
+ if(R.receive_range(freq, level) > -1)
+ radios += R
+
+ // --- Broadcast only to intercoms and station-bounced radios ---
+
+ else if(data == 2)
+
+ for(var/obj/item/device/radio/R in all_radios["[freq]"])
+ if(R.subspace_transmission)
+ continue
+
+ if(R.receive_range(freq, level) > -1)
+ radios += R
+
+ // --- This space left blank for Syndicate data ---
+
+ // --- Centcom radio, yo. ---
+
+ else if(data == 4)
+
+ for(var/obj/item/device/radio/R in all_radios["[freq]"])
+ if(!R.centcom)
+ continue
+
+ if(R.receive_range(freq, level) > -1)
+ radios += R
+
+ // --- Broadcast to ALL radio devices ---
+
+ else
+ for(var/obj/item/device/radio/R in all_radios["[freq]"])
+ if(R.receive_range(freq, level) > -1)
+ radios += R
+
+ var/freqtext = num2text(freq)
+ for(var/obj/item/device/radio/R in all_radios["[SYND_FREQ]"]) //syndicate radios use magic that allows them to hear everything. this was already the case, now it just doesn't need the allinone anymore. solves annoying bugs that aren't worth solving.
+ if(R.receive_range(SYND_FREQ, list(R.z)) > -1 && freqtext in radiochannelsreverse)
+ radios |= R
+
+ // Get a list of mobs who can hear from the radios we collected.
+ var/list/receive = get_mobs_in_radio_ranges(radios) //this includes all hearers.
+
+ for(var/mob/R in receive) //Filter receiver list.
+ if (R.client && R.client.holder && !(R.client.prefs.chat_toggles & CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
+ receive -= R
+
+ for(var/mob/M in player_list)
+ if(isobserver(M) && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTRADIO))
+ receive |= M
+
+ var/rendered = virt.compose_message(virt, virt.languages, message, freq, spans) //Always call this on the virtualspeaker to advoid issues.
+ for(var/atom/movable/hearer in receive)
+ hearer.Hear(rendered, virt, AM.languages, message, freq, spans)
+
+ if(length(receive))
+ // --- This following recording is intended for research and feedback in the use of department radio channels ---
+
+ var/blackbox_msg = "[AM] [AM.say_quote(message, spans)]"
+ if(istype(blackbox))
+ switch(freq)
+ if(1459)
+ blackbox.msg_common += blackbox_msg
+ if(1351)
+ blackbox.msg_science += blackbox_msg
+ if(1353)
+ blackbox.msg_command += blackbox_msg
+ if(1355)
+ blackbox.msg_medical += blackbox_msg
+ if(1357)
+ blackbox.msg_engineering += blackbox_msg
+ if(1359)
+ blackbox.msg_security += blackbox_msg
+ if(1441)
+ blackbox.msg_deathsquad += blackbox_msg
+ if(1213)
+ blackbox.msg_syndicate += blackbox_msg
+ if(1349)
+ blackbox.msg_service += blackbox_msg
+ if(1347)
+ blackbox.msg_cargo += blackbox_msg
+ else
+ blackbox.messages += blackbox_msg
+
+ spawn(50)
+ PlaceInPool(virt)
+
+/proc/Broadcast_SimpleMessage(var/source, var/frequency, var/text, var/data, var/mob/M, var/compression, var/level)
+
+ /* ###### Prepare the radio connection ###### */
+
+ if(!M)
+ var/mob/living/carbon/human/H = new
+ M = H
+
+ var/datum/radio_frequency/connection = radio_controller.return_frequency(frequency)
+
+ var/display_freq = connection.frequency
+
+ var/list/receive = list()
+
+
+ // --- Broadcast only to intercom devices ---
+
+ if(data == 1)
+ for (var/obj/item/device/radio/intercom/R in connection.devices["[RADIO_CHAT]"])
+ var/turf/position = get_turf(R)
+ if(position && position.z == level)
+ receive |= R.send_hear(display_freq, level)
+
+
+ // --- Broadcast only to intercoms and station-bounced radios ---
+
+ else if(data == 2)
+ for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"])
+ if(R.subspace_transmission)
+ continue
+ var/turf/position = get_turf(R)
+ if(position && position.z == level)
+ receive |= R.send_hear(display_freq)
+
+
+ // --- Broadcast to syndicate radio! ---
+
+ else if(data == 3)
+ var/datum/radio_frequency/syndicateconnection = radio_controller.return_frequency(SYND_FREQ)
+
+ for (var/obj/item/device/radio/R in syndicateconnection.devices["[RADIO_CHAT]"])
+ var/turf/position = get_turf(R)
+ if(position && position.z == level)
+ receive |= R.send_hear(SYND_FREQ)
+
+ // --- Centcom radio, yo. ---
+
+ else if(data == 4)
+
+ for(var/obj/item/device/radio/R in all_radios["[RADIO_CHAT]"])
+ if(R.centcom)
+ receive |= R.send_hear(CENTCOM_FREQ)
+
+ // --- Broadcast to ALL radio devices ---
+
+ else
+ for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"])
+ var/turf/position = get_turf(R)
+ if(position && position.z == level)
+ receive |= R.send_hear(display_freq)
+
+
+ /* ###### Organize the receivers into categories for displaying the message ###### */
+
+ // Understood the message:
+ var/list/heard_normal = list() // normal message
+
+ // Did not understand the message:
+ var/list/heard_garbled = list() // garbled message (ie "f*c* **u, **i*er!")
+ var/list/heard_gibberish= list() // completely screwed over message (ie "F%! (O*# *#!<>&**%!")
+
+ for (var/mob/R in receive)
+
+ /* --- Loop through the receivers and categorize them --- */
+
+ if (R.client && !(R.client.prefs.chat_toggles & CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
+ continue
+
+
+ // --- Check for compression ---
+ if(compression > 0)
+
+ heard_gibberish += R
+ continue
+
+ // --- Can understand the speech ---
+
+ if (R.languages & M.languages)
+
+ heard_normal += R
+
+ // --- Can't understand the speech ---
+
+ else
+ // - Just display a garbled message -
+
+ heard_garbled += R
+
+
+ /* ###### Begin formatting and sending the message ###### */
+ if (length(heard_normal) || length(heard_garbled) || length(heard_gibberish))
+
+ /* --- Some miscellaneous variables to format the string output --- */
+ var/part_a = "" // goes in the actual output
+ var/freq_text // the name of the channel
+
+ // --- Set the name of the channel ---
+ switch(display_freq)
+
+ if(SYND_FREQ)
+ freq_text = "#unkn"
+ if(COMM_FREQ)
+ freq_text = "Command"
+ if(SCI_FREQ)
+ freq_text = "Science"
+ if(MED_FREQ)
+ freq_text = "Medical"
+ if(ENG_FREQ)
+ freq_text = "Engineering"
+ if(SEC_FREQ)
+ freq_text = "Security"
+ if(SERV_FREQ)
+ freq_text = "Service"
+ if(SUPP_FREQ)
+ freq_text = "Supply"
+ if(AIPRIV_FREQ)
+ freq_text = "AI Private"
+ //There's probably a way to use the list var of channels in code\game\communications.dm to make the dept channels non-hardcoded, but I wasn't in an experimentive mood. --NEO
+
+
+ // --- If the frequency has not been assigned a name, just use the frequency as the name ---
+
+ if(!freq_text)
+ freq_text = format_frequency(display_freq)
+
+ // --- Some more pre-message formatting ---
+
+ var/part_b_extra = ""
+ if(data == 3) // intercepted radio message
+ part_b_extra = " (Intercepted)"
+
+ // Create a radio headset for the sole purpose of using its icon
+ var/obj/item/device/radio/headset/radio = new
+
+ var/part_b = " \icon[radio]\[[freq_text]\][part_b_extra] "
+ var/part_c = ""
+
+ if (display_freq==SYND_FREQ)
+ part_a = ""
+ else if (display_freq==COMM_FREQ)
+ part_a = ""
+ else if (display_freq==SCI_FREQ)
+ part_a = ""
+ else if (display_freq==MED_FREQ)
+ part_a = ""
+ else if (display_freq==ENG_FREQ)
+ part_a = ""
+ else if (display_freq==SEC_FREQ)
+ part_a = ""
+ else if (display_freq==SERV_FREQ)
+ part_a = ""
+ else if (display_freq==SUPP_FREQ)
+ part_a = ""
+ else if (display_freq==CENTCOM_FREQ)
+ part_a = ""
+ else if (display_freq==AIPRIV_FREQ)
+ part_a = ""
+
+ // --- This following recording is intended for research and feedback in the use of department radio channels ---
+
+ var/part_blackbox_b = " \[[freq_text]\] "
+ var/blackbox_msg = "[part_a][source][part_blackbox_b]\"[text]\"[part_c]"
+ //var/blackbox_admin_msg = "[part_a][M.name] (Real name: [M.real_name])[part_blackbox_b][quotedmsg][part_c]"
+
+ //BR.messages_admin += blackbox_admin_msg
+ if(istype(blackbox))
+ switch(display_freq)
+ if(1459)
+ blackbox.msg_common += blackbox_msg
+ if(1351)
+ blackbox.msg_science += blackbox_msg
+ if(1353)
+ blackbox.msg_command += blackbox_msg
+ if(1355)
+ blackbox.msg_medical += blackbox_msg
+ if(1357)
+ blackbox.msg_engineering += blackbox_msg
+ if(1359)
+ blackbox.msg_security += blackbox_msg
+ if(1441)
+ blackbox.msg_deathsquad += blackbox_msg
+ if(1213)
+ blackbox.msg_syndicate += blackbox_msg
+ if(1349)
+ blackbox.msg_service += blackbox_msg
+ if(1347)
+ blackbox.msg_cargo += blackbox_msg
+ else
+ blackbox.messages += blackbox_msg
+
+ //End of research and feedback code.
+
+ /* ###### Send the message ###### */
+
+ /* --- Process all the mobs that heard the voice normally (understood) --- */
+
+ if (length(heard_normal))
+ var/rendered = "[part_a][source][part_b]\"[text]\"[part_c]"
+
+ for (var/mob/R in heard_normal)
+ R.show_message(rendered, 2)
+
+ /* --- Process all the mobs that heard a garbled voice (did not understand) --- */
+ // Displays garbled message (ie "f*c* **u, **i*er!")
+
+ if (length(heard_garbled))
+ var/quotedmsg = "\"[stars(text)]\""
+ var/rendered = "[part_a][source][part_b][quotedmsg][part_c]"
+
+ for (var/mob/R in heard_garbled)
+ R.show_message(rendered, 2)
+
+
+ /* --- Complete gibberish. Usually happens when there's a compressed message --- */
+
+ if (length(heard_gibberish))
+ var/quotedmsg = "\"[Gibberish(text, compression + 50)]\""
+ var/rendered = "[part_a][Gibberish(source, compression + 50)][part_b][quotedmsg][part_c]"
+
+ for (var/mob/R in heard_gibberish)
+ R.show_message(rendered, 2)
+
+//Use this to test if an obj can communicate with a Telecommunications Network
+
+/atom/proc/test_telecomms()
+ var/datum/signal/signal = src.telecomms_process()
+ var/turf/position = get_turf(src)
+ return (position.z in signal.data["level"] && signal.data["done"])
+
+/atom/proc/telecomms_process()
+
+ // First, we want to generate a new radio signal
+ var/datum/signal/signal = new
+ signal.transmission_method = 2 // 2 would be a subspace transmission.
+ var/turf/pos = get_turf(src)
+
+ // --- Finally, tag the actual signal with the appropriate values ---
+ signal.data = list(
+ "slow" = 0, // how much to sleep() before broadcasting - simulates net lag
+ "message" = "TEST",
+ "compression" = rand(45, 50), // If the signal is compressed, compress our message too.
+ "traffic" = 0, // dictates the total traffic sum that the signal went through
+ "type" = 4, // determines what type of radio input it is: test broadcast
+ "reject" = 0,
+ "done" = 0,
+ "level" = pos.z // The level it is being broadcasted at.
+ )
+ signal.frequency = 1459// Common channel
+
+ //#### Sending the signal to all subspace receivers ####//
+ for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
+ R.receive_signal(signal)
+
+ sleep(rand(10,25))
+
+ return signal
+
diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/computers/logbrowser.dm
similarity index 96%
rename from code/game/machinery/telecomms/logbrowser.dm
rename to code/game/machinery/telecomms/computers/logbrowser.dm
index b7ebd4314ac..8798f07c20c 100644
--- a/code/game/machinery/telecomms/logbrowser.dm
+++ b/code/game/machinery/telecomms/computers/logbrowser.dm
@@ -1,232 +1,232 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-
-/obj/machinery/computer/telecomms/server
- name = "telecommunications server monitoring console"
- icon_state = "comm_logs"
-
- var/screen = 0 // the screen number:
- var/list/servers = list() // the servers located by the computer
- var/obj/machinery/telecomms/server/SelectedServer
-
- var/network = "NULL" // the network to probe
- var/temp = "" // temporary feedback messages
-
- var/universal_translate = 0 // set to 1 if it can translate nonhuman speech
-
- req_access = list(access_tcomsat)
- circuit = "/obj/item/weapon/circuitboard/comm_server"
-
-/obj/machinery/computer/telecomms/server/attack_hand(mob/user as mob)
- if(..())
- return
- user.set_machine(src)
- var/dat = "Telecommunication Server MonitorTelecommunications Server Monitor"
-
- switch(screen)
-
-
- // --- Main Menu ---
-
- if(0)
- dat += "
[temp]
"
- dat += "
Current Network: [network]
"
- if(servers.len)
- dat += "
Detected Telecommunication Servers:"
- for(var/obj/machinery/telecomms/T in servers)
- dat += "- \ref[T] [T.name] ([T.id])
"
- dat += "
"
- dat += "
\[Flush Buffer\]"
-
- else
- dat += "
No servers detected. Scan for servers: \[Scan\]"
-
-
- // --- Viewing Server ---
-
- if(1)
- dat += "
[temp]
"
- dat += "\[Main Menu\] \[Refresh\]"
- dat += "
Current Network: [network]"
- dat += "
Selected Server: [SelectedServer.id]"
-
- if(SelectedServer.totaltraffic >= 1024)
- dat += "
Total recorded traffic: [round(SelectedServer.totaltraffic / 1024)] Terrabytes
"
- else
- dat += "
Total recorded traffic: [SelectedServer.totaltraffic] Gigabytes
"
-
- dat += "Stored Logs: "
-
- var/i = 0
- for(var/datum/comm_log_entry/C in SelectedServer.log_entries)
- i++
-
-
- // If the log is a speech file
- if(C.input_type == "Speech File")
-
- dat += "- [C.name] \[X\]
"
-
- // -- Determine race of orator --
-
- var/race // The actual race of the mob
- var/language = "Human" // MMIs, pAIs, Cyborgs and humans all speak Human
- var/mobtype = C.parameters["mobtype"]
-
- var/list/humans = typesof(/mob/living/carbon/human, /mob/living/carbon/brain)
- var/list/monkeys = typesof(/mob/living/carbon/monkey)
- var/list/silicons = typesof(/mob/living/silicon)
- var/list/slimes = typesof(/mob/living/simple_animal/slime)
- var/list/animals = typesof(/mob/living/simple_animal)
-
- if(mobtype in humans)
- race = "Human"
- language = race
-
- else if(mobtype in slimes) // NT knows a lot about slimes, but not aliens. Can identify slimes
- race = "Slime"
- language = race
-
- else if(mobtype in monkeys)
- race = "Monkey"
- language = race
-
- else if(mobtype in silicons || C.parameters["job"] == "AI") // sometimes M gets deleted prematurely for AIs... just check the job
- race = "Artificial Life"
- language = race
-
- else if(istype(mobtype, /obj))
- race = "Machinery"
- language = race
-
- else if(mobtype in animals)
- race = "Domestic Animal"
- language = race
-
- else
- race = "Unidentifiable"
- language = race
-
- // -- If the orator is a human, or universal translate is active, OR mob has universal speech on --
-
- if(language == "Human" || universal_translate || C.parameters["uspeech"])
- dat += "Data type: [C.input_type]
"
- dat += "Source: [C.parameters["name"]] (Job: [C.parameters["job"]])
"
- dat += "Class: [race]
"
- dat += "Contents: \"[C.parameters["message"]]\"
"
-
-
- // -- Orator is not human and universal translate not active --
-
- else
- dat += "Data type: Audio File
"
- dat += "Source: Unidentifiable
"
- dat += "Class: [race]
"
- dat += "Contents: Unintelligble
"
-
- dat += "
"
-
- else if(C.input_type == "Execution Error")
-
- dat += "- [C.name] \[X\]
"
- dat += "Output: \"[C.parameters["message"]]\"
"
- dat += "
"
-
-
- dat += "
"
-
-
-
- user << browse(dat, "window=comm_monitor;size=575x400")
- onclose(user, "server_control")
-
- temp = ""
- return
-
-
-/obj/machinery/computer/telecomms/server/Topic(href, href_list)
- if(..())
- return
-
-
- add_fingerprint(usr)
- usr.set_machine(src)
-
- if(href_list["viewserver"])
- screen = 1
- for(var/obj/machinery/telecomms/T in servers)
- if(T.id == href_list["viewserver"])
- SelectedServer = T
- break
-
- if(href_list["operation"])
- switch(href_list["operation"])
-
- if("release")
- servers = list()
- screen = 0
-
- if("mainmenu")
- screen = 0
-
- if("scan")
- if(servers.len > 0)
- temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -"
-
- else
- for(var/obj/machinery/telecomms/server/T in range(25, src))
- if(T.network == network)
- servers.Add(T)
-
- if(!servers.len)
- temp = "- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -"
- else
- temp = "- [servers.len] SERVERS PROBED & BUFFERED -"
-
- screen = 0
-
- if(href_list["delete"])
-
- if(!src.allowed(usr) && !emagged)
- usr << "ACCESS DENIED."
- return
-
- if(SelectedServer)
-
- var/datum/comm_log_entry/D = SelectedServer.log_entries[text2num(href_list["delete"])]
-
- temp = "- DELETED ENTRY: [D.name] -"
-
- SelectedServer.log_entries.Remove(D)
- del(D)
-
- else
- temp = "- FAILED: NO SELECTED MACHINE -"
-
- if(href_list["network"])
-
- var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network)
-
- if(newnet && ((usr in range(1, src) || issilicon(usr))))
- if(length(newnet) > 15)
- temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -"
-
- else
-
- network = newnet
- screen = 0
- servers = list()
- temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -"
-
- updateUsrDialog()
- return
-
-/obj/machinery/computer/telecomms/server/attackby()
- ..()
- src.updateUsrDialog()
- return
-
-/obj/machinery/computer/telecomms/server/emag_act(mob/user as mob)
- if(!emagged)
- playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
- emagged = 1
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
+
+/obj/machinery/computer/telecomms/server
+ name = "telecommunications server monitoring console"
+ icon_state = "comm_logs"
+
+ var/screen = 0 // the screen number:
+ var/list/servers = list() // the servers located by the computer
+ var/obj/machinery/telecomms/server/SelectedServer
+
+ var/network = "NULL" // the network to probe
+ var/temp = "" // temporary feedback messages
+
+ var/universal_translate = 0 // set to 1 if it can translate nonhuman speech
+
+ req_access = list(access_tcomsat)
+ circuit = "/obj/item/weapon/circuitboard/comm_server"
+
+/obj/machinery/computer/telecomms/server/attack_hand(mob/user as mob)
+ if(..())
+ return
+ user.set_machine(src)
+ var/dat = "Telecommunication Server MonitorTelecommunications Server Monitor"
+
+ switch(screen)
+
+
+ // --- Main Menu ---
+
+ if(0)
+ dat += "
[temp]
"
+ dat += "
Current Network: [network]
"
+ if(servers.len)
+ dat += "
Detected Telecommunication Servers:"
+ for(var/obj/machinery/telecomms/T in servers)
+ dat += "- \ref[T] [T.name] ([T.id])
"
+ dat += "
"
+ dat += "
\[Flush Buffer\]"
+
+ else
+ dat += "
No servers detected. Scan for servers: \[Scan\]"
+
+
+ // --- Viewing Server ---
+
+ if(1)
+ dat += "
[temp]
"
+ dat += "\[Main Menu\] \[Refresh\]"
+ dat += "
Current Network: [network]"
+ dat += "
Selected Server: [SelectedServer.id]"
+
+ if(SelectedServer.totaltraffic >= 1024)
+ dat += "
Total recorded traffic: [round(SelectedServer.totaltraffic / 1024)] Terrabytes
"
+ else
+ dat += "
Total recorded traffic: [SelectedServer.totaltraffic] Gigabytes
"
+
+ dat += "Stored Logs: "
+
+ var/i = 0
+ for(var/datum/comm_log_entry/C in SelectedServer.log_entries)
+ i++
+
+
+ // If the log is a speech file
+ if(C.input_type == "Speech File")
+
+ dat += "- [C.name] \[X\]
"
+
+ // -- Determine race of orator --
+
+ var/race // The actual race of the mob
+ var/language = "Human" // MMIs, pAIs, Cyborgs and humans all speak Human
+ var/mobtype = C.parameters["mobtype"]
+
+ var/list/humans = typesof(/mob/living/carbon/human, /mob/living/carbon/brain)
+ var/list/monkeys = typesof(/mob/living/carbon/monkey)
+ var/list/silicons = typesof(/mob/living/silicon)
+ var/list/slimes = typesof(/mob/living/simple_animal/slime)
+ var/list/animals = typesof(/mob/living/simple_animal)
+
+ if(mobtype in humans)
+ race = "Human"
+ language = race
+
+ else if(mobtype in slimes) // NT knows a lot about slimes, but not aliens. Can identify slimes
+ race = "Slime"
+ language = race
+
+ else if(mobtype in monkeys)
+ race = "Monkey"
+ language = race
+
+ else if(mobtype in silicons || C.parameters["job"] == "AI") // sometimes M gets deleted prematurely for AIs... just check the job
+ race = "Artificial Life"
+ language = race
+
+ else if(istype(mobtype, /obj))
+ race = "Machinery"
+ language = race
+
+ else if(mobtype in animals)
+ race = "Domestic Animal"
+ language = race
+
+ else
+ race = "Unidentifiable"
+ language = race
+
+ // -- If the orator is a human, or universal translate is active, OR mob has universal speech on --
+
+ if(language == "Human" || universal_translate || C.parameters["uspeech"])
+ dat += "Data type: [C.input_type]
"
+ dat += "Source: [C.parameters["name"]] (Job: [C.parameters["job"]])
"
+ dat += "Class: [race]
"
+ dat += "Contents: \"[C.parameters["message"]]\"
"
+
+
+ // -- Orator is not human and universal translate not active --
+
+ else
+ dat += "Data type: Audio File
"
+ dat += "Source: Unidentifiable
"
+ dat += "Class: [race]
"
+ dat += "Contents: Unintelligble
"
+
+ dat += "
"
+
+ else if(C.input_type == "Execution Error")
+
+ dat += "- [C.name] \[X\]
"
+ dat += "Output: \"[C.parameters["message"]]\"
"
+ dat += "
"
+
+
+ dat += "
"
+
+
+
+ user << browse(dat, "window=comm_monitor;size=575x400")
+ onclose(user, "server_control")
+
+ temp = ""
+ return
+
+
+/obj/machinery/computer/telecomms/server/Topic(href, href_list)
+ if(..())
+ return
+
+
+ add_fingerprint(usr)
+ usr.set_machine(src)
+
+ if(href_list["viewserver"])
+ screen = 1
+ for(var/obj/machinery/telecomms/T in servers)
+ if(T.id == href_list["viewserver"])
+ SelectedServer = T
+ break
+
+ if(href_list["operation"])
+ switch(href_list["operation"])
+
+ if("release")
+ servers = list()
+ screen = 0
+
+ if("mainmenu")
+ screen = 0
+
+ if("scan")
+ if(servers.len > 0)
+ temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -"
+
+ else
+ for(var/obj/machinery/telecomms/server/T in range(25, src))
+ if(T.network == network)
+ servers.Add(T)
+
+ if(!servers.len)
+ temp = "- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -"
+ else
+ temp = "- [servers.len] SERVERS PROBED & BUFFERED -"
+
+ screen = 0
+
+ if(href_list["delete"])
+
+ if(!src.allowed(usr) && !emagged)
+ usr << "ACCESS DENIED."
+ return
+
+ if(SelectedServer)
+
+ var/datum/comm_log_entry/D = SelectedServer.log_entries[text2num(href_list["delete"])]
+
+ temp = "- DELETED ENTRY: [D.name] -"
+
+ SelectedServer.log_entries.Remove(D)
+ del(D)
+
+ else
+ temp = "- FAILED: NO SELECTED MACHINE -"
+
+ if(href_list["network"])
+
+ var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network)
+
+ if(newnet && ((usr in range(1, src) || issilicon(usr))))
+ if(length(newnet) > 15)
+ temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -"
+
+ else
+
+ network = newnet
+ screen = 0
+ servers = list()
+ temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -"
+
+ updateUsrDialog()
+ return
+
+/obj/machinery/computer/telecomms/server/attackby()
+ ..()
+ src.updateUsrDialog()
+ return
+
+/obj/machinery/computer/telecomms/server/emag_act(mob/user as mob)
+ if(!emagged)
+ playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
+ emagged = 1
user << "You you disable the security protocols."
\ No newline at end of file
diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/computers/telemonitor.dm
similarity index 94%
rename from code/game/machinery/telecomms/telemonitor.dm
rename to code/game/machinery/telecomms/computers/telemonitor.dm
index 4943a70429a..432604dc15e 100644
--- a/code/game/machinery/telecomms/telemonitor.dm
+++ b/code/game/machinery/telecomms/computers/telemonitor.dm
@@ -1,136 +1,134 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
-
-
-/*
- Telecomms monitor tracks the overall trafficing of a telecommunications network
- and displays a heirarchy of linked machines.
-*/
-
-
-/obj/machinery/computer/telecomms/monitor
- name = "telecommunications monitoring console"
- icon_state = "comm_monitor"
-
- var/screen = 0 // the screen number:
- var/list/machinelist = list() // the machines located by the computer
- var/obj/machinery/telecomms/SelectedMachine
-
- var/network = "NULL" // the network to probe
-
- var/temp = "" // temporary feedback messages
- circuit = "/obj/item/weapon/circuitboard/comm_monitor"
-
-/obj/machinery/computer/telecomms/monitor/attack_hand(mob/user as mob)
- if(..())
- return
- user.set_machine(src)
- var/dat = "Telecommunications MonitorTelecommunications Monitor"
-
- switch(screen)
-
-
- // --- Main Menu ---
-
- if(0)
- dat += "
[temp]
"
- dat += "
Current Network: [network]
"
- if(machinelist.len)
- dat += "
Detected Network Entities:"
- for(var/obj/machinery/telecomms/T in machinelist)
- dat += "- \ref[T] [T.name] ([T.id])
"
- dat += "
"
- dat += "
\[Flush Buffer\]"
- else
- dat += "\[Probe Network\]"
-
-
- // --- Viewing Machine ---
-
- if(1)
- dat += "
[temp]
"
- dat += "\[Main Menu\]"
- dat += "
Current Network: [network]
"
- dat += "Selected Network Entity: [SelectedMachine.name] ([SelectedMachine.id])
"
- dat += "Linked Entities: "
- for(var/obj/machinery/telecomms/T in SelectedMachine.links)
- if(!T.hide)
- dat += "- \ref[T.id] [T.name] ([T.id])
"
- dat += "
"
-
-
-
- user << browse(dat, "window=comm_monitor;size=575x400")
- onclose(user, "server_control")
-
- temp = ""
- return
-
-
-/obj/machinery/computer/telecomms/monitor/Topic(href, href_list)
- if(..())
- return
-
-
- add_fingerprint(usr)
- usr.set_machine(src)
-
- if(href_list["viewmachine"])
- screen = 1
- for(var/obj/machinery/telecomms/T in machinelist)
- if(T.id == href_list["viewmachine"])
- SelectedMachine = T
- break
-
- if(href_list["operation"])
- switch(href_list["operation"])
-
- if("release")
- machinelist = list()
- screen = 0
-
- if("mainmenu")
- screen = 0
-
- if("probe")
- if(machinelist.len > 0)
- temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -"
-
- else
- for(var/obj/machinery/telecomms/T in range(25, src))
- if(T.network == network)
- machinelist.Add(T)
-
- if(!machinelist.len)
- temp = "- FAILED: UNABLE TO LOCATE NETWORK ENTITIES IN \[[network]\] -"
- else
- temp = "- [machinelist.len] ENTITIES LOCATED & BUFFERED -"
-
- screen = 0
-
-
- if(href_list["network"])
-
- var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network)
- if(newnet && ((usr in range(1, src) || issilicon(usr))))
- if(length(newnet) > 15)
- temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -"
-
- else
- network = newnet
- screen = 0
- machinelist = list()
- temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -"
-
- updateUsrDialog()
- return
-
-/obj/machinery/computer/telecomms/monitor/attackby()
- ..()
- src.updateUsrDialog()
- return
-
-/obj/machinery/computer/telecomms/monitor/emag_act(mob/user as mob)
- if(!emagged)
- playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
- emagged = 1
+
+/*
+ Telecomms monitor tracks the overall trafficing of a telecommunications network
+ and displays a heirarchy of linked machines.
+*/
+
+
+/obj/machinery/computer/telecomms/monitor
+ name = "telecommunications monitoring console"
+ icon_state = "comm_monitor"
+
+ var/screen = 0 // the screen number:
+ var/list/machinelist = list() // the machines located by the computer
+ var/obj/machinery/telecomms/SelectedMachine
+
+ var/network = "NULL" // the network to probe
+
+ var/temp = "" // temporary feedback messages
+ circuit = "/obj/item/weapon/circuitboard/comm_monitor"
+
+/obj/machinery/computer/telecomms/monitor/attack_hand(mob/user as mob)
+ if(..())
+ return
+ user.set_machine(src)
+ var/dat = "Telecommunications MonitorTelecommunications Monitor"
+
+ switch(screen)
+
+
+ // --- Main Menu ---
+
+ if(0)
+ dat += "
[temp]
"
+ dat += "
Current Network: [network]
"
+ if(machinelist.len)
+ dat += "
Detected Network Entities:"
+ for(var/obj/machinery/telecomms/T in machinelist)
+ dat += "- \ref[T] [T.name] ([T.id])
"
+ dat += "
"
+ dat += "
\[Flush Buffer\]"
+ else
+ dat += "\[Probe Network\]"
+
+
+ // --- Viewing Machine ---
+
+ if(1)
+ dat += "
[temp]
"
+ dat += "\[Main Menu\]"
+ dat += "
Current Network: [network]
"
+ dat += "Selected Network Entity: [SelectedMachine.name] ([SelectedMachine.id])
"
+ dat += "Linked Entities: "
+ for(var/obj/machinery/telecomms/T in SelectedMachine.links)
+ if(!T.hide)
+ dat += "- \ref[T.id] [T.name] ([T.id])
"
+ dat += "
"
+
+
+
+ user << browse(dat, "window=comm_monitor;size=575x400")
+ onclose(user, "server_control")
+
+ temp = ""
+ return
+
+
+/obj/machinery/computer/telecomms/monitor/Topic(href, href_list)
+ if(..())
+ return
+
+
+ add_fingerprint(usr)
+ usr.set_machine(src)
+
+ if(href_list["viewmachine"])
+ screen = 1
+ for(var/obj/machinery/telecomms/T in machinelist)
+ if(T.id == href_list["viewmachine"])
+ SelectedMachine = T
+ break
+
+ if(href_list["operation"])
+ switch(href_list["operation"])
+
+ if("release")
+ machinelist = list()
+ screen = 0
+
+ if("mainmenu")
+ screen = 0
+
+ if("probe")
+ if(machinelist.len > 0)
+ temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -"
+
+ else
+ for(var/obj/machinery/telecomms/T in range(25, src))
+ if(T.network == network)
+ machinelist.Add(T)
+
+ if(!machinelist.len)
+ temp = "- FAILED: UNABLE TO LOCATE NETWORK ENTITIES IN \[[network]\] -"
+ else
+ temp = "- [machinelist.len] ENTITIES LOCATED & BUFFERED -"
+
+ screen = 0
+
+
+ if(href_list["network"])
+
+ var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network)
+ if(newnet && ((usr in range(1, src) || issilicon(usr))))
+ if(length(newnet) > 15)
+ temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -"
+
+ else
+ network = newnet
+ screen = 0
+ machinelist = list()
+ temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -"
+
+ updateUsrDialog()
+ return
+
+/obj/machinery/computer/telecomms/monitor/attackby()
+ ..()
+ src.updateUsrDialog()
+ return
+
+/obj/machinery/computer/telecomms/monitor/emag_act(mob/user as mob)
+ if(!emagged)
+ playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
+ emagged = 1
user << "You you disable the security protocols."
\ No newline at end of file
diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/computers/traffic_control.dm
similarity index 95%
rename from code/game/machinery/telecomms/traffic_control.dm
rename to code/game/machinery/telecomms/computers/traffic_control.dm
index d00a030350c..3edb25ff551 100644
--- a/code/game/machinery/telecomms/traffic_control.dm
+++ b/code/game/machinery/telecomms/computers/traffic_control.dm
@@ -1,290 +1,286 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
-
-
-
-
-
-/obj/machinery/computer/telecomms/traffic
- name = "telecommunications traffic control console"
- icon_state = "computer_generic"
-
- var/screen = 0 // the screen number:
- var/list/servers = list() // the servers located by the computer
- var/mob/editingcode
- var/mob/lasteditor
- var/list/viewingcode = list()
- var/obj/machinery/telecomms/server/SelectedServer
-
- var/network = "NULL" // the network to probe
- var/temp = "" // temporary feedback messages
-
- var/storedcode = "" // code stored
- var/obj/item/weapon/card/id/auth = null
- var/list/access_log = list()
- var/process = 0
- circuit = "/obj/item/weapon/circuitboard/comm_traffic"
-
- req_access = list(access_tcomsat)
-
-/obj/machinery/computer/telecomms/traffic/proc/stop_editing()
- if(editingcode)
- if(editingcode.client)
- winshow(editingcode, "Telecomms IDE", 0) // hide the window!
- editingcode.unset_machine()
- editingcode = null
-
-/obj/machinery/computer/telecomms/traffic/process()
-
- if(stat & (NOPOWER|BROKEN))
- stop_editing()
- return
-
- if(editingcode && editingcode.machine != src)
- stop_editing()
- return
-
- if(!editingcode)
- if(length(viewingcode) > 0)
- editingcode = pick(viewingcode)
- viewingcode.Remove(editingcode)
- return
-
- process = !process
- if(!process)
- return
-
- // loop if there's someone manning the keyboard
- if(!editingcode.client)
- stop_editing()
- return
-
- // For the typer, the input is enabled. Buffer the typed text
- storedcode = "[winget(editingcode, "tcscode", "text")]"
- winset(editingcode, "tcscode", "is-disabled=false")
-
- // If the player's not manning the keyboard anymore, adjust everything
- if(!in_range(editingcode, src) && !issilicon(editingcode) || editingcode.machine != src)
- winshow(editingcode, "Telecomms IDE", 0) // hide the window!
- editingcode = null
- return
-
- // For other people viewing the typer type code, the input is disabled and they can only view the code
- // (this is put in place so that there's not any magical shenanigans with 50 people inputting different code all at once)
-
- if(length(viewingcode))
- // This piece of code is very important - it escapes quotation marks so string aren't cut off by the input element
- var/showcode = replacetext(storedcode, "\\\"", "\\\\\"")
- showcode = replacetext(storedcode, "\"", "\\\"")
-
- for(var/mob/M in viewingcode)
-
- if( (M.machine == src && in_range(M, src) ) || issilicon(M))
- winset(M, "tcscode", "is-disabled=true")
- winset(M, "tcscode", "text=\"[showcode]\"")
- else
- viewingcode.Remove(M)
- winshow(M, "Telecomms IDE", 0) // hide the windows
-
-
-/obj/machinery/computer/telecomms/traffic/attack_hand(mob/user as mob)
- if(..())
- return
- user.set_machine(src)
- var/dat = "Telecommunication Traffic ControlTelecommunications Traffic Control"
- dat += "
[(auth ? "AUTHED" : "NOT AUTHED")]: [(!auth ? "Insert ID" : auth)]
"
- dat += "View System Log
"
-
- if(issilicon(user) || auth)
-
- switch(screen)
-
-
- // --- Main Menu ---
-
- if(0)
- dat += "
[temp]
"
- dat += "
Current Network: [network]
"
- if(servers.len)
- dat += "
Detected Telecommunication Servers:"
- for(var/obj/machinery/telecomms/T in servers)
- dat += "- \ref[T] [T.name] ([T.id])
"
- dat += "
"
- dat += "
\[Flush Buffer\]"
-
- else
- dat += "
No servers detected. Scan for servers: \[Scan\]"
-
-
- // --- Viewing Server ---
-
- if(1)
- if(SelectedServer)
- dat += "
[temp]
"
- dat += "\[Main Menu\] \[Refresh\]"
- dat += "
Current Network: [network]"
- dat += "
Selected Server: [SelectedServer.id]
"
- dat += "
\[Edit Code\]"
- dat += "
Signal Execution: "
- if(SelectedServer.autoruncode)
- dat += "ALWAYS"
- else
- dat += "NEVER"
- else
- screen = 0
- return
-
-
- user << browse(dat, "window=traffic_control;size=575x400")
- onclose(user, "server_control")
-
- temp = ""
- return
-
-/obj/machinery/computer/telecomms/traffic/proc/create_log(var/entry, var/mob/user)
- var/id = null
- if(issilicon(user))
- id = "System Administrator"
- else
- if(auth)
- id = "[auth.registered_name] ([auth.assignment])"
- else
- ERROR("There is a null auth while the user isn't a silicon! ([user.name], [user.type])")
- return
- access_log += "\[[get_timestamp()]\] [id] [entry]"
-
-/obj/machinery/computer/telecomms/traffic/proc/print_logs()
- . = "Traffic Control Telecomms System Log
"
- for(var/entry in access_log)
- . += entry + "
"
- return .
-
-/obj/machinery/computer/telecomms/traffic/Topic(href, href_list)
- if(..())
- return
-
-
- add_fingerprint(usr)
- usr.set_machine(src)
-
- if(href_list["auth"])
- if(iscarbon(usr))
- var/mob/living/carbon/C = usr
- if(!auth)
- var/obj/item/weapon/card/id/I = C.get_active_hand()
- if(istype(I))
- if(check_access(I))
- C.drop_item()
- I.loc = src
- auth = I
- create_log("has logged in.", usr)
- else
- create_log("has logged out.", usr)
- auth.loc = src.loc
- C.put_in_hands(auth)
- auth = null
- updateUsrDialog()
- return
-
- if(href_list["print"])
- usr << browse(print_logs(), "window=traffic_logs")
- return
-
- if(!auth && !issilicon(usr) && !emagged)
- usr << "ACCESS DENIED."
- return
-
- if(href_list["viewserver"])
- screen = 1
- for(var/obj/machinery/telecomms/T in servers)
- if(T.id == href_list["viewserver"])
- SelectedServer = T
- create_log("selected server [T.name]", usr)
- break
-
-
- if(href_list["operation"])
- create_log("has performed action: [href_list["operation"]].", usr)
- switch(href_list["operation"])
-
- if("release")
- servers = list()
- screen = 0
-
- if("mainmenu")
- screen = 0
-
- if("scan")
- if(servers.len > 0)
- temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -"
-
- else
- for(var/obj/machinery/telecomms/server/T in range(25, src))
- if(T.network == network)
- servers.Add(T)
-
- if(!servers.len)
- temp = "- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -"
- else
- temp = "- [servers.len] SERVERS PROBED & BUFFERED -"
-
- screen = 0
-
- if("editcode")
- if(editingcode == usr) return
- if(usr in viewingcode) return
-
- if(!editingcode)
- lasteditor = usr
- editingcode = usr
- winshow(editingcode, "Telecomms IDE", 1) // show the IDE
- winset(editingcode, "tcscode", "is-disabled=false")
- winset(editingcode, "tcscode", "text=\"\"")
- var/showcode = replacetext(storedcode, "\\\"", "\\\\\"")
- showcode = replacetext(storedcode, "\"", "\\\"")
- winset(editingcode, "tcscode", "text=\"[showcode]\"")
-
- else
- viewingcode.Add(usr)
- winshow(usr, "Telecomms IDE", 1) // show the IDE
- winset(usr, "tcscode", "is-disabled=true")
- winset(editingcode, "tcscode", "text=\"\"")
- var/showcode = replacetext(storedcode, "\"", "\\\"")
- winset(usr, "tcscode", "text=\"[showcode]\"")
-
- if("togglerun")
- SelectedServer.autoruncode = !(SelectedServer.autoruncode)
-
- if(href_list["network"])
-
- var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network)
-
- if(newnet && canAccess(usr))
- if(length(newnet) > 15)
- temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -"
-
- else
-
- network = newnet
- screen = 0
- servers = list()
- temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -"
- create_log("has set the network to [network].", usr)
-
- updateUsrDialog()
- return
-
-/obj/machinery/computer/telecomms/traffic/attackby()
- ..()
- src.updateUsrDialog()
- return
-
-/obj/machinery/computer/telecomms/traffic/emag_act(mob/user as mob)
- if(!emagged)
- playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
- emagged = 1
- user << "You you disable the security protocols."
-
-/obj/machinery/computer/telecomms/traffic/proc/canAccess(var/mob/user)
- if(issilicon(user) || in_range(user, src))
- return 1
+
+
+/obj/machinery/computer/telecomms/traffic
+ name = "telecommunications traffic control console"
+ icon_state = "computer_generic"
+
+ var/screen = 0 // the screen number:
+ var/list/servers = list() // the servers located by the computer
+ var/mob/editingcode
+ var/mob/lasteditor
+ var/list/viewingcode = list()
+ var/obj/machinery/telecomms/server/SelectedServer
+
+ var/network = "NULL" // the network to probe
+ var/temp = "" // temporary feedback messages
+
+ var/storedcode = "" // code stored
+ var/obj/item/weapon/card/id/auth = null
+ var/list/access_log = list()
+ var/process = 0
+ circuit = "/obj/item/weapon/circuitboard/comm_traffic"
+
+ req_access = list(access_tcomsat)
+
+/obj/machinery/computer/telecomms/traffic/proc/stop_editing()
+ if(editingcode)
+ if(editingcode.client)
+ winshow(editingcode, "Telecomms IDE", 0) // hide the window!
+ editingcode.unset_machine()
+ editingcode = null
+
+/obj/machinery/computer/telecomms/traffic/process()
+
+ if(stat & (NOPOWER|BROKEN))
+ stop_editing()
+ return
+
+ if(editingcode && editingcode.machine != src)
+ stop_editing()
+ return
+
+ if(!editingcode)
+ if(length(viewingcode) > 0)
+ editingcode = pick(viewingcode)
+ viewingcode.Remove(editingcode)
+ return
+
+ process = !process
+ if(!process)
+ return
+
+ // loop if there's someone manning the keyboard
+ if(!editingcode.client)
+ stop_editing()
+ return
+
+ // For the typer, the input is enabled. Buffer the typed text
+ storedcode = "[winget(editingcode, "tcscode", "text")]"
+ winset(editingcode, "tcscode", "is-disabled=false")
+
+ // If the player's not manning the keyboard anymore, adjust everything
+ if(!in_range(editingcode, src) && !issilicon(editingcode) || editingcode.machine != src)
+ winshow(editingcode, "Telecomms IDE", 0) // hide the window!
+ editingcode = null
+ return
+
+ // For other people viewing the typer type code, the input is disabled and they can only view the code
+ // (this is put in place so that there's not any magical shenanigans with 50 people inputting different code all at once)
+
+ if(length(viewingcode))
+ // This piece of code is very important - it escapes quotation marks so string aren't cut off by the input element
+ var/showcode = replacetext(storedcode, "\\\"", "\\\\\"")
+ showcode = replacetext(storedcode, "\"", "\\\"")
+
+ for(var/mob/M in viewingcode)
+
+ if( (M.machine == src && in_range(M, src) ) || issilicon(M))
+ winset(M, "tcscode", "is-disabled=true")
+ winset(M, "tcscode", "text=\"[showcode]\"")
+ else
+ viewingcode.Remove(M)
+ winshow(M, "Telecomms IDE", 0) // hide the windows
+
+
+/obj/machinery/computer/telecomms/traffic/attack_hand(mob/user as mob)
+ if(..())
+ return
+ user.set_machine(src)
+ var/dat = "Telecommunication Traffic ControlTelecommunications Traffic Control"
+ dat += "
[(auth ? "AUTHED" : "NOT AUTHED")]: [(!auth ? "Insert ID" : auth)]
"
+ dat += "View System Log
"
+
+ if(issilicon(user) || auth)
+
+ switch(screen)
+
+
+ // --- Main Menu ---
+
+ if(0)
+ dat += "
[temp]
"
+ dat += "
Current Network: [network]
"
+ if(servers.len)
+ dat += "
Detected Telecommunication Servers:"
+ for(var/obj/machinery/telecomms/T in servers)
+ dat += "- \ref[T] [T.name] ([T.id])
"
+ dat += "
"
+ dat += "
\[Flush Buffer\]"
+
+ else
+ dat += "
No servers detected. Scan for servers: \[Scan\]"
+
+
+ // --- Viewing Server ---
+
+ if(1)
+ if(SelectedServer)
+ dat += "
[temp]
"
+ dat += "\[Main Menu\] \[Refresh\]"
+ dat += "
Current Network: [network]"
+ dat += "
Selected Server: [SelectedServer.id]
"
+ dat += "
\[Edit Code\]"
+ dat += "
Signal Execution: "
+ if(SelectedServer.autoruncode)
+ dat += "ALWAYS"
+ else
+ dat += "NEVER"
+ else
+ screen = 0
+ return
+
+
+ user << browse(dat, "window=traffic_control;size=575x400")
+ onclose(user, "server_control")
+
+ temp = ""
+ return
+
+/obj/machinery/computer/telecomms/traffic/proc/create_log(var/entry, var/mob/user)
+ var/id = null
+ if(issilicon(user))
+ id = "System Administrator"
+ else
+ if(auth)
+ id = "[auth.registered_name] ([auth.assignment])"
+ else
+ ERROR("There is a null auth while the user isn't a silicon! ([user.name], [user.type])")
+ return
+ access_log += "\[[get_timestamp()]\] [id] [entry]"
+
+/obj/machinery/computer/telecomms/traffic/proc/print_logs()
+ . = "Traffic Control Telecomms System Log
"
+ for(var/entry in access_log)
+ . += entry + "
"
+ return .
+
+/obj/machinery/computer/telecomms/traffic/Topic(href, href_list)
+ if(..())
+ return
+
+
+ add_fingerprint(usr)
+ usr.set_machine(src)
+
+ if(href_list["auth"])
+ if(iscarbon(usr))
+ var/mob/living/carbon/C = usr
+ if(!auth)
+ var/obj/item/weapon/card/id/I = C.get_active_hand()
+ if(istype(I))
+ if(check_access(I))
+ C.drop_item()
+ I.loc = src
+ auth = I
+ create_log("has logged in.", usr)
+ else
+ create_log("has logged out.", usr)
+ auth.loc = src.loc
+ C.put_in_hands(auth)
+ auth = null
+ updateUsrDialog()
+ return
+
+ if(href_list["print"])
+ usr << browse(print_logs(), "window=traffic_logs")
+ return
+
+ if(!auth && !issilicon(usr) && !emagged)
+ usr << "ACCESS DENIED."
+ return
+
+ if(href_list["viewserver"])
+ screen = 1
+ for(var/obj/machinery/telecomms/T in servers)
+ if(T.id == href_list["viewserver"])
+ SelectedServer = T
+ create_log("selected server [T.name]", usr)
+ break
+
+
+ if(href_list["operation"])
+ create_log("has performed action: [href_list["operation"]].", usr)
+ switch(href_list["operation"])
+
+ if("release")
+ servers = list()
+ screen = 0
+
+ if("mainmenu")
+ screen = 0
+
+ if("scan")
+ if(servers.len > 0)
+ temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -"
+
+ else
+ for(var/obj/machinery/telecomms/server/T in range(25, src))
+ if(T.network == network)
+ servers.Add(T)
+
+ if(!servers.len)
+ temp = "- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -"
+ else
+ temp = "- [servers.len] SERVERS PROBED & BUFFERED -"
+
+ screen = 0
+
+ if("editcode")
+ if(editingcode == usr) return
+ if(usr in viewingcode) return
+
+ if(!editingcode)
+ lasteditor = usr
+ editingcode = usr
+ winshow(editingcode, "Telecomms IDE", 1) // show the IDE
+ winset(editingcode, "tcscode", "is-disabled=false")
+ winset(editingcode, "tcscode", "text=\"\"")
+ var/showcode = replacetext(storedcode, "\\\"", "\\\\\"")
+ showcode = replacetext(storedcode, "\"", "\\\"")
+ winset(editingcode, "tcscode", "text=\"[showcode]\"")
+
+ else
+ viewingcode.Add(usr)
+ winshow(usr, "Telecomms IDE", 1) // show the IDE
+ winset(usr, "tcscode", "is-disabled=true")
+ winset(editingcode, "tcscode", "text=\"\"")
+ var/showcode = replacetext(storedcode, "\"", "\\\"")
+ winset(usr, "tcscode", "text=\"[showcode]\"")
+
+ if("togglerun")
+ SelectedServer.autoruncode = !(SelectedServer.autoruncode)
+
+ if(href_list["network"])
+
+ var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network)
+
+ if(newnet && canAccess(usr))
+ if(length(newnet) > 15)
+ temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -"
+
+ else
+
+ network = newnet
+ screen = 0
+ servers = list()
+ temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -"
+ create_log("has set the network to [network].", usr)
+
+ updateUsrDialog()
+ return
+
+/obj/machinery/computer/telecomms/traffic/attackby()
+ ..()
+ src.updateUsrDialog()
+ return
+
+/obj/machinery/computer/telecomms/traffic/emag_act(mob/user as mob)
+ if(!emagged)
+ playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
+ emagged = 1
+ user << "You you disable the security protocols."
+
+/obj/machinery/computer/telecomms/traffic/proc/canAccess(var/mob/user)
+ if(issilicon(user) || in_range(user, src))
+ return 1
return 0
\ No newline at end of file
diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
index f1dd4b2acb2..4884051a16c 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -1,5 +1,3 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
-
/*
@@ -12,87 +10,28 @@
/obj/machinery/telecomms
var/temp = "" // output message
- var/construct_op = 0
/obj/machinery/telecomms/attackby(obj/item/P as obj, mob/user as mob, params)
+ var/icon_closed = initial(icon_state)
+ var/icon_open = "[initial(icon_state)]_o"
+ if(!on)
+ icon_closed = "[initial(icon_state)]_off"
+ icon_open = "[initial(icon_state)]_o_off"
+
+ if(default_deconstruction_screwdriver(user, icon_open, icon_closed, P))
+ updateUsrDialog()
+ return
+
+ if(exchange_parts(user, P))
+ return
+
// Using a multitool lets you access the receiver's interface
if(istype(P, /obj/item/device/multitool))
attack_hand(user)
- switch(construct_op)
- if(0)
- if(istype(P, /obj/item/weapon/screwdriver))
- user << "You unfasten the bolts."
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- construct_op ++
- if(1)
- if(istype(P, /obj/item/weapon/screwdriver))
- user << "You fasten the bolts."
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- construct_op --
- if(istype(P, /obj/item/weapon/wrench))
- user << "You dislodge the external plating."
- playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
- construct_op ++
- if(2)
- if(istype(P, /obj/item/weapon/wrench))
- user << "You secure the external plating."
- playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
- construct_op --
- if(istype(P, /obj/item/weapon/wirecutters))
- playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
- user << "You remove the cables."
- construct_op ++
- var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( user.loc )
- A.amount = 5
- stat |= BROKEN // the machine's been borked!
- if(3)
- if(istype(P, /obj/item/stack/cable_coil))
- var/obj/item/stack/cable_coil/A = P
- if(A.use(5))
- user << "You insert the cables."
- construct_op --
- stat &= ~BROKEN // the machine's not borked anymore!
- else
- user << "You need five lengths of cable for this machine."
- if(istype(P, /obj/item/weapon/crowbar))
- user << "You begin prying out the circuit board and components..."
- playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
- if(do_after(user,60))
- user << "You finish prying out the components."
-
- // Drop all the component stuff
- if(component_parts)
- for(var/obj/item/I in component_parts)
- if(I.reliability != 100 && crit_fail)
- I.crit_fail = 1
- I.loc = src.loc
-
- else
-
- // If the machine wasn't made during runtime, probably doesn't have components:
- // manually find the components and drop them!
- var/newpath = text2path(circuitboard)
- var/obj/item/weapon/circuitboard/C = new newpath
- for(var/I in C.req_components)
- for(var/i = 1, i <= C.req_components[I], i++)
- newpath = text2path(I)
- var/obj/item/s = new newpath
- s.loc = src.loc
- if(istype(s, /obj/item/stack/cable_coil))
- var/obj/item/stack/cable_coil/A = s
- A.amount = 1
- A.update_icon()
-
- // Drop a circuit board too
- C.loc = src.loc
-
- // Create a machine frame and delete the current machine
- var/obj/machinery/constructable_frame/machine_frame/F = new
- F.loc = src.loc
- qdel(src)
+ default_deconstruction_crowbar(P)
/obj/machinery/telecomms/attack_ai(var/mob/user as mob)
@@ -207,25 +146,11 @@
/obj/machinery/telecomms/proc/Options_Menu()
return ""
-/*
-// Add an option to the processor to switch processing mode. (COMPRESS -> UNCOMPRESS or UNCOMPRESS -> COMPRESS)
-/obj/machinery/telecomms/processor/Options_Menu()
- var/dat = "
Processing Mode: [process_mode ? "UNCOMPRESS" : "COMPRESS"]"
- return dat
-*/
// The topic for Additional Options. Use this for checking href links for your specific option.
// Example of how to use below.
/obj/machinery/telecomms/proc/Options_Topic(href, href_list)
return
-/*
-/obj/machinery/telecomms/processor/Options_Topic(href, href_list)
-
- if(href_list["process"])
- temp = "-% Processing mode changed. %-"
- src.process_mode = !src.process_mode
-*/
-
// RELAY
/obj/machinery/telecomms/relay/Options_Menu()
diff --git a/code/game/machinery/telecomms/machines/allinone.dm b/code/game/machinery/telecomms/machines/allinone.dm
new file mode 100644
index 00000000000..b592d1bf720
--- /dev/null
+++ b/code/game/machinery/telecomms/machines/allinone.dm
@@ -0,0 +1,47 @@
+/*
+ Basically just an empty shell for receiving and broadcasting radio messages. Not
+ very flexible, but it gets the job done.
+*/
+
+/obj/machinery/telecomms/allinone
+ name = "telecommunications mainframe"
+ icon_state = "comm_server"
+ desc = "A compact machine used for portable subspace telecommuniations processing."
+ density = 1
+ anchored = 1
+ use_power = 0
+ idle_power_usage = 0
+ machinetype = 6
+ var/intercept = 0 // if nonzero, broadcasts all messages to syndicate channel
+
+/obj/machinery/telecomms/allinone/receive_signal(datum/signal/signal)
+
+ if(!on) // has to be on to receive messages
+ return
+
+ if(is_freq_listening(signal)) // detect subspace signals
+
+ signal.data["done"] = 1 // mark the signal as being broadcasted
+ signal.data["compression"] = 0
+
+ // Search for the original signal and mark it as done as well
+ var/datum/signal/original = signal.data["original"]
+ if(original)
+ original.data["done"] = 1
+
+ if(signal.data["slow"] > 0)
+ sleep(signal.data["slow"]) // simulate the network lag if necessary
+
+ /* ###### Broadcast a message using signal.data ###### */
+ if(signal.frequency == SYND_FREQ) // if syndicate broadcast, just
+ Broadcast_Message(signal.data["mob"],
+ signal.data["vmask"],
+ signal.data["radio"], signal.data["message"],
+ signal.data["name"], signal.data["job"],
+ signal.data["realname"],, signal.data["compression"], list(0, z), signal.frequency, signal.data["spans"],
+ signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"])
+
+/obj/machinery/telecomms/allinone/attackby(obj/item/P as obj, mob/user as mob, params)
+
+ if(istype(P, /obj/item/device/multitool))
+ attack_hand(user)
diff --git a/code/game/machinery/telecomms/machines/broadcaster.dm b/code/game/machinery/telecomms/machines/broadcaster.dm
new file mode 100644
index 00000000000..181d9a11bbf
--- /dev/null
+++ b/code/game/machinery/telecomms/machines/broadcaster.dm
@@ -0,0 +1,131 @@
+/*
+ The broadcaster sends processed messages to all radio devices in the game. They
+ do not have to be headsets; intercoms and station-bounced radios suffice.
+
+ They receive their message from a server after the message has been logged.
+*/
+
+var/list/recentmessages = list() // global list of recent messages broadcasted : used to circumvent massive radio spam
+var/message_delay = 0 // To make sure restarting the recentmessages list is kept in sync
+
+/obj/machinery/telecomms/broadcaster
+ name = "subspace broadcaster"
+ icon_state = "broadcaster"
+ desc = "A dish-shaped machine used to broadcast processed subspace signals."
+ density = 1
+ anchored = 1
+ use_power = 1
+ idle_power_usage = 25
+ machinetype = 5
+ /*heatgen = 0
+ delay = 7*/
+ circuitboard = "/obj/item/weapon/circuitboard/telecomms/broadcaster"
+
+/obj/machinery/telecomms/broadcaster/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
+ // Don't broadcast rejected signals
+ if(signal.data["reject"])
+ return
+
+ if(signal.data["message"])
+
+
+ // Prevents massive radio spam
+ signal.data["done"] = 1 // mark the signal as being broadcasted
+ // Search for the original signal and mark it as done as well
+ var/datum/signal/original = signal.data["original"]
+ if(original)
+ original.data["done"] = 1
+ original.data["compression"] = signal.data["compression"]
+ original.data["level"] = signal.data["level"]
+
+ var/signal_message = "[signal.frequency]:[signal.data["message"]]:[signal.data["realname"]]"
+ if(signal_message in recentmessages)
+ return
+ recentmessages.Add(signal_message)
+
+ if(signal.data["slow"] > 0)
+ sleep(signal.data["slow"]) // simulate the network lag if necessary
+
+ signal.data["level"] |= listening_level
+
+ /** #### - Normal Broadcast - #### **/
+
+ if(signal.data["type"] == 0)
+
+ /* ###### Broadcast a message using signal.data ###### */
+ Broadcast_Message(signal.data["mob"],
+ signal.data["vmask"], signal.data["radio"],
+ signal.data["message"], signal.data["name"], signal.data["job"], signal.data["realname"],
+ 0, signal.data["compression"], signal.data["level"], signal.frequency, signal.data["spans"],
+ signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"])
+
+
+ /** #### - Simple Broadcast - #### **/
+
+ if(signal.data["type"] == 1)
+
+ /* ###### Broadcast a message using signal.data ###### */
+ Broadcast_SimpleMessage(signal.data["name"], signal.frequency,
+ signal.data["message"],null, null,
+ signal.data["compression"], listening_level)
+
+
+ /** #### - Artificial Broadcast - #### **/
+ // (Imitates a mob)
+
+ if(signal.data["type"] == 2)
+
+ /* ###### Broadcast a message using signal.data ###### */
+ // Parameter "data" as 4: AI can't track this person/mob
+ Broadcast_Message(signal.data["mob"],
+ signal.data["vmask"],
+ signal.data["radio"], signal.data["message"],
+ signal.data["name"], signal.data["job"],
+ signal.data["realname"], 4, signal.data["compression"], signal.data["level"], signal.frequency, signal.data["spans"],
+ signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"])
+
+ if(!message_delay)
+ message_delay = 1
+ spawn(10)
+ message_delay = 0
+ recentmessages = list()
+
+ /* --- Do a snazzy animation! --- */
+ flick("broadcaster_send", src)
+
+/obj/machinery/telecomms/broadcaster/New()
+ ..()
+ component_parts = list()
+ component_parts += new /obj/item/weapon/circuitboard/telecomms/broadcaster(null)
+ component_parts += new /obj/item/weapon/stock_parts/subspace/filter(null)
+ component_parts += new /obj/item/weapon/stock_parts/subspace/crystal(null)
+ component_parts += new /obj/item/weapon/stock_parts/micro_laser/high(null)
+ component_parts += new /obj/item/weapon/stock_parts/micro_laser/high(null)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+ component_parts += new /obj/item/stack/cable_coil(null, 1)
+ RefreshParts()
+
+/obj/machinery/telecomms/broadcaster/Destroy()
+ // In case message_delay is left on 1, otherwise it won't reset the list and people can't say the same thing twice anymore.
+ if(message_delay)
+ message_delay = 0
+ ..()
+
+
+
+//Preset Broadcasters
+
+//--PRESET LEFT--//
+
+/obj/machinery/telecomms/broadcaster/preset_left
+ id = "Broadcaster A"
+ network = "tcommsat"
+ autolinkers = list("broadcasterA")
+
+//--PRESET RIGHT--//
+
+/obj/machinery/telecomms/broadcaster/preset_right
+ id = "Broadcaster B"
+ network = "tcommsat"
+ autolinkers = list("broadcasterB")
\ No newline at end of file
diff --git a/code/game/machinery/telecomms/machines/bus.dm b/code/game/machinery/telecomms/machines/bus.dm
new file mode 100644
index 00000000000..c81ecec4b32
--- /dev/null
+++ b/code/game/machinery/telecomms/machines/bus.dm
@@ -0,0 +1,97 @@
+/*
+ The bus mainframe idles and waits for hubs to relay them signals. They act
+ as junctions for the network.
+
+ They transfer uncompressed subspace packets to processor units, and then take
+ the processed packet to a server for logging.
+
+ Link to a subspace hub if it can't send to a server.
+*/
+
+/obj/machinery/telecomms/bus
+ name = "bus mainframe"
+ icon_state = "bus"
+ desc = "A mighty piece of hardware used to send massive amounts of data quickly."
+ density = 1
+ anchored = 1
+ use_power = 1
+ idle_power_usage = 50
+ machinetype = 2
+ //heatgen = 20
+ circuitboard = "/obj/item/weapon/circuitboard/telecomms/bus"
+ netspeed = 40
+ var/change_frequency = 0
+
+/obj/machinery/telecomms/bus/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
+
+ if(is_freq_listening(signal))
+ if(change_frequency)
+ signal.frequency = change_frequency
+
+ if(!istype(machine_from, /obj/machinery/telecomms/processor) && machine_from != src) // Signal must be ready (stupid assuming machine), let's send it
+ // send to one linked processor unit
+ var/send_to_processor = relay_information(signal, "/obj/machinery/telecomms/processor")
+
+ if(send_to_processor)
+ return
+ // failed to send to a processor, relay information anyway
+ signal.data["slow"] += rand(1, 5) // slow the signal down only slightly
+ src.receive_information(signal, src)
+
+ // Try sending it!
+ var/list/try_send = list("/obj/machinery/telecomms/server", "/obj/machinery/telecomms/hub", "/obj/machinery/telecomms/broadcaster", "/obj/machinery/telecomms/bus")
+ var/i = 0
+ for(var/send in try_send)
+ if(i)
+ signal.data["slow"] += rand(0, 1) // slow the signal down only slightly
+ i++
+ var/can_send = relay_information(signal, send)
+ if(can_send)
+ break
+
+/obj/machinery/telecomms/bus/New()
+ ..()
+ component_parts = list()
+ component_parts += new /obj/item/weapon/circuitboard/telecomms/bus(null)
+ component_parts += new /obj/item/weapon/stock_parts/subspace/filter(null)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+ component_parts += new /obj/item/stack/cable_coil(null, 1)
+ RefreshParts()
+
+
+
+
+
+
+//Preset Buses
+
+/obj/machinery/telecomms/bus/preset_one
+ id = "Bus 1"
+ network = "tcommsat"
+ freq_listening = list(SCI_FREQ, MED_FREQ)
+ autolinkers = list("processor1", "science", "medical")
+
+/obj/machinery/telecomms/bus/preset_two
+ id = "Bus 2"
+ network = "tcommsat"
+ freq_listening = list(SUPP_FREQ,SERV_FREQ)
+ autolinkers = list("processor2", "supply", "service")
+
+/obj/machinery/telecomms/bus/preset_three
+ id = "Bus 3"
+ network = "tcommsat"
+ freq_listening = list(SEC_FREQ, COMM_FREQ)
+ autolinkers = list("processor3", "security", "command")
+
+/obj/machinery/telecomms/bus/preset_four
+ id = "Bus 4"
+ network = "tcommsat"
+ freq_listening = list(ENG_FREQ)
+ autolinkers = list("processor4", "engineering", "common")
+
+/obj/machinery/telecomms/bus/preset_four/New()
+ for(var/i = 1441, i < 1489, i += 2)
+ freq_listening |= i
+ ..()
+
diff --git a/code/game/machinery/telecomms/machines/hub.dm b/code/game/machinery/telecomms/machines/hub.dm
new file mode 100644
index 00000000000..b52adc8cb8d
--- /dev/null
+++ b/code/game/machinery/telecomms/machines/hub.dm
@@ -0,0 +1,61 @@
+
+/*
+ The HUB idles until it receives information. It then passes on that information
+ depending on where it came from.
+
+ This is the heart of the Telecommunications Network, sending information where it
+ is needed. It mainly receives information from long-distance Relays and then sends
+ that information to be processed. Afterwards it gets the uncompressed information
+ from Servers/Buses and sends that back to the relay, to then be broadcasted.
+*/
+
+/obj/machinery/telecomms/hub
+ name = "telecommunication hub"
+ icon_state = "hub"
+ desc = "A mighty piece of hardware used to send/receive massive amounts of data."
+ density = 1
+ anchored = 1
+ use_power = 1
+ idle_power_usage = 80
+ machinetype = 7
+ //heatgen = 40
+ circuitboard = "/obj/item/weapon/circuitboard/telecomms/hub"
+ long_range_link = 1
+ netspeed = 40
+
+
+/obj/machinery/telecomms/hub/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
+ if(is_freq_listening(signal))
+ if(istype(machine_from, /obj/machinery/telecomms/receiver))
+ //If the signal is compressed, send it to the bus.
+ relay_information(signal, "/obj/machinery/telecomms/bus", 1) // ideally relay the copied information to bus units
+ else
+ // Get a list of relays that we're linked to, then send the signal to their levels.
+ relay_information(signal, "/obj/machinery/telecomms/relay", 1)
+ relay_information(signal, "/obj/machinery/telecomms/broadcaster", 1) // Send it to a broadcaster.
+
+/obj/machinery/telecomms/hub/New()
+ ..()
+ component_parts = list()
+ component_parts += new /obj/item/weapon/circuitboard/telecomms/hub(null)
+ component_parts += new /obj/item/weapon/stock_parts/subspace/filter(null)
+ component_parts += new /obj/item/weapon/stock_parts/subspace/filter(null)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+ component_parts += new /obj/item/stack/cable_coil(null, 2)
+ RefreshParts()
+
+
+
+
+
+
+//Preset HUB
+
+/obj/machinery/telecomms/hub/preset
+ id = "Hub"
+ network = "tcommsat"
+ autolinkers = list("hub", "relay", "s_relay", "m_relay", "r_relay", "science", "medical",
+ "supply", "service", "common", "command", "engineering", "security",
+ "receiverA", "receiverB", "broadcasterA", "broadcasterB")
+
diff --git a/code/game/machinery/telecomms/machines/processor.dm b/code/game/machinery/telecomms/machines/processor.dm
new file mode 100644
index 00000000000..18f8ee4d3e0
--- /dev/null
+++ b/code/game/machinery/telecomms/machines/processor.dm
@@ -0,0 +1,80 @@
+
+/*
+ The processor is a very simple machine that decompresses subspace signals and
+ transfers them back to the original bus. It is essential in producing audible
+ data.
+
+ Link to servers if bus is not present
+*/
+
+/obj/machinery/telecomms/processor
+ name = "processor unit"
+ icon_state = "processor"
+ desc = "This machine is used to process large quantities of information."
+ density = 1
+ anchored = 1
+ use_power = 1
+ idle_power_usage = 30
+ machinetype = 3
+ //heatgen = 100
+ //delay = 5
+ circuitboard = "/obj/item/weapon/circuitboard/telecomms/processor"
+ var/process_mode = 1 // 1 = Uncompress Signals, 0 = Compress Signals
+
+/obj/machinery/telecomms/processor/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
+
+ if(is_freq_listening(signal))
+
+ if(process_mode)
+ signal.data["compression"] = 0 // uncompress subspace signal
+ else
+ signal.data["compression"] = 100 // even more compressed signal
+
+ if(istype(machine_from, /obj/machinery/telecomms/bus))
+ relay_direct_information(signal, machine_from) // send the signal back to the machine
+ else // no bus detected - send the signal to servers instead
+ signal.data["slow"] += rand(5, 10) // slow the signal down
+ relay_information(signal, "/obj/machinery/telecomms/server")
+
+/obj/machinery/telecomms/processor/New()
+ ..()
+ component_parts = list()
+ component_parts += new /obj/item/weapon/circuitboard/telecomms/processor(null)
+ component_parts += new /obj/item/weapon/stock_parts/subspace/filter(null)
+ component_parts += new /obj/item/weapon/stock_parts/subspace/treatment(null)
+ component_parts += new /obj/item/weapon/stock_parts/subspace/treatment(null)
+ component_parts += new /obj/item/weapon/stock_parts/subspace/analyzer(null)
+ component_parts += new /obj/item/weapon/stock_parts/subspace/amplifier(null)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+ component_parts += new /obj/item/stack/cable_coil(null, 2)
+ RefreshParts()
+
+
+
+
+
+
+//Preset Processors
+
+/obj/machinery/telecomms/processor/preset_one
+ id = "Processor 1"
+ network = "tcommsat"
+ autolinkers = list("processor1") // processors are sort of isolated; they don't need backward links
+
+/obj/machinery/telecomms/processor/preset_two
+ id = "Processor 2"
+ network = "tcommsat"
+ autolinkers = list("processor2")
+
+/obj/machinery/telecomms/processor/preset_three
+ id = "Processor 3"
+ network = "tcommsat"
+ autolinkers = list("processor3")
+
+/obj/machinery/telecomms/processor/preset_four
+ id = "Processor 4"
+ network = "tcommsat"
+ autolinkers = list("processor4")
+
diff --git a/code/game/machinery/telecomms/machines/receiver.dm b/code/game/machinery/telecomms/machines/receiver.dm
new file mode 100644
index 00000000000..071828fced2
--- /dev/null
+++ b/code/game/machinery/telecomms/machines/receiver.dm
@@ -0,0 +1,95 @@
+
+/*
+ The receiver idles and receives messages from subspace-compatible radio equipment;
+ primarily headsets. They then just relay this information to all linked devices,
+ which can would probably be network hubs.
+
+ Link to Processor Units in case receiver can't send to bus units.
+*/
+
+/obj/machinery/telecomms/receiver
+ name = "subspace receiver"
+ icon_state = "broadcast receiver"
+ desc = "This machine has a dish-like shape and green lights. It is designed to detect and process subspace radio activity."
+ density = 1
+ anchored = 1
+ use_power = 1
+ idle_power_usage = 30
+ machinetype = 1
+ //heatgen = 0
+ circuitboard = "/obj/item/weapon/circuitboard/telecomms/receiver"
+
+/obj/machinery/telecomms/receiver/receive_signal(datum/signal/signal)
+
+ if(!on) // has to be on to receive messages
+ return
+ if(!signal)
+ return
+ if(!check_receive_level(signal))
+ return
+ if(signal.transmission_method == 2)
+
+ if(is_freq_listening(signal)) // detect subspace signals
+
+ //Remove the level and then start adding levels that it is being broadcasted in.
+ signal.data["level"] = list()
+
+ var/can_send = relay_information(signal, "/obj/machinery/telecomms/hub") // ideally relay the copied information to relays
+ if(!can_send)
+ relay_information(signal, "/obj/machinery/telecomms/bus") // Send it to a bus instead, if it's linked to one
+
+/obj/machinery/telecomms/receiver/proc/check_receive_level(datum/signal/signal)
+
+ if(signal.data["level"] != listening_level)
+ for(var/obj/machinery/telecomms/hub/H in links)
+ var/list/connected_levels = list()
+ for(var/obj/machinery/telecomms/relay/R in H.links)
+ if(R.can_receive(signal))
+ connected_levels |= R.listening_level
+ if(signal.data["level"] in connected_levels)
+ return 1
+ return 0
+ return 1
+
+
+/obj/machinery/telecomms/receiver/New()
+ ..()
+ component_parts = list()
+ component_parts += new /obj/item/weapon/circuitboard/telecomms/receiver(null)
+ component_parts += new /obj/item/weapon/stock_parts/subspace/filter(null)
+ component_parts += new /obj/item/weapon/stock_parts/subspace/ansible(null)
+ component_parts += new /obj/item/weapon/stock_parts/micro_laser/high(null)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+ RefreshParts()
+
+
+
+
+
+
+//Preset Receivers
+
+//--PRESET LEFT--//
+
+/obj/machinery/telecomms/receiver/preset_left
+ id = "Receiver A"
+ network = "tcommsat"
+ autolinkers = list("receiverA") // link to relay
+ freq_listening = list(SCI_FREQ, MED_FREQ, SUPP_FREQ, SERV_FREQ) // science, medical, supply, service
+
+
+//--PRESET RIGHT--//
+
+/obj/machinery/telecomms/receiver/preset_right
+ id = "Receiver B"
+ network = "tcommsat"
+ autolinkers = list("receiverB") // link to relay
+ freq_listening = list(COMM_FREQ, ENG_FREQ, SEC_FREQ) //command, engineering, security
+
+ //Common and other radio frequencies for people to freely use
+ New()
+ for(var/i = 1441, i < 1489, i += 2)
+ freq_listening |= i
+ ..()
+
diff --git a/code/game/machinery/telecomms/machines/relay.dm b/code/game/machinery/telecomms/machines/relay.dm
new file mode 100644
index 00000000000..51d76d47255
--- /dev/null
+++ b/code/game/machinery/telecomms/machines/relay.dm
@@ -0,0 +1,86 @@
+/*
+ The relay idles until it receives information. It then passes on that information
+ depending on where it came from.
+
+ The relay is needed in order to send information pass Z levels. It must be linked
+ with a HUB, the only other machine that can send/receive pass Z levels.
+*/
+
+/obj/machinery/telecomms/relay
+ name = "telecommunication relay"
+ icon_state = "relay"
+ desc = "A mighty piece of hardware used to send massive amounts of data far away."
+ density = 1
+ anchored = 1
+ use_power = 1
+ idle_power_usage = 30
+ machinetype = 8
+ //heatgen = 0
+ circuitboard = "/obj/item/weapon/circuitboard/telecomms/relay"
+ netspeed = 5
+ long_range_link = 1
+ var/broadcasting = 1
+ var/receiving = 1
+
+/obj/machinery/telecomms/relay/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
+ // Add our level and send it back
+ if(can_send(signal))
+ signal.data["level"] |= listening_level
+
+// Checks to see if it can send/receive.
+
+/obj/machinery/telecomms/relay/proc/can(datum/signal/signal)
+ if(!on)
+ return 0
+ if(!is_freq_listening(signal))
+ return 0
+ return 1
+
+/obj/machinery/telecomms/relay/proc/can_send(datum/signal/signal)
+ if(!can(signal))
+ return 0
+ return broadcasting
+
+/obj/machinery/telecomms/relay/proc/can_receive(datum/signal/signal)
+ if(!can(signal))
+ return 0
+ return receiving
+
+/obj/machinery/telecomms/relay/New()
+ ..()
+ component_parts = list()
+ component_parts += new /obj/item/weapon/circuitboard/telecomms/relay(null)
+ component_parts += new /obj/item/weapon/stock_parts/subspace/filter(null)
+ component_parts += new /obj/item/weapon/stock_parts/subspace/filter(null)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+ component_parts += new /obj/item/stack/cable_coil(null, 2)
+ RefreshParts()
+
+
+
+
+
+//Preset Relay
+
+/obj/machinery/telecomms/relay/preset
+ network = "tcommsat"
+
+/obj/machinery/telecomms/relay/preset/station
+ id = "Station Relay"
+ listening_level = 1
+ autolinkers = list("s_relay")
+
+/obj/machinery/telecomms/relay/preset/telecomms
+ id = "Telecomms Relay"
+ autolinkers = list("relay")
+
+/obj/machinery/telecomms/relay/preset/mining
+ id = "Mining Relay"
+ autolinkers = list("m_relay")
+
+/obj/machinery/telecomms/relay/preset/ruskie
+ id = "Ruskie Relay"
+ hide = 1
+ toggled = 0
+ autolinkers = list("r_relay")
diff --git a/code/game/machinery/telecomms/machines/server.dm b/code/game/machinery/telecomms/machines/server.dm
new file mode 100644
index 00000000000..322b635e3ca
--- /dev/null
+++ b/code/game/machinery/telecomms/machines/server.dm
@@ -0,0 +1,224 @@
+
+/*
+ The server logs all traffic and signal data. Once it records the signal, it sends
+ it to the subspace broadcaster.
+
+ Store a maximum of 100 logs and then deletes them.
+*/
+
+
+/obj/machinery/telecomms/server
+ name = "telecommunication server"
+ icon_state = "comm_server"
+ desc = "A machine used to store data and network statistics."
+ density = 1
+ anchored = 1
+ use_power = 1
+ idle_power_usage = 15
+ machinetype = 4
+ //heatgen = 50
+ circuitboard = "/obj/item/weapon/circuitboard/telecomms/server"
+ var/list/log_entries = list()
+ var/list/stored_names = list()
+ var/list/TrafficActions = list()
+ var/logs = 0 // number of logs
+ var/totaltraffic = 0 // gigabytes (if > 1024, divide by 1024 -> terrabytes)
+
+ var/list/memory = list() // stored memory
+ var/rawcode = "" // the code to compile (raw text)
+
+ var/datum/TCS_Compiler/Compiler // the compiler that compiles and runs the code
+ var/autoruncode = 0 // 1 if the code is set to run every time a signal is picked up
+
+ var/encryption = "null" // encryption key: ie "password"
+ var/salt = "null" // encryption salt: ie "123comsat"
+ // would add up to md5("password123comsat")
+ var/language = "human"
+ var/obj/item/device/radio/headset/server_radio = null
+ var/last_signal = 0 // Last time it sent a signal
+
+/obj/machinery/telecomms/server/New()
+ ..()
+ component_parts = list()
+ component_parts += new /obj/item/weapon/circuitboard/telecomms/server(null)
+ component_parts += new /obj/item/weapon/stock_parts/subspace/filter(null)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+ component_parts += new /obj/item/stack/cable_coil(null, 1)
+ RefreshParts()
+ Compiler = new()
+ Compiler.Holder = src
+ server_radio = new()
+
+/obj/machinery/telecomms/server/Destroy()
+ // Garbage collects all the NTSL datums.
+ if(Compiler)
+ Compiler.GC()
+ Compiler = null
+ ..()
+
+/obj/machinery/telecomms/server/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
+ if(signal.data["message"])
+
+ if(is_freq_listening(signal))
+
+ if(traffic > 0)
+ totaltraffic += traffic // add current traffic to total traffic
+
+ //Is this a test signal? Bypass logging
+ if(signal.data["type"] != 4)
+
+ // If signal has a message and appropriate frequency
+
+ update_logs()
+
+ var/datum/comm_log_entry/log = new
+
+ // Copy the signal.data entries we want
+ log.parameters["mobtype"] = signal.data["mobtype"]
+ log.parameters["job"] = signal.data["job"]
+ log.parameters["key"] = signal.data["key"]
+ log.parameters["message"] = signal.data["message"]
+ log.parameters["name"] = signal.data["name"]
+ log.parameters["realname"] = signal.data["realname"]
+
+ log.parameters["uspeech"] = signal.data["languages"] & HUMAN //good enough
+
+ // If the signal is still compressed, make the log entry gibberish
+ if(signal.data["compression"] > 0)
+ log.parameters["message"] = Gibberish(signal.data["message"], signal.data["compression"] + 50)
+ log.parameters["job"] = Gibberish(signal.data["job"], signal.data["compression"] + 50)
+ log.parameters["name"] = Gibberish(signal.data["name"], signal.data["compression"] + 50)
+ log.parameters["realname"] = Gibberish(signal.data["realname"], signal.data["compression"] + 50)
+ log.input_type = "Corrupt File"
+
+ // Log and store everything that needs to be logged
+ log_entries.Add(log)
+ if(!(signal.data["name"] in stored_names))
+ stored_names.Add(signal.data["name"])
+ logs++
+ signal.data["server"] = src
+
+ // Give the log a name
+ var/identifier = num2text( rand(-1000,1000) + world.time )
+ log.name = "data packet ([md5(identifier)])"
+
+ if(Compiler && autoruncode)
+ Compiler.Run(signal) // execute the code
+
+ var/can_send = relay_information(signal, "/obj/machinery/telecomms/hub")
+ if(!can_send)
+ relay_information(signal, "/obj/machinery/telecomms/broadcaster")
+
+
+/obj/machinery/telecomms/server/proc/setcode(var/t)
+ if(t)
+ if(istext(t))
+ rawcode = t
+
+/obj/machinery/telecomms/server/proc/admin_log(var/mob/mob)
+
+ var/msg="[mob.real_name]/([mob.key]) has compiled a script to server [src]:"
+ diary << msg
+ diary << rawcode
+ src.investigate_log("[msg]
[rawcode]", "ntsl")
+ if(length(rawcode)) // Let's not bother the admins for empty code.
+ message_admins("[mob.real_name]/([mob.key]) has compiled and uploaded a NTSL script to [src.id] ([mob.x],[mob.y],[mob.z] - JMP)",0,1)
+
+/obj/machinery/telecomms/server/proc/compile(var/mob/user)
+
+ if(Compiler)
+ admin_log(user)
+ return Compiler.Compile(rawcode)
+
+/obj/machinery/telecomms/server/proc/update_logs()
+ // start deleting the very first log entry
+ if(logs >= 400)
+ for(var/i = 1, i <= logs, i++) // locate the first garbage collectable log entry and remove it
+ var/datum/comm_log_entry/L = log_entries[i]
+ if(L.garbage_collector)
+ log_entries.Remove(L)
+ logs--
+ break
+
+/obj/machinery/telecomms/server/proc/add_entry(var/content, var/input)
+ var/datum/comm_log_entry/log = new
+ var/identifier = num2text( rand(-1000,1000) + world.time )
+ log.name = "[input] ([md5(identifier)])"
+ log.input_type = input
+ log.parameters["message"] = content
+ log_entries.Add(log)
+ update_logs()
+
+
+
+// Simple log entry datum
+
+/datum/comm_log_entry
+ var/parameters = list() // carbon-copy to signal.data[]
+ var/name = "data packet (#)"
+ var/garbage_collector = 1 // if set to 0, will not be garbage collected
+ var/input_type = "Speech File"
+
+
+
+
+//Preset Servers
+
+/obj/machinery/telecomms/server/presets
+ network = "tcommsat"
+
+/obj/machinery/telecomms/server/presets/New()
+ ..()
+ name = id
+
+
+/obj/machinery/telecomms/server/presets/science
+ id = "Science Server"
+ freq_listening = list(SCI_FREQ)
+ autolinkers = list("science")
+
+/obj/machinery/telecomms/server/presets/medical
+ id = "Medical Server"
+ freq_listening = list(MED_FREQ)
+ autolinkers = list("medical")
+
+/obj/machinery/telecomms/server/presets/supply
+ id = "Supply Server"
+ freq_listening = list(SUPP_FREQ)
+ autolinkers = list("supply")
+
+/obj/machinery/telecomms/server/presets/service
+ id = "Service Server"
+ freq_listening = list(SERV_FREQ)
+ autolinkers = list("service")
+
+/obj/machinery/telecomms/server/presets/common
+ id = "Common Server"
+ freq_listening = list()
+ autolinkers = list("common")
+
+ //Common and other radio frequencies for people to freely use
+ // 1441 to 1489
+/obj/machinery/telecomms/server/presets/common/New()
+ for(var/i = 1441, i < 1489, i += 2)
+ freq_listening |= i
+ ..()
+
+/obj/machinery/telecomms/server/presets/command
+ id = "Command Server"
+ freq_listening = list(COMM_FREQ)
+ autolinkers = list("command")
+
+/obj/machinery/telecomms/server/presets/engineering
+ id = "Engineering Server"
+ freq_listening = list(ENG_FREQ)
+ autolinkers = list("engineering")
+
+/obj/machinery/telecomms/server/presets/security
+ id = "Security Server"
+ freq_listening = list(SEC_FREQ)
+ autolinkers = list("security")
+
+
+
diff --git a/code/game/machinery/telecomms/presets.dm b/code/game/machinery/telecomms/presets.dm
deleted file mode 100644
index fe48a7cb3f7..00000000000
--- a/code/game/machinery/telecomms/presets.dm
+++ /dev/null
@@ -1,187 +0,0 @@
-// ### Preset machines ###
-
-//Relay
-
-/obj/machinery/telecomms/relay/preset
- network = "tcommsat"
-
-/obj/machinery/telecomms/relay/preset/station
- id = "Station Relay"
- listening_level = 1
- autolinkers = list("s_relay")
-
-/obj/machinery/telecomms/relay/preset/telecomms
- id = "Telecomms Relay"
- autolinkers = list("relay")
-
-/obj/machinery/telecomms/relay/preset/mining
- id = "Mining Relay"
- autolinkers = list("m_relay")
-
-/obj/machinery/telecomms/relay/preset/ruskie
- id = "Ruskie Relay"
- hide = 1
- toggled = 0
- autolinkers = list("r_relay")
-
-//HUB
-
-/obj/machinery/telecomms/hub/preset
- id = "Hub"
- network = "tcommsat"
- autolinkers = list("hub", "relay", "s_relay", "m_relay", "r_relay", "science", "medical",
- "supply", "service", "common", "command", "engineering", "security",
- "receiverA", "receiverB", "broadcasterA", "broadcasterB")
-
-//Receivers
-
-//--PRESET LEFT--//
-
-/obj/machinery/telecomms/receiver/preset_left
- id = "Receiver A"
- network = "tcommsat"
- autolinkers = list("receiverA") // link to relay
- freq_listening = list(SCI_FREQ, MED_FREQ, SUPP_FREQ, SERV_FREQ) // science, medical, supply, service
-
-
-//--PRESET RIGHT--//
-
-/obj/machinery/telecomms/receiver/preset_right
- id = "Receiver B"
- network = "tcommsat"
- autolinkers = list("receiverB") // link to relay
- freq_listening = list(COMM_FREQ, ENG_FREQ, SEC_FREQ) //command, engineering, security
-
- //Common and other radio frequencies for people to freely use
- New()
- for(var/i = 1441, i < 1489, i += 2)
- freq_listening |= i
- ..()
-
-
-//Buses
-
-/obj/machinery/telecomms/bus/preset_one
- id = "Bus 1"
- network = "tcommsat"
- freq_listening = list(SCI_FREQ, MED_FREQ)
- autolinkers = list("processor1", "science", "medical")
-
-/obj/machinery/telecomms/bus/preset_two
- id = "Bus 2"
- network = "tcommsat"
- freq_listening = list(SUPP_FREQ,SERV_FREQ)
- autolinkers = list("processor2", "supply", "service")
-
-/obj/machinery/telecomms/bus/preset_three
- id = "Bus 3"
- network = "tcommsat"
- freq_listening = list(SEC_FREQ, COMM_FREQ)
- autolinkers = list("processor3", "security", "command")
-
-/obj/machinery/telecomms/bus/preset_four
- id = "Bus 4"
- network = "tcommsat"
- freq_listening = list(ENG_FREQ)
- autolinkers = list("processor4", "engineering", "common")
-
-/obj/machinery/telecomms/bus/preset_four/New()
- for(var/i = 1441, i < 1489, i += 2)
- freq_listening |= i
- ..()
-
-//Processors
-
-/obj/machinery/telecomms/processor/preset_one
- id = "Processor 1"
- network = "tcommsat"
- autolinkers = list("processor1") // processors are sort of isolated; they don't need backward links
-
-/obj/machinery/telecomms/processor/preset_two
- id = "Processor 2"
- network = "tcommsat"
- autolinkers = list("processor2")
-
-/obj/machinery/telecomms/processor/preset_three
- id = "Processor 3"
- network = "tcommsat"
- autolinkers = list("processor3")
-
-/obj/machinery/telecomms/processor/preset_four
- id = "Processor 4"
- network = "tcommsat"
- autolinkers = list("processor4")
-
-//Servers
-
-/obj/machinery/telecomms/server/presets
- network = "tcommsat"
-
-/obj/machinery/telecomms/server/presets/New()
- ..()
- name = id
-
-
-/obj/machinery/telecomms/server/presets/science
- id = "Science Server"
- freq_listening = list(SCI_FREQ)
- autolinkers = list("science")
-
-/obj/machinery/telecomms/server/presets/medical
- id = "Medical Server"
- freq_listening = list(MED_FREQ)
- autolinkers = list("medical")
-
-/obj/machinery/telecomms/server/presets/supply
- id = "Supply Server"
- freq_listening = list(SUPP_FREQ)
- autolinkers = list("supply")
-
-/obj/machinery/telecomms/server/presets/service
- id = "Service Server"
- freq_listening = list(SERV_FREQ)
- autolinkers = list("service")
-
-/obj/machinery/telecomms/server/presets/common
- id = "Common Server"
- freq_listening = list()
- autolinkers = list("common")
-
- //Common and other radio frequencies for people to freely use
- // 1441 to 1489
-/obj/machinery/telecomms/server/presets/common/New()
- for(var/i = 1441, i < 1489, i += 2)
- freq_listening |= i
- ..()
-
-/obj/machinery/telecomms/server/presets/command
- id = "Command Server"
- freq_listening = list(COMM_FREQ)
- autolinkers = list("command")
-
-/obj/machinery/telecomms/server/presets/engineering
- id = "Engineering Server"
- freq_listening = list(ENG_FREQ)
- autolinkers = list("engineering")
-
-/obj/machinery/telecomms/server/presets/security
- id = "Security Server"
- freq_listening = list(SEC_FREQ)
- autolinkers = list("security")
-
-
-//Broadcasters
-
-//--PRESET LEFT--//
-
-/obj/machinery/telecomms/broadcaster/preset_left
- id = "Broadcaster A"
- network = "tcommsat"
- autolinkers = list("broadcasterA")
-
-//--PRESET RIGHT--//
-
-/obj/machinery/telecomms/broadcaster/preset_right
- id = "Broadcaster B"
- network = "tcommsat"
- autolinkers = list("broadcasterB")
diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm
index c0c8d3abbf9..71a042441d8 100644
--- a/code/game/machinery/telecomms/telecomunications.dm
+++ b/code/game/machinery/telecomms/telecomunications.dm
@@ -1,11 +1,10 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/*
Hello, friends, this is Doohl from sexylands. You may be wondering what this
monstrous code file is. Sit down, boys and girls, while I tell you the tale.
- The machines defined in this file were designed to be compatible with any radio
+ The telecom machines were designed to be compatible with any radio
signals, provided they use subspace transmission. Currently they are only used for
headsets, but they can eventually be outfitted for real COMPUTER networks. This
is just a skeleton, ladies and gentlemen.
@@ -16,6 +15,7 @@
var/global/list/obj/machinery/telecomms/telecomms_list = list()
/obj/machinery/telecomms
+ icon = 'icons/obj/machines/telecomms.dmi'
var/list/links = list() // list of machines this machine is linked to
var/traffic = 0 // value increases as traffic increases
var/netspeed = 5 // how much traffic to lose per tick (50 gigabytes/second * netspeed)
@@ -28,10 +28,6 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
var/machinetype = 0 // just a hacky way of preventing alike machines from pairing
var/toggled = 1 // Is it toggled on
var/on = 1
- /*var/integrity = 100 // basically HP, loses integrity by heat
- var/heatgen = 20 // how much heat to transfer to the environment
- var/delay = 10 // how many process() ticks to delay per heat
- var/heating_power = 40000*/
var/long_range_link = 0 // Can you link it across Z levels or on the otherside of the map? (Relay & Hub)
var/circuitboard = null // string pointing to a circuitboard type
var/hide = 0 // Is it a hidden machine?
@@ -45,8 +41,6 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
return
var/send_count = 0
- //signal.data["slow"] == 0 // apply some lag based on integrity
-
// Apply some lag based on traffic rates
var/netlag = round(traffic / 50)
if(netlag > signal.data["slow"])
@@ -179,9 +173,15 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
/obj/machinery/telecomms/update_icon()
if(on)
- icon_state = initial(icon_state)
+ if(panel_open)
+ icon_state = "[initial(icon_state)]_o"
+ else
+ icon_state = initial(icon_state)
else
- icon_state = "[initial(icon_state)]_off"
+ if(panel_open)
+ icon_state = "[initial(icon_state)]_o_off"
+ else
+ icon_state = "[initial(icon_state)]_off"
/obj/machinery/telecomms/proc/update_power()
@@ -196,9 +196,6 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
/obj/machinery/telecomms/process()
update_power()
- // Check heat and generate some
- //checkheat()
-
// Update the icon
update_icon()
@@ -213,438 +210,3 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
spawn(rand(duration - 20, duration + 20)) // Takes a long time for the machines to reboot.
stat &= ~EMPED
..()
-
-/*/obj/machinery/telecomms/proc/checkheat()
- // Checks heat from the environment and applies any integrity damage
- var/datum/gas_mixture/environment = loc.return_air()
- switch(environment.temperature)
- if(T0C to (T20C + 20))
- integrity = Clamp(integrity, 0, 100)
- if((T20C + 20) to (T0C + 70))
- integrity = max(0, integrity - 1)
- if(delay)
- delay--
- else
- // If the machine is on, ready to produce heat, and has positive traffic, genn some heat
- if(on && traffic > 0)
- produce_heat(heatgen)
- delay = initial(delay)
-
-/obj/machinery/telecomms/proc/produce_heat(heat_amt)
- if(heatgen == 0)
- return
-
- if(!(stat & (NOPOWER|BROKEN))) //Blatently stolen from space heater.
- var/turf/simulated/L = loc
- if(istype(L))
- var/datum/gas_mixture/env = L.return_air()
- if(env.temperature < (heat_amt+T0C))
-
- var/transfer_moles = 0.25 * env.total_moles()
-
- var/datum/gas_mixture/removed = env.remove(transfer_moles)
-
- if(removed)
-
- var/heat_capacity = removed.heat_capacity()
- if(heat_capacity == 0 || heat_capacity == null)
- heat_capacity = 1
- removed.temperature = min((removed.temperature*heat_capacity + heating_power)/heat_capacity, 1000)
-
- env.merge(removed)
-*/
-/*
- The receiver idles and receives messages from subspace-compatible radio equipment;
- primarily headsets. They then just relay this information to all linked devices,
- which can would probably be network hubs.
-
- Link to Processor Units in case receiver can't send to bus units.
-*/
-
-/obj/machinery/telecomms/receiver
- name = "subspace receiver"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "broadcast receiver"
- desc = "This machine has a dish-like shape and green lights. It is designed to detect and process subspace radio activity."
- density = 1
- anchored = 1
- use_power = 1
- idle_power_usage = 30
- machinetype = 1
- //heatgen = 0
- circuitboard = "/obj/item/weapon/circuitboard/telecomms/receiver"
-
-/obj/machinery/telecomms/receiver/receive_signal(datum/signal/signal)
-
- if(!on) // has to be on to receive messages
- return
- if(!signal)
- return
- if(!check_receive_level(signal))
- return
- if(signal.transmission_method == 2)
-
- if(is_freq_listening(signal)) // detect subspace signals
-
- //Remove the level and then start adding levels that it is being broadcasted in.
- signal.data["level"] = list()
-
- var/can_send = relay_information(signal, "/obj/machinery/telecomms/hub") // ideally relay the copied information to relays
- if(!can_send)
- relay_information(signal, "/obj/machinery/telecomms/bus") // Send it to a bus instead, if it's linked to one
-
-/obj/machinery/telecomms/receiver/proc/check_receive_level(datum/signal/signal)
-
- if(signal.data["level"] != listening_level)
- for(var/obj/machinery/telecomms/hub/H in links)
- var/list/connected_levels = list()
- for(var/obj/machinery/telecomms/relay/R in H.links)
- if(R.can_receive(signal))
- connected_levels |= R.listening_level
- if(signal.data["level"] in connected_levels)
- return 1
- return 0
- return 1
-
-
-/*
- The HUB idles until it receives information. It then passes on that information
- depending on where it came from.
-
- This is the heart of the Telecommunications Network, sending information where it
- is needed. It mainly receives information from long-distance Relays and then sends
- that information to be processed. Afterwards it gets the uncompressed information
- from Servers/Buses and sends that back to the relay, to then be broadcasted.
-*/
-
-/obj/machinery/telecomms/hub
- name = "telecommunication hub"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "hub"
- desc = "A mighty piece of hardware used to send/receive massive amounts of data."
- density = 1
- anchored = 1
- use_power = 1
- idle_power_usage = 80
- machinetype = 7
- //heatgen = 40
- circuitboard = "/obj/item/weapon/circuitboard/telecomms/hub"
- long_range_link = 1
- netspeed = 40
-
-
-/obj/machinery/telecomms/hub/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
- if(is_freq_listening(signal))
- if(istype(machine_from, /obj/machinery/telecomms/receiver))
- //If the signal is compressed, send it to the bus.
- relay_information(signal, "/obj/machinery/telecomms/bus", 1) // ideally relay the copied information to bus units
- else
- // Get a list of relays that we're linked to, then send the signal to their levels.
- relay_information(signal, "/obj/machinery/telecomms/relay", 1)
- relay_information(signal, "/obj/machinery/telecomms/broadcaster", 1) // Send it to a broadcaster.
-
-
-/*
- The relay idles until it receives information. It then passes on that information
- depending on where it came from.
-
- The relay is needed in order to send information pass Z levels. It must be linked
- with a HUB, the only other machine that can send/receive pass Z levels.
-*/
-
-/obj/machinery/telecomms/relay
- name = "telecommunication relay"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "relay"
- desc = "A mighty piece of hardware used to send massive amounts of data far away."
- density = 1
- anchored = 1
- use_power = 1
- idle_power_usage = 30
- machinetype = 8
- //heatgen = 0
- circuitboard = "/obj/item/weapon/circuitboard/telecomms/relay"
- netspeed = 5
- long_range_link = 1
- var/broadcasting = 1
- var/receiving = 1
-
-/obj/machinery/telecomms/relay/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
- // Add our level and send it back
- if(can_send(signal))
- signal.data["level"] |= listening_level
-
-// Checks to see if it can send/receive.
-
-/obj/machinery/telecomms/relay/proc/can(datum/signal/signal)
- if(!on)
- return 0
- if(!is_freq_listening(signal))
- return 0
- return 1
-
-/obj/machinery/telecomms/relay/proc/can_send(datum/signal/signal)
- if(!can(signal))
- return 0
- return broadcasting
-
-/obj/machinery/telecomms/relay/proc/can_receive(datum/signal/signal)
- if(!can(signal))
- return 0
- return receiving
-
-/*
- The bus mainframe idles and waits for hubs to relay them signals. They act
- as junctions for the network.
-
- They transfer uncompressed subspace packets to processor units, and then take
- the processed packet to a server for logging.
-
- Link to a subspace hub if it can't send to a server.
-*/
-
-/obj/machinery/telecomms/bus
- name = "bus mainframe"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "bus"
- desc = "A mighty piece of hardware used to send massive amounts of data quickly."
- density = 1
- anchored = 1
- use_power = 1
- idle_power_usage = 50
- machinetype = 2
- //heatgen = 20
- circuitboard = "/obj/item/weapon/circuitboard/telecomms/bus"
- netspeed = 40
- var/change_frequency = 0
-
-/obj/machinery/telecomms/bus/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
-
- if(is_freq_listening(signal))
- if(change_frequency)
- signal.frequency = change_frequency
-
- if(!istype(machine_from, /obj/machinery/telecomms/processor) && machine_from != src) // Signal must be ready (stupid assuming machine), let's send it
- // send to one linked processor unit
- var/send_to_processor = relay_information(signal, "/obj/machinery/telecomms/processor")
-
- if(send_to_processor)
- return
- // failed to send to a processor, relay information anyway
- signal.data["slow"] += rand(1, 5) // slow the signal down only slightly
- src.receive_information(signal, src)
-
- // Try sending it!
- var/list/try_send = list("/obj/machinery/telecomms/server", "/obj/machinery/telecomms/hub", "/obj/machinery/telecomms/broadcaster", "/obj/machinery/telecomms/bus")
- var/i = 0
- for(var/send in try_send)
- if(i)
- signal.data["slow"] += rand(0, 1) // slow the signal down only slightly
- i++
- var/can_send = relay_information(signal, send)
- if(can_send)
- break
-
-
-
-/*
- The processor is a very simple machine that decompresses subspace signals and
- transfers them back to the original bus. It is essential in producing audible
- data.
-
- Link to servers if bus is not present
-*/
-
-/obj/machinery/telecomms/processor
- name = "processor unit"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "processor"
- desc = "This machine is used to process large quantities of information."
- density = 1
- anchored = 1
- use_power = 1
- idle_power_usage = 30
- machinetype = 3
- //heatgen = 100
- //delay = 5
- circuitboard = "/obj/item/weapon/circuitboard/telecomms/processor"
- var/process_mode = 1 // 1 = Uncompress Signals, 0 = Compress Signals
-
- receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
-
- if(is_freq_listening(signal))
-
- if(process_mode)
- signal.data["compression"] = 0 // uncompress subspace signal
- else
- signal.data["compression"] = 100 // even more compressed signal
-
- if(istype(machine_from, /obj/machinery/telecomms/bus))
- relay_direct_information(signal, machine_from) // send the signal back to the machine
- else // no bus detected - send the signal to servers instead
- signal.data["slow"] += rand(5, 10) // slow the signal down
- relay_information(signal, "/obj/machinery/telecomms/server")
-
-
-/*
- The server logs all traffic and signal data. Once it records the signal, it sends
- it to the subspace broadcaster.
-
- Store a maximum of 100 logs and then deletes them.
-*/
-
-
-/obj/machinery/telecomms/server
- name = "telecommunication server"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "comm_server"
- desc = "A machine used to store data and network statistics."
- density = 1
- anchored = 1
- use_power = 1
- idle_power_usage = 15
- machinetype = 4
- //heatgen = 50
- circuitboard = "/obj/item/weapon/circuitboard/telecomms/server"
- var/list/log_entries = list()
- var/list/stored_names = list()
- var/list/TrafficActions = list()
- var/logs = 0 // number of logs
- var/totaltraffic = 0 // gigabytes (if > 1024, divide by 1024 -> terrabytes)
-
- var/list/memory = list() // stored memory
- var/rawcode = "" // the code to compile (raw text)
-
- var/datum/TCS_Compiler/Compiler // the compiler that compiles and runs the code
- var/autoruncode = 0 // 1 if the code is set to run every time a signal is picked up
-
- var/encryption = "null" // encryption key: ie "password"
- var/salt = "null" // encryption salt: ie "123comsat"
- // would add up to md5("password123comsat")
- var/language = "human"
- var/obj/item/device/radio/headset/server_radio = null
- var/last_signal = 0 // Last time it sent a signal
-
-/obj/machinery/telecomms/server/New()
- ..()
- Compiler = new()
- Compiler.Holder = src
- server_radio = new()
-
-/obj/machinery/telecomms/server/Destroy()
- // Garbage collects all the NTSL datums.
- if(Compiler)
- Compiler.GC()
- Compiler = null
- ..()
-
-/obj/machinery/telecomms/server/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
- if(signal.data["message"])
-
- if(is_freq_listening(signal))
-
- if(traffic > 0)
- totaltraffic += traffic // add current traffic to total traffic
-
- //Is this a test signal? Bypass logging
- if(signal.data["type"] != 4)
-
- // If signal has a message and appropriate frequency
-
- update_logs()
-
- var/datum/comm_log_entry/log = new
-
- // Copy the signal.data entries we want
- log.parameters["mobtype"] = signal.data["mobtype"]
- log.parameters["job"] = signal.data["job"]
- log.parameters["key"] = signal.data["key"]
- log.parameters["message"] = signal.data["message"]
- log.parameters["name"] = signal.data["name"]
- log.parameters["realname"] = signal.data["realname"]
-
- log.parameters["uspeech"] = signal.data["languages"] & HUMAN //good enough
-
- // If the signal is still compressed, make the log entry gibberish
- if(signal.data["compression"] > 0)
- log.parameters["message"] = Gibberish(signal.data["message"], signal.data["compression"] + 50)
- log.parameters["job"] = Gibberish(signal.data["job"], signal.data["compression"] + 50)
- log.parameters["name"] = Gibberish(signal.data["name"], signal.data["compression"] + 50)
- log.parameters["realname"] = Gibberish(signal.data["realname"], signal.data["compression"] + 50)
- log.input_type = "Corrupt File"
-
- // Log and store everything that needs to be logged
- log_entries.Add(log)
- if(!(signal.data["name"] in stored_names))
- stored_names.Add(signal.data["name"])
- logs++
- signal.data["server"] = src
-
- // Give the log a name
- var/identifier = num2text( rand(-1000,1000) + world.time )
- log.name = "data packet ([md5(identifier)])"
-
- if(Compiler && autoruncode)
- Compiler.Run(signal) // execute the code
-
- var/can_send = relay_information(signal, "/obj/machinery/telecomms/hub")
- if(!can_send)
- relay_information(signal, "/obj/machinery/telecomms/broadcaster")
-
-
-/obj/machinery/telecomms/server/proc/setcode(var/t)
- if(t)
- if(istext(t))
- rawcode = t
-
-/obj/machinery/telecomms/server/proc/admin_log(var/mob/mob)
-
- var/msg="[mob.real_name]/([mob.key]) has compiled a script to server [src]:"
- diary << msg
- diary << rawcode
- src.investigate_log("[msg]
[rawcode]", "ntsl")
- if(length(rawcode)) // Let's not bother the admins for empty code.
- message_admins("[mob.real_name]/([mob.key]) has compiled and uploaded a NTSL script to [src.id] ([mob.x],[mob.y],[mob.z] - JMP)",0,1)
-
-/obj/machinery/telecomms/server/proc/compile(var/mob/user)
-
- if(Compiler)
- admin_log(user)
- return Compiler.Compile(rawcode)
-
-/obj/machinery/telecomms/server/proc/update_logs()
- // start deleting the very first log entry
- if(logs >= 400)
- for(var/i = 1, i <= logs, i++) // locate the first garbage collectable log entry and remove it
- var/datum/comm_log_entry/L = log_entries[i]
- if(L.garbage_collector)
- log_entries.Remove(L)
- logs--
- break
-
-/obj/machinery/telecomms/server/proc/add_entry(var/content, var/input)
- var/datum/comm_log_entry/log = new
- var/identifier = num2text( rand(-1000,1000) + world.time )
- log.name = "[input] ([md5(identifier)])"
- log.input_type = input
- log.parameters["message"] = content
- log_entries.Add(log)
- update_logs()
-
-
-
-
-// Simple log entry datum
-
-/datum/comm_log_entry
- var/parameters = list() // carbon-copy to signal.data[]
- var/name = "data packet (#)"
- var/garbage_collector = 1 // if set to 0, will not be garbage collected
- var/input_type = "Speech File"
-
-
-
-
-
-
-
diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm
index 99324003e72..472fceaa045 100644
--- a/code/game/mecha/equipment/tools/tools.dm
+++ b/code/game/mecha/equipment/tools/tools.dm
@@ -176,6 +176,34 @@
return 1
return 0
+/obj/item/mecha_parts/mecha_equipment/tool/mining_scanner
+ name = "exosuit mining scanner"
+ desc = "Equipment for engineering and combat exosuits. It will automatically check surrounding rock for useful minerals."
+ icon_state = "mecha_analyzer"
+ origin_tech = "materials=3;engineering=2"
+ equip_cooldown = 30
+ var/scanning = 0
+
+/obj/item/mecha_parts/mecha_equipment/tool/mining_scanner/New()
+ SSobj.processing |= src
+
+/obj/item/mecha_parts/mecha_equipment/tool/mining_scanner/process()
+ if(!loc)
+ SSobj.processing.Remove(src)
+ qdel(src)
+ if(scanning)
+ return
+ if(istype(loc,/obj/mecha/working))
+ var/obj/mecha/working/mecha = loc
+ if(!mecha.occupant)
+ return
+ var/list/occupant = list()
+ occupant |= mecha.occupant
+ scanning = 1
+ mineral_scan_pulse(occupant,get_turf(loc))
+ spawn(equip_cooldown)
+ scanning = 0
+
/obj/item/mecha_parts/mecha_equipment/tool/extinguisher
name = "exosuit extinguisher"
desc = "Equipment for engineering exosuits. A rapid-firing high capacity fire extinguisher."
diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm
index f015c1f346a..78fcf6d541a 100644
--- a/code/game/mecha/working/ripley.dm
+++ b/code/game/mecha/working/ripley.dm
@@ -26,6 +26,7 @@
if(ore_box)
for(var/obj/item/weapon/ore/ore in get_turf(src))
ore.Move(ore_box)
+ update_pressure()
/obj/mecha/working/ripley/Destroy()
while(src.damage_absorption.["brute"] < 0.6)
@@ -119,6 +120,9 @@
for(var/obj/item/mecha_parts/mecha_tracking/B in src.contents)//Deletes the beacon so it can't be found easily
qdel(B)
+ var/obj/item/mecha_parts/mecha_equipment/tool/mining_scanner/scanner = new /obj/item/mecha_parts/mecha_equipment/tool/mining_scanner
+ scanner.attach(src)
+
/obj/mecha/working/ripley/Exit(atom/movable/O)
if(O in cargo)
return 0
@@ -148,4 +152,16 @@
output += ""
return output
+/obj/mecha/working/ripley/proc/update_pressure()
+ var/turf/T = get_turf(loc)
+ var/datum/gas_mixture/environment = T.return_air()
+ var/pressure = environment.return_pressure()
+ if(pressure < 20)
+ step_in = 3
+ for(var/obj/item/mecha_parts/mecha_equipment/tool/drill/drill in equipment)
+ drill.equip_cooldown = initial(drill.equip_cooldown)/2
+ else
+ step_in = 5
+ for(var/obj/item/mecha_parts/mecha_equipment/tool/drill/drill in equipment)
+ drill.equip_cooldown = initial(drill.equip_cooldown)
diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm
index 7d401160b80..e1c0f16074a 100644
--- a/code/game/objects/effects/mines.dm
+++ b/code/game/objects/effects/mines.dm
@@ -1,16 +1,15 @@
/obj/effect/mine
- name = "proximity mine"
+ name = "dummy mine"
desc = "Better stay away from that thing."
density = 0
anchored = 1
layer = 3
icon = 'icons/obj/weapons.dmi'
icon_state = "uglymine"
- var/minepayload = "explosive"
var/triggered = 0
-/obj/effect/mine/New()
- icon_state = "uglyminearmed"
+/obj/effect/mine/proc/mineEffect(mob/victim)
+ victim << "*click*"
/obj/effect/mine/Crossed(AM as mob|obj)
if(isanimal(AM))
@@ -24,48 +23,72 @@
if(triggered) return
visible_message("[AM] sets off \icon[src] [src]!")
- triggermine(AM, minepayload)
+ triggermine(AM)
-/obj/effect/mine/proc/triggermine(mob/victim, var/triggertype)
+/obj/effect/mine/proc/triggermine(mob/victim)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
-
- switch(triggertype)
- if("explosive")
- explosion(loc, 0, 1, 2, 3)
- if("triggerkick")
- if(isliving(victim) && victim.client)
- victim << "You have been kicked FOR NO REISIN!"
- del(victim.client)
- if("triggerplasma")
- atmos_spawn_air(SPAWN_TOXINS, 360)
- if("triggern2o")
- atmos_spawn_air(SPAWN_N2O, 360)
- if("triggerstun")
- if(isliving(victim))
- victim.Weaken(8)
-
-
+ mineEffect(victim)
triggered = 1
qdel(src)
-/obj/effect/mine/plasma
- name = "plasma mine"
- icon_state = "uglymine"
- minepayload = "triggerplasma"
-/obj/effect/mine/n2o
- name = "\improper N2O mine"
- icon_state = "uglymine"
- minepayload = "triggern2o"
+/obj/effect/mine/explosive
+ name = "explosive mine"
+ var/range_devastation = 0
+ var/range_heavy = 1
+ var/range_light = 2
+ var/range_flash = 3
+
+/obj/effect/mine/explosive/mineEffect(mob/victim)
+ explosion(loc, range_devastation, range_heavy, range_light, range_flash)
+
/obj/effect/mine/stun
name = "stun mine"
- icon_state = "uglymine"
- minepayload = "triggerstun"
+ var/stun_time = 8
+
+/obj/effect/mine/stun/mineEffect(mob/victim)
+ if(isliving(victim))
+ victim.Weaken(stun_time)
/obj/effect/mine/kickmine
name = "kick mine"
- icon_state = "uglymine"
- minepayload = "triggerkick"
\ No newline at end of file
+
+/obj/effect/mine/kickmine/mineEffect(mob/victim)
+ if(isliving(victim) && victim.client)
+ victim << "You have been kicked FOR NO REISIN!"
+ del(victim.client)
+
+
+/obj/effect/mine/gas
+ name = "oxygen mine"
+ var/gas_amount = 360
+ var/gas_type = SPAWN_OXYGEN
+
+/obj/effect/mine/gas/mineEffect(mob/victim)
+ atmos_spawn_air(gas_type, gas_amount)
+
+
+/obj/effect/mine/gas/plasma
+ name = "plasma mine"
+ gas_type = SPAWN_TOXINS
+
+
+/obj/effect/mine/gas/n2o
+ name = "\improper N2O mine"
+ gas_type = SPAWN_N2O
+
+
+/obj/effect/mine/sound
+ name = "honkblaster 1000"
+ var/sound = 'sound/items/bikehorn.ogg'
+
+/obj/effect/mine/sound/mineEffect(mob/victim)
+ playsound(loc, sound, 100, 1)
+
+
+/obj/effect/mine/sound/bwoink
+ name = "bwoink mine"
+ sound = 'sound/effects/adminhelp.ogg'
diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm
index a7dbe0957aa..ea27b6bdf82 100644
--- a/code/game/objects/items/weapons/grenades/chem_grenade.dm
+++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm
@@ -211,9 +211,17 @@
reagents.chem_temp = total_temp
/obj/item/weapon/grenade/chem_grenade/proc/can_flood_from(myloc, maxrange)
+ var/turf/myturf = get_turf(myloc)
var/list/reachable = list(myloc)
for(var/i=1; i<=maxrange; i++)
+ var/list/turflist = list()
for(var/turf/T in (orange(i, myloc) - orange(i-1, myloc)))
+ turflist |= T
+ for(var/turf/T in turflist)
+ if( !(get_dir(T,myloc) in cardinal) && (abs(T.x - myturf.x) == abs(T.y - myturf.y) ))
+ turflist.Remove(T)
+ turflist.Add(T) // we move the purely diagonal turfs to the end of the list.
+ for(var/turf/T in turflist)
if(T in reachable) continue
for(var/turf/NT in orange(1, T))
if(!(NT in reachable)) continue
diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm
index b5592736588..409ee2d7639 100644
--- a/code/game/objects/items/weapons/implants/implant.dm
+++ b/code/game/objects/items/weapons/implants/implant.dm
@@ -213,7 +213,7 @@
imp_in.reagents.add_reagent("synaptizine", 10)
imp_in.reagents.add_reagent("omnizine", 10)
- imp_in.reagents.add_reagent("morphine", 10)
+ imp_in.reagents.add_reagent("stimulants", 10)
/obj/item/weapon/implant/emp
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 106becf41c8..ce9bc361b99 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -69,6 +69,7 @@ var/list/admin_verbs_ban = list(
var/list/admin_verbs_sounds = list(
/client/proc/play_local_sound,
/client/proc/play_sound,
+ /client/proc/set_round_end_sound,
)
var/list/admin_verbs_fun = list(
/client/proc/cmd_admin_dress,
@@ -158,6 +159,7 @@ var/list/admin_verbs_hideable = list(
/client/proc/check_words,
/client/proc/play_local_sound,
/client/proc/play_sound,
+ /client/proc/set_round_end_sound,
/client/proc/cmd_admin_dress,
/client/proc/cmd_admin_gib_self,
/client/proc/drop_bomb,
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index 22f77f0e643..82e183bf91f 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -36,6 +36,20 @@ var/sound/admin_sound
playsound(get_turf(src.mob), S, 50, 0, 0)
feedback_add_details("admin_verb","PLS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+/client/proc/set_round_end_sound(S as sound)
+ set category = "Fun"
+ set name = "Set Round End Sound"
+ if(!check_rights(R_SOUNDS)) return
+
+ if(ticker)
+ ticker.round_end_sound = S
+ else
+ return
+
+ log_admin("[key_name(src)] set the round end sound to [S]")
+ message_admins("[key_name_admin(src)] set the round end sound to [S]")
+ feedback_add_details("admin_verb","SRES") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+
/client/proc/stop_sounds()
set category = "Debug"
set name = "Stop Sounds"
diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm
index 62e7c97d47f..13bc4ca5951 100644
--- a/code/modules/mining/equipment_locker.dm
+++ b/code/modules/mining/equipment_locker.dm
@@ -757,23 +757,10 @@
cooldown = 1
spawn(40)
cooldown = 0
- var/client/C = user.client
- var/list/L = list()
- var/turf/simulated/mineral/M
- for(M in range(7, user))
- if(M.scan_state)
- L += M
- if(!L.len)
- user << "[src] reports that nothing was detected nearby."
- return
- else
- for(M in L)
- var/turf/T = get_turf(M)
- var/image/I = image('icons/turf/mining.dmi', loc = T, icon_state = M.scan_state, layer = 18)
- C.images += I
- spawn(30)
- if(C)
- C.images -= I
+ var/list/mobs = list()
+ mobs |= user
+ mineral_scan_pulse(mobs, get_turf(user))
+
//Debug item to identify all ore spread quickly
/obj/item/device/mining_scanner/admin
@@ -803,22 +790,24 @@
var/list/mobs = recursive_mob_check(t, 1,0,0)
if(!mobs.len)
return
- var/list/L = list()
- var/turf/simulated/mineral/M
- for(M in range(7, t))
- if(M.scan_state)
- L += M
- if(L.len)
- for(var/mob/user in mobs)
- if(user.client)
- var/client/C = user.client
- for(M in L)
- var/turf/T = get_turf(M)
- var/image/I = image('icons/turf/mining.dmi', loc = T, icon_state = M.scan_state, layer = 18)
- C.images += I
- spawn(30)
- if(C)
- C.images -= I
+ mineral_scan_pulse(mobs, t)
+
+/proc/mineral_scan_pulse(list/mobs, turf/T, range = world.view)
+ var/list/minerals = list()
+ for(var/turf/simulated/mineral/M in range(range, T))
+ if(M.scan_state)
+ minerals += M
+ if(minerals.len)
+ for(var/mob/user in mobs)
+ if(user.client)
+ var/client/C = user.client
+ for(var/turf/simulated/mineral/M in minerals)
+ var/turf/F = get_turf(M)
+ var/image/I = image('icons/turf/mining.dmi', loc = F, icon_state = M.scan_state, layer = 18)
+ C.images += I
+ spawn(30)
+ if(C)
+ C.images -= I
/**********************Xeno Warning Sign**********************/
/obj/structure/sign/xeno_warning_mining
diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm
index 79c1960f3a8..0b33449b5ef 100644
--- a/code/modules/mob/living/carbon/alien/alien.dm
+++ b/code/modules/mob/living/carbon/alien/alien.dm
@@ -73,22 +73,18 @@
var/loc_temp = get_temperature(environment)
- //world << "Loc temp: [loc_temp] - Body temp: [bodytemperature] - Fireloss: [getFireLoss()] - Fire protection: [heat_protection] - Location: [loc] - src: [src]"
-
// Aliens are now weak to fire.
//After then, it reacts to the surrounding atmosphere based on your thermal protection
if(!on_fire) // If you're on fire, ignore local air temperature
if(loc_temp > bodytemperature)
//Place is hotter than we are
- var/thermal_protection = heat_protection //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
+ var/thermal_protection = heat_protection //This returns a 0 - 1 value, which corresponds to the percentage of heat protection.
if(thermal_protection < 1)
bodytemperature += (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
else
bodytemperature += 1 * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
- // bodytemperature -= max((loc_temp - bodytemperature / BODYTEMP_AUTORECOVERY_DIVISOR), BODYTEMP_AUTORECOVERY_MINIMUM)
- // +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
if(bodytemperature > 360.15)
//Body temperature is too hot.
throw_alert("alien_fire")
@@ -134,6 +130,9 @@
bodytemperature += BODYTEMP_HEATING_MAX //If you're on fire, you heat up!
return
+/mob/living/carbon/alien/reagent_check(var/datum/reagent/R) //can metabolize all reagents
+ return 0
+
/mob/living/carbon/alien/IsAdvancedToolUser()
return has_fine_manipulation
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
index 4ace45627ab..a34c6337786 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
@@ -36,13 +36,6 @@
else
healths.icon_state = "health7"
-
-/mob/living/carbon/alien/humanoid/hunter/handle_environment()
- if(m_intent == "run" || resting)
- ..()
- else
- adjustToxLoss(-heal_rate)
-
/mob/living/carbon/alien/humanoid/hunter/movement_delay()
. = -1 //hunters are sanic
. += ..() //but they still need to slow down on stun
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
index 9640f75e091..02b856d2356 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
@@ -124,9 +124,6 @@
unEquip(r_store)
unEquip(l_store)
-/mob/living/carbon/alien/humanoid/reagent_check(var/datum/reagent/R)
- return 0
-
/mob/living/carbon/alien/humanoid/cuff_resist(obj/item/I)
playsound(src, 'sound/voice/hiss5.ogg', 40, 1, 1) //Alien roars when starting to break free
..(I, cuff_break = 1)
diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm
index acdbfd4d055..858d3ec155b 100644
--- a/code/modules/mob/living/carbon/alien/life.dm
+++ b/code/modules/mob/living/carbon/alien/life.dm
@@ -30,7 +30,6 @@
//BREATH TEMPERATURE
handle_breath_temperature(breath)
-
/mob/living/carbon/alien/handle_status_effects()
..()
//natural reduction of movement delay due to stun.
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index d14b746171c..d3aa47771a2 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -52,20 +52,10 @@
/mob/living/carbon/human/calculate_affecting_pressure(var/pressure)
- ..()
- var/pressure_difference = abs( pressure - ONE_ATMOSPHERE )
-
- var/pressure_adjustment_coefficient = 1 //Determins how much the clothing you are wearing protects you in percent.
- if(wear_suit && (wear_suit.flags & STOPSPRESSUREDMAGE))
- pressure_adjustment_coefficient -= PRESSURE_SUIT_REDUCTION_COEFFICIENT
- if(head && (head.flags & STOPSPRESSUREDMAGE))
- pressure_adjustment_coefficient -= PRESSURE_HEAD_REDUCTION_COEFFICIENT
- pressure_adjustment_coefficient = max(pressure_adjustment_coefficient,0) //So it isn't less than 0
- pressure_difference = pressure_difference * pressure_adjustment_coefficient
- if(pressure > ONE_ATMOSPHERE)
- return ONE_ATMOSPHERE + pressure_difference
+ if((wear_suit && (wear_suit.flags & STOPSPRESSUREDMAGE)) && (head && (head.flags & STOPSPRESSUREDMAGE)))
+ return ONE_ATMOSPHERE
else
- return ONE_ATMOSPHERE - pressure_difference
+ return pressure
/mob/living/carbon/human/handle_disabilities()
@@ -146,21 +136,6 @@
//END FIRE CODE
-/mob/living/carbon/human/proc/stabilize_temperature_from_calories()
- switch(bodytemperature)
- if(-INFINITY to 260.15) //260.15 is 310.15 - 50, the temperature where you start to feel effects.
- if(nutrition >= 2) //If we are very, very cold we'll use up quite a bit of nutriment to heat us up.
- nutrition -= 2
- var/body_temperature_difference = 310.15 - bodytemperature
- bodytemperature += max((body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR), BODYTEMP_AUTORECOVERY_MINIMUM)
- if(260.15 to 360.15)
- var/body_temperature_difference = 310.15 - bodytemperature
- bodytemperature += body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR
- if(360.15 to INFINITY) //360.15 is 310.15 + 50, the temperature where you start to feel effects.
- //We totally need a sweat system cause it totally makes sense...~
- var/body_temperature_difference = 310.15 - bodytemperature
- bodytemperature += min((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), -BODYTEMP_AUTORECOVERY_MINIMUM) //We're dealing with negative numbers
-
//This proc returns a number made up of the flags for body parts which you are protected on. (such as HEAD, CHEST, GROIN, etc. See setup.dm for the full list)
/mob/living/carbon/human/proc/get_heat_protection_flags(temperature) //Temperature is the temperature you're being exposed to.
var/thermal_protection_flags = 0
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index 957e938d47e..5be1ee2fb9d 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -1143,7 +1143,7 @@
return 1
/datum/species/proc/handle_breath_temperature(datum/gas_mixture/breath, var/mob/living/carbon/human/H) // called by human/life, handles temperatures
- if( (abs(310.15 - breath.temperature) > 50) && !(mutations_list[COLDRES] in H.dna.mutations) && !(COLDRES in specflags)) // Hot air hurts :(
+ if(abs(310.15 - breath.temperature) > 50)
if(!(mutations_list[COLDRES] in H.dna.mutations)) // COLD DAMAGE
switch(breath.temperature)
@@ -1162,18 +1162,18 @@
H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, "head")
if(1000 to INFINITY)
H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head")
+
/datum/species/proc/handle_environment(datum/gas_mixture/environment, var/mob/living/carbon/human/H)
if(!environment)
return
var/loc_temp = H.get_temperature(environment)
- //world << "Loc temp: [loc_temp] - Body temp: [bodytemperature] - Fireloss: [getFireLoss()] - Thermal protection: [get_thermal_protection()] - Fire protection: [thermal_protection + add_fire_protection(loc_temp)] - Heat capacity: [environment_heat_capacity] - Location: [loc] - src: [src]"
- //Body temperature is adjusted in two steps. Firstly your body tries to stabilize itself a bit.
- if(H.stat != 2)
- H.stabilize_temperature_from_calories()
+ //Body temperature is adjusted in two steps. First, your body tries to stabilize itself a bit.
+ if(H.stat != DEAD)
+ H.natural_bodytemperature_stabilization()
- //After then, it reacts to the surrounding atmosphere based on your thermal protection
+ //Then, it reacts to the surrounding atmosphere based on your thermal protection
if(!H.on_fire) //If you're on fire, you do not heat up or cool down based on surrounding gases
if(loc_temp < H.bodytemperature)
//Place is colder than we are
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index 3b4025f9528..997387dd784 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -238,15 +238,8 @@
if(reagents)
reagents.metabolize(src)
-/mob/living/carbon/handle_blood()
- return
-
-/mob/living/carbon/handle_random_events()
- return
-
/mob/living/carbon/proc/handle_heart()
return
-/mob/living/carbon/handle_environment(var/datum/gas_mixture/environment) return
/mob/living/carbon/handle_stomach()
spawn(0)
@@ -503,3 +496,20 @@
healths.icon_state = "health6"
else
healths.icon_state = "health7"
+
+
+//used in human and monkey handle_environment()
+/mob/living/carbon/proc/natural_bodytemperature_stabilization()
+ var/body_temperature_difference = 310.15 - bodytemperature
+ switch(bodytemperature)
+ if(-INFINITY to 260.15) //260.15 is 310.15 - 50, the temperature where you start to feel effects.
+ if(nutrition >= 2) //If we are very, very cold we'll use up quite a bit of nutriment to heat us up.
+ nutrition -= 2
+ bodytemperature += max((body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR), BODYTEMP_AUTORECOVERY_MINIMUM)
+ if(260.15 to 310.15)
+ bodytemperature += max(body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR, min(body_temperature_difference, BODYTEMP_AUTORECOVERY_MINIMUM/4))
+ if(310.15 to 360.15)
+ bodytemperature += min(body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR, max(body_temperature_difference, -BODYTEMP_AUTORECOVERY_MINIMUM/4))
+ if(360.15 to INFINITY) //360.15 is 310.15 + 50, the temperature where you start to feel effects.
+ //We totally need a sweat system cause it totally makes sense...~
+ bodytemperature += min((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), -BODYTEMP_AUTORECOVERY_MINIMUM) //We're dealing with negative numbers
diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm
index 77a3961653e..1a11316bb04 100644
--- a/code/modules/mob/living/carbon/monkey/life.dm
+++ b/code/modules/mob/living/carbon/monkey/life.dm
@@ -18,10 +18,6 @@
if(prob(1))
emote(pick("scratch","jump","roll","tail"))
-/mob/living/carbon/monkey/calculate_affecting_pressure(var/pressure)
- ..()
- return pressure
-
/mob/living/carbon/monkey/handle_mutations_and_radiation()
if (radiation)
@@ -46,23 +42,69 @@
emote("gasp")
..()
+/mob/living/carbon/monkey/handle_breath_temperature(datum/gas_mixture/breath)
+ if(abs(310.15 - breath.temperature) > 50)
+ switch(breath.temperature)
+ if(-INFINITY to 120)
+ adjustFireLoss(3)
+ if(120 to 200)
+ adjustFireLoss(1.5)
+ if(200 to 260)
+ adjustFireLoss(0.5)
+ if(360 to 400)
+ adjustFireLoss(2)
+ if(400 to 1000)
+ adjustFireLoss(3)
+ if(1000 to INFINITY)
+ adjustFireLoss(8)
/mob/living/carbon/monkey/handle_environment(datum/gas_mixture/environment)
if(!environment)
return
- var/environment_heat_capacity = environment.heat_capacity()
- if(istype(get_turf(src), /turf/space))
- var/turf/heat_turf = get_turf(src)
- environment_heat_capacity = heat_turf.heat_capacity
- if(!on_fire)
- if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
- var/transfer_coefficient = 1
+ var/loc_temp = get_temperature(environment)
- handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
+ if(stat != DEAD)
+ natural_bodytemperature_stabilization()
- if(stat != 2)
- bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
+ if(!on_fire) //If you're on fire, you do not heat up or cool down based on surrounding gases
+ if(loc_temp < bodytemperature)
+ bodytemperature += min(((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX)
+ else
+ bodytemperature += min(((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR), BODYTEMP_HEATING_MAX)
+
+ if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
+ switch(bodytemperature)
+ if(360 to 400)
+ throw_alert("temp","hot",1)
+ adjustFireLoss(2)
+ if(400 to 460)
+ throw_alert("temp","hot",2)
+ adjustFireLoss(3)
+ if(460 to INFINITY)
+ throw_alert("temp","hot",3)
+ if(on_fire)
+ adjustFireLoss(8)
+ else
+ adjustFireLoss(3)
+
+ else if(bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
+ if(!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
+ switch(bodytemperature)
+ if(200 to 260)
+ throw_alert("temp","cold",1)
+ adjustFireLoss(0.5)
+ if(120 to 200)
+ throw_alert("temp","cold",2)
+ adjustFireLoss(1.5)
+ if(-INFINITY to 120)
+ throw_alert("temp","cold",3)
+ adjustFireLoss(3)
+ else
+ clear_alert("temp")
+
+ else
+ clear_alert("temp")
//Account for massive pressure differences
@@ -84,14 +126,6 @@
return
-/mob/living/carbon/monkey/proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
- if(status_flags & GODMODE) return
- var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
-
- if(exposed_temperature > bodytemperature)
- adjustFireLoss(20.0*discomfort)
- else
- adjustFireLoss(5.0*discomfort)
/mob/living/carbon/monkey/handle_hud_icons()
@@ -120,10 +154,8 @@
if(wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT)
return 1
-///FIRE CODE
/mob/living/carbon/monkey/handle_fire()
if(..())
return
- adjustFireLoss(6)
+ bodytemperature += BODYTEMP_HEATING_MAX
return
-//END FIRE CODE
diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm
index 41e2982d9b4..51b73cc9a7a 100644
--- a/code/modules/mob/living/carbon/monkey/monkey.dm
+++ b/code/modules/mob/living/carbon/monkey/monkey.dm
@@ -204,6 +204,9 @@
/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools
return 0
+/mob/living/carbon/monkey/reagent_check(var/datum/reagent/R) //can metabolize all reagents
+ return 0
+
/mob/living/carbon/monkey/canBeHandcuffed()
return 1
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index f6e909e9f25..3cc7827073c 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -193,7 +193,7 @@ Sorry Giacom. Please don't be mad :(
//This proc is used for mobs which are affected by pressure to calculate the amount of pressure that actually
//affects them once clothing is factored in. ~Errorage
/mob/living/proc/calculate_affecting_pressure(var/pressure)
- return 0
+ return pressure
//sort of a legacy burn method for /electrocute, /shock, and the e_chair
@@ -814,4 +814,4 @@ Sorry Giacom. Please don't be mad :(
return initial(pixel_x)
/mob/living/proc/get_standard_pixel_y_offset(lying = 0)
- return initial(pixel_y)
+ return initial(pixel_y)
diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm
index 43211c0a253..74ac5e70c30 100644
--- a/code/modules/mob/living/simple_animal/hostile/mimic.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm
@@ -5,7 +5,7 @@
/mob/living/simple_animal/hostile/mimic
name = "crate"
desc = "A rectangular steel crate."
- icon = 'icons/obj/storage.dmi'
+ icon = 'icons/obj/crates.dmi'
icon_state = "crate"
icon_living = "crate"
diff --git a/code/modules/projectiles/guns/syringe_gun.dm b/code/modules/projectiles/guns/syringe_gun.dm
index a662d77099d..0b08405cdcc 100644
--- a/code/modules/projectiles/guns/syringe_gun.dm
+++ b/code/modules/projectiles/guns/syringe_gun.dm
@@ -36,6 +36,8 @@
return
/obj/item/weapon/gun/syringe/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, params)
+ if(target == loc)
+ return
newshot()
..()
diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm
index 0a8f3b2d1c7..e49cb61e992 100644
--- a/code/modules/reagents/Chemistry-Machinery.dm
+++ b/code/modules/reagents/Chemistry-Machinery.dm
@@ -592,7 +592,7 @@
/obj/machinery/chem_master/constructable/attackby(var/obj/item/B as obj, var/mob/user as mob, params)
- if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0_", B))
+ if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0", B))
if(beaker)
beaker.loc = src.loc
beaker = null
@@ -760,7 +760,7 @@ obj/machinery/computer/pandemic/proc/replicator_cooldown(var/waittime)
if(!D)
return
var/name = stripped_input(usr,"Name:","Name the culture",D.name,MAX_NAME_LEN)
- if(name == null)
+ if(name == null || wait)
return
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
B.icon_state = "bottle3"
diff --git a/code/modules/reagents/Chemistry-Reagents/Drug-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Drug-Reagents.dm
index 7feef1e8996..17fea97c5dd 100644
--- a/code/modules/reagents/Chemistry-Reagents/Drug-Reagents.dm
+++ b/code/modules/reagents/Chemistry-Reagents/Drug-Reagents.dm
@@ -36,7 +36,6 @@ datum/reagent/drug/nicotine
description = "Slightly reduces stun times. If overdosed it will deal toxin and oxygen damage."
reagent_state = LIQUID
color = "#60A584" // rgb: 96, 165, 132
- overdose_threshold = 35
addiction_threshold = 30
datum/reagent/drug/nicotine/on_mob_life(var/mob/living/M as mob)
@@ -46,15 +45,6 @@ datum/reagent/drug/nicotine/on_mob_life(var/mob/living/M as mob)
M.AdjustStunned(-1)
M.adjustStaminaLoss(-0.5*REM)
..()
- return
-
-datum/reagent/drug/nicotine/overdose_process(var/mob/living/M as mob)
- if(prob(20))
- M << "You feel like you smoked too much."
- M.adjustToxLoss(0.5*REM)
- M.adjustOxyLoss(0.5*REM)
- ..()
- return
datum/reagent/drug/crank
name = "Crank"
@@ -73,32 +63,30 @@ datum/reagent/drug/crank/on_mob_life(var/mob/living/M as mob)
M.AdjustStunned(-1)
M.AdjustWeakened(-1)
..()
- return
+
datum/reagent/drug/crank/overdose_process(var/mob/living/M as mob)
M.adjustBrainLoss(2*REM)
M.adjustToxLoss(2*REM)
M.adjustBruteLoss(2*REM)
..()
- return
datum/reagent/drug/crank/addiction_act_stage1(var/mob/living/M as mob)
M.adjustBrainLoss(5*REM)
..()
- return
+
datum/reagent/drug/crank/addiction_act_stage2(var/mob/living/M as mob)
M.adjustToxLoss(5*REM)
..()
- return
+
datum/reagent/drug/crank/addiction_act_stage3(var/mob/living/M as mob)
M.adjustBruteLoss(5*REM)
..()
- return
+
datum/reagent/drug/crank/addiction_act_stage4(var/mob/living/M as mob)
M.adjustBrainLoss(5*REM)
M.adjustToxLoss(5*REM)
M.adjustBruteLoss(5*REM)
..()
- return
/datum/reagent/drug/krokodil
name = "Krokodil"
diff --git a/code/modules/reagents/Chemistry-Recipes/Pyrotechnics.dm b/code/modules/reagents/Chemistry-Recipes/Pyrotechnics.dm
index d53162d2a96..737f9bb5e92 100644
--- a/code/modules/reagents/Chemistry-Recipes/Pyrotechnics.dm
+++ b/code/modules/reagents/Chemistry-Recipes/Pyrotechnics.dm
@@ -190,6 +190,7 @@
id = "flash_powder_flash"
result = null
required_reagents = list("flash_powder" = 1)
+ result_amount = 1
required_temp = 374
/datum/chemical_reaction/flash_powder_flash/on_reaction(var/datum/reagents/holder, var/created_volume)
@@ -235,6 +236,7 @@
result = null
required_reagents = list("smoke_powder" = 1)
required_temp = 374
+ result_amount = 1
secondary = 1
mob_react = 1
@@ -285,6 +287,7 @@
result = null
required_reagents = list("sonic_powder" = 1)
required_temp = 374
+ result_amount = 1
/datum/chemical_reaction/sonic_powder_deafen/on_reaction(var/datum/reagents/holder, var/created_volume)
var/location = get_turf(holder.my_atom)
diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm
index 16b8d2a05d2..2d83c9580b8 100644
--- a/code/modules/reagents/reagent_containers/hypospray.dm
+++ b/code/modules/reagents/reagent_containers/hypospray.dm
@@ -93,7 +93,7 @@
/obj/item/weapon/reagent_containers/hypospray/medipen/stimpack //goliath kiting
name = "stimpack medipen"
- desc = "A rapid way to stimulate your body's adrenaline, allowing for freer movement in restrictive armor as well as a ."
+ desc = "A rapid way to stimulate your body's adrenaline, allowing for freer movement in restrictive armor."
icon_state = "stimpen"
volume = 20
amount_per_transfer_from_this = 20
diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm
index 1e1cd3c9b35..26e29741279 100644
--- a/code/modules/research/designs/mechfabricator_designs.dm
+++ b/code/modules/research/designs/mechfabricator_designs.dm
@@ -504,6 +504,15 @@
construction_time = 100
category = list("Exosuit Equipment")
+/datum/design/mech_mining_scanner
+ name = "Exosuit Engineering Equipement (Mining Scanner)"
+ id = "mech_mscanner"
+ build_type = MECHFAB
+ build_path = /obj/item/mecha_parts/mecha_equipment/tool/mining_scanner
+ materials = list("$metal"=5000,"$glass"=2500)
+ construction_time = 50
+ category = list("Exosuit Equipment")
+
/datum/design/mech_extinguisher
name = "Exosuit Engineering Equipment (Extinguisher)"
id = "mech_extinguisher"
diff --git a/code/world.dm b/code/world.dm
index 182130a4ce2..de98ae35678 100644
--- a/code/world.dm
+++ b/code/world.dm
@@ -146,7 +146,10 @@
log << "#[count]\t[index]"
#endif
spawn(0)
- world << sound(pick('sound/AI/newroundsexy.ogg','sound/misc/apcdestroyed.ogg','sound/misc/bangindonk.ogg','sound/misc/leavingtg.ogg')) // random end sounds!! - LastyBatsy
+ if(ticker && ticker.round_end_sound)
+ world << sound(ticker.round_end_sound)
+ else
+ world << sound(pick('sound/AI/newroundsexy.ogg','sound/misc/apcdestroyed.ogg','sound/misc/bangindonk.ogg','sound/misc/leavingtg.ogg')) // random end sounds!! - LastyBatsy
for(var/client/C in clients)
if(config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
diff --git a/html/changelog.html b/html/changelog.html
index f319c4ab2b9..72ba54ac5c3 100644
--- a/html/changelog.html
+++ b/html/changelog.html
@@ -55,6 +55,83 @@
-->
+
22 April 2015
+
Incoming5643 updated:
+
+ - Adds a new fun button for admins: 'Set Round End Sound'. You can use the set round end sound button to set the round end sound. Glad we cleared that up!
+
+
Miauw62 updated:
+
+ - Very slightly expanded atmos and added an external airlock.
+
+
Xhuis updated:
+
+ - A few issues have been fixed for revenants. In addition, the Mind Blast/Mind Spike sound effect has been removed.
+ - Adds the Hypnotize ability to revenants. It will cause a target to fall asleep after a short time.
+
+
xxalpha updated:
+
+ - Added an Exosuit Mining Scanner to the robotics fabricator.
+ - Buffed Ripley's movement and drilling speed in low pressure environments.
+
+
+
21 April 2015
+
Ikarrus updated:
+
+ - Gang mode has had some considerable work done on it, including a new objective and currency dynamic.
+ - New objective: Claim half the station as territory by tagging it with spray cans supplied to gang bosses, but usable by any member.
+ - An area can only be tagged by one gang at a time, remove your opponent's tag or spray over it.
+ - New recruitment: Recruiment pens replace flashes, stab people to recruit them.
+ - Recruitment is silent, but causes brief seizures and has a cooldown that scales upwards with a gang's size.
+ - New tool: The Gangtool is used by bosses and lieutenants to recall the shuttle and purchase supplies.
+ - Pistols, ammo, spraycans, recruitment pens and additional gangtools can all be bought.
+ - Gangtools also alert the user of promotions, purchases and territory changes within the gang.
+ - Lieutenants are promoted from gang members when given their own gangtool; they're immune to deconversion and able to do anything a boss can except promotion.
+ - New currency: Influence is used to purchase with the gangtool and is generated every 5 minutes by each territory owned by the gang.
+ - Thermite can be cleaned off walls now.
+
+
+
20 April 2015
+
Fayrik updated:
+
+ - Abductors now get advanced camera consoles.
+ - Redesigned Centcom again. There's a bar at the thunderdome now.
+ - Headsets can now be locked to a spesific frequency, this only occurs for nuke ops and deathsquads.
+ - The Centcom channel is now available over all z-levels, regardless of telecomms status.
+ - The Deathsquad space suits have been upgraded to hardsuits.
+ - The Deathsquad now have thermal imaging huds, which can swap which hud they display on the fly.
+
+
phil235 updated:
+
+ - Reagents are now back to being metabolized every tick. Fixes frost oil and capsaicin not working.
+ - Fixes not being able to make sterilizine.
+ - Adding overdose to space drug, causing mild hallucination and toxin and brain damage.
+ - Nerfed healing power of stimulant reagent. Buffed ephedrine a bit.
+ - Nitroglycerin can now be stabilized with stabilizing agent, and explodes when heated.
+
+
+
19 April 2015
+
AnturK updated:
+
+ - Observers can now see abductor hivemind messages.
+ - Adds advanced baton for abductors: Stun, Sleep and Cuff in one tool.
+ - Abductor agents now have vest cameras.
+ - New sprites for abductors and their gear made by Ausops.
+
+
Fayrik updated:
+
+ - Added jobban options for Abductors and Deathsquads.
+ - Made admin antag spawning buttons more efficient and less prone to failure.
+
+
Xhuis updated:
+
+ - Recent sightings aboard space stations shows that spirits seem to be manifesting as malevolent revenants and draining the life of crew. The chaplain may be helpful in stopping this new threat.
+
+
kingofkosmos updated:
+
+ - Girder and machine frame construction protocols has been changed. They can now be secured/unsecured with a wrench and disassembled with a welder.
+
+
16 April 2015
AnturK updated:
diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml
index 035e91f2f36..7b93c2767ed 100644
--- a/html/changelogs/.all_changelog.yml
+++ b/html/changelogs/.all_changelog.yml
@@ -2220,3 +2220,77 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
- rscadd: Nanotrasen scientists have recently observed a strange genome shift in
green slimes. Experiments have shown that injection of radium into an active
green slime extract will create a very unstable mutation toxin. Use with caution.
+2015-04-19:
+ AnturK:
+ - bugfix: Observers can now see abductor hivemind messages.
+ - rscadd: 'Adds advanced baton for abductors: Stun, Sleep and Cuff in one tool.'
+ - rscadd: Abductor agents now have vest cameras.
+ - imageadd: New sprites for abductors and their gear made by Ausops.
+ Fayrik:
+ - rscadd: Added jobban options for Abductors and Deathsquads.
+ - tweak: Made admin antag spawning buttons more efficient and less prone to failure.
+ Xhuis:
+ - rscadd: Recent sightings aboard space stations shows that spirits seem to be manifesting
+ as malevolent revenants and draining the life of crew. The chaplain may be helpful
+ in stopping this new threat.
+ kingofkosmos:
+ - wip: Girder and machine frame construction protocols has been changed. They can
+ now be secured/unsecured with a wrench and disassembled with a welder.
+2015-04-20:
+ Fayrik:
+ - rscadd: Abductors now get advanced camera consoles.
+ - tweak: Redesigned Centcom again. There's a bar at the thunderdome now.
+ - rscadd: Headsets can now be locked to a spesific frequency, this only occurs for
+ nuke ops and deathsquads.
+ - rscadd: The Centcom channel is now available over all z-levels, regardless of
+ telecomms status.
+ - tweak: The Deathsquad space suits have been upgraded to hardsuits.
+ - rscadd: The Deathsquad now have thermal imaging huds, which can swap which hud
+ they display on the fly.
+ phil235:
+ - tweak: Reagents are now back to being metabolized every tick. Fixes frost oil
+ and capsaicin not working.
+ - tweak: Fixes not being able to make sterilizine.
+ - rscadd: Adding overdose to space drug, causing mild hallucination and toxin and
+ brain damage.
+ - tweak: Nerfed healing power of stimulant reagent. Buffed ephedrine a bit.
+ - rscadd: Nitroglycerin can now be stabilized with stabilizing agent, and explodes
+ when heated.
+2015-04-21:
+ Ikarrus:
+ - wip: Gang mode has had some considerable work done on it, including a new objective
+ and currency dynamic.
+ - rscadd: New objective: Claim half the station as territory by tagging it
+ with spray cans supplied to gang bosses, but usable by any member.
+ - wip: An area can only be tagged by one gang at a time, remove your opponent's
+ tag or spray over it.
+ - rscadd: New recruitment: Recruiment pens replace flashes, stab people to
+ recruit them.
+ - experiment: Recruitment is silent, but causes brief seizures and has a cooldown
+ that scales upwards with a gang's size.
+ - rscadd: New tool: The Gangtool is used by bosses and lieutenants to recall
+ the shuttle and purchase supplies.
+ - rscadd: Pistols, ammo, spraycans, recruitment pens and additional gangtools can
+ all be bought.
+ - tweak: Gangtools also alert the user of promotions, purchases and territory changes
+ within the gang.
+ - rscadd: Lieutenants are promoted from gang members when given their own gangtool;
+ they're immune to deconversion and able to do anything a boss can except promotion.
+ - rscadd: New currency: Influence is used to purchase with the gangtool and
+ is generated every 5 minutes by each territory owned by the gang.
+ - tweak: Thermite can be cleaned off walls now.
+2015-04-22:
+ Incoming5643:
+ - rscadd: 'Adds a new fun button for admins: ''Set Round End Sound''. You can use
+ the set round end sound button to set the round end sound. Glad we cleared that
+ up!'
+ Miauw62:
+ - wip: Very slightly expanded atmos and added an external airlock.
+ Xhuis:
+ - bugfix: A few issues have been fixed for revenants. In addition, the Mind Blast/Mind
+ Spike sound effect has been removed.
+ - rscadd: Adds the Hypnotize ability to revenants. It will cause a target to fall
+ asleep after a short time.
+ xxalpha:
+ - rscadd: Added an Exosuit Mining Scanner to the robotics fabricator.
+ - tweak: Buffed Ripley's movement and drilling speed in low pressure environments.
diff --git a/html/changelogs/Fayrik-AllTheSmallThings.yml b/html/changelogs/Fayrik-AllTheSmallThings.yml
deleted file mode 100644
index 0f6a0283e2c..00000000000
--- a/html/changelogs/Fayrik-AllTheSmallThings.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-author: Fayrik
-
-delete-after: True
-
-changes:
- - rscadd: "Added jobban options for Abductors and Deathsquads."
- - tweak: "Made admin antag spawning buttons more efficient and less prone to failure."
\ No newline at end of file
diff --git a/html/changelogs/Fayrik-CentcomExpansion.yml b/html/changelogs/Fayrik-CentcomExpansion.yml
deleted file mode 100644
index 51c65827d62..00000000000
--- a/html/changelogs/Fayrik-CentcomExpansion.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-author: Fayrik
-
-delete-after: True
-
-changes:
- - rscadd: "Abductors now get advanced camera consoles."
- - tweak: "Redesigned Centcom again. There's a bar at the thunderdome now."
- - rscadd: "Headsets can now be locked to a spesific frequency, this only occurs for nuke ops and deathsquads."
- - rscadd: "The Centcom channel is now available over all z-levels, regardless of telecomms status."
- - tweak: "The Deathsquad space suits have been upgraded to hardsuits."
- - rscadd: "The Deathsquad now have thermal imaging huds, which can swap which hud they display on the fly."
\ No newline at end of file
diff --git a/html/changelogs/Xhuis-RevenantUpdate.yml b/html/changelogs/Xhuis-RevenantUpdate.yml
deleted file mode 100644
index e9d30677e73..00000000000
--- a/html/changelogs/Xhuis-RevenantUpdate.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-author: Xhuis
-delete-after: True
-
-changes:
- - bugfix: "A few issues have been fixed for revenants. In addition, the Mind Blast/Mind Spike sound effect has been removed."
- - rscadd: "Adds the Hypnotize ability to revenants. It will cause a target to fall asleep after a short time."
\ No newline at end of file
diff --git a/html/changelogs/Xhuis-Revenants.yml b/html/changelogs/Xhuis-Revenants.yml
deleted file mode 100644
index eaee5894b4e..00000000000
--- a/html/changelogs/Xhuis-Revenants.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-author: Xhuis
-delete-after: true
-
-
-changes:
- - rscadd: "Recent sightings aboard space stations shows that spirits seem to be manifesting as malevolent revenants and draining the life of crew. The chaplain may be helpful in stopping this new threat."
\ No newline at end of file
diff --git a/html/changelogs/kingofkosmos-girderrakennus.yml b/html/changelogs/kingofkosmos-girderrakennus.yml
deleted file mode 100644
index 3634d975887..00000000000
--- a/html/changelogs/kingofkosmos-girderrakennus.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-author: kingofkosmos
-
-delete-after: True
-
-changes:
- - wip: "Girder and machine frame construction protocols has been changed. They can now be secured/unsecured with a wrench and disassembled with a welder."
diff --git a/html/changelogs/phil235-BundleFix4.yml b/html/changelogs/phil235-BundleFix4.yml
new file mode 100644
index 00000000000..dcaed92231a
--- /dev/null
+++ b/html/changelogs/phil235-BundleFix4.yml
@@ -0,0 +1,10 @@
+
+author: phil235
+
+delete-after: True
+
+changes:
+ - tweak: "Telecom machines are now deconstructed the same way as all other constructable machines."
+ - tweak: "You can no longer overdose on nicotine but you can get addicted (very mild effects)."
+
+
diff --git a/html/changelogs/phil235-Chems.yml b/html/changelogs/phil235-Chems.yml
deleted file mode 100644
index c16574fd7af..00000000000
--- a/html/changelogs/phil235-Chems.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-author: phil235
-
-delete-after: True
-
-changes:
- - tweak: "Reagents are now back to being metabolized every tick. Fixes frost oil and capsaicin not working."
- - tweak: "Fixes not being able to make sterilizine."
- - rscadd: "Adding overdose to space drug, causing mild hallucination and toxin and brain damage."
- - tweak: "Nerfed healing power of stimulant reagent. Buffed ephedrine a bit."
- - rscadd: "Nitroglycerin can now be stabilized with stabilizing agent, and explodes when heated."
diff --git a/icons/mecha/mecha_equipment.dmi b/icons/mecha/mecha_equipment.dmi
index 96687396a37..930d0685de4 100644
Binary files a/icons/mecha/mecha_equipment.dmi and b/icons/mecha/mecha_equipment.dmi differ
diff --git a/icons/mob/inhands/items_lefthand.dmi b/icons/mob/inhands/items_lefthand.dmi
index 4fd194aacbe..2a6a9930431 100644
Binary files a/icons/mob/inhands/items_lefthand.dmi and b/icons/mob/inhands/items_lefthand.dmi differ
diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi
index dc3f7d861b8..1cc952fb001 100644
Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ
diff --git a/icons/obj/machines/telecomms.dmi b/icons/obj/machines/telecomms.dmi
new file mode 100644
index 00000000000..f47fcc63f87
Binary files /dev/null and b/icons/obj/machines/telecomms.dmi differ
diff --git a/icons/obj/stationobjs.dmi b/icons/obj/stationobjs.dmi
index edb1b1fe792..a30ab24fcbe 100644
Binary files a/icons/obj/stationobjs.dmi and b/icons/obj/stationobjs.dmi differ
diff --git a/icons/obj/weapons.dmi b/icons/obj/weapons.dmi
index b6b78aaf4fb..9b5be0100e8 100644
Binary files a/icons/obj/weapons.dmi and b/icons/obj/weapons.dmi differ
diff --git a/tgstation.dme b/tgstation.dme
index d6d0235eea7..27d86163d90 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -479,13 +479,20 @@
#include "code\game\machinery\embedded_controller\simple_vent_controller.dm"
#include "code\game\machinery\pipe\construction.dm"
#include "code\game\machinery\pipe\pipe_dispenser.dm"
-#include "code\game\machinery\telecomms\broadcaster.dm"
-#include "code\game\machinery\telecomms\logbrowser.dm"
+#include "code\game\machinery\telecomms\broadcasting.dm"
#include "code\game\machinery\telecomms\machine_interactions.dm"
-#include "code\game\machinery\telecomms\presets.dm"
#include "code\game\machinery\telecomms\telecomunications.dm"
-#include "code\game\machinery\telecomms\telemonitor.dm"
-#include "code\game\machinery\telecomms\traffic_control.dm"
+#include "code\game\machinery\telecomms\computers\logbrowser.dm"
+#include "code\game\machinery\telecomms\computers\telemonitor.dm"
+#include "code\game\machinery\telecomms\computers\traffic_control.dm"
+#include "code\game\machinery\telecomms\machines\allinone.dm"
+#include "code\game\machinery\telecomms\machines\broadcaster.dm"
+#include "code\game\machinery\telecomms\machines\bus.dm"
+#include "code\game\machinery\telecomms\machines\hub.dm"
+#include "code\game\machinery\telecomms\machines\processor.dm"
+#include "code\game\machinery\telecomms\machines\receiver.dm"
+#include "code\game\machinery\telecomms\machines\relay.dm"
+#include "code\game\machinery\telecomms\machines\server.dm"
#include "code\game\mecha\mech_bay.dm"
#include "code\game\mecha\mech_fabricator.dm"
#include "code\game\mecha\mecha.dm"