diff --git a/baystation12.dme b/baystation12.dme index 915c098b3e3..480e15e3028 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -317,6 +317,7 @@ #include "code\game\machinery\buttons.dm" #include "code\game\machinery\cell_charger.dm" #include "code\game\machinery\cloning.dm" +#include "code\game\machinery\commsbantenna.dm" #include "code\game\machinery\constructable_frame.dm" #include "code\game\machinery\cryo.dm" #include "code\game\machinery\cryopod.dm" @@ -641,6 +642,7 @@ #include "code\game\objects\items\weapons\circuitboards\computer\telecomms.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\biogenerator.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\cloning.dm" +#include "code\game\objects\items\weapons\circuitboards\machinery\commsantenna.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\mining_drill.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\pacman.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\power.dm" diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 3cc3107784d..1c2f5c692e9 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -1506,5 +1506,20 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /obj/item/device/floor_painter, /obj/item/device/floor_painter) +/datum/supply_packs/bluespacerelay + name = "Emergency Bluespace Relay Assembly Kit" + cost = 75 + containername = "emergency bluespace relay assembly kit" + containertype = /obj/structure/closet/crate + group = "Engineering" + contains = list(/obj/item/weapon/circuitboard/bluespacerelay, + /obj/item/weapon/stock_parts/manipulator, + /obj/item/weapon/stock_parts/manipulator, + /obj/item/weapon/stock_parts/subspace/filter, + /obj/item/weapon/stock_parts/subspace/crystal, + /obj/item/weapon/storage/toolbox/electrical) + + + diff --git a/code/game/machinery/commsbantenna.dm b/code/game/machinery/commsbantenna.dm new file mode 100644 index 00000000000..03d4a311b18 --- /dev/null +++ b/code/game/machinery/commsbantenna.dm @@ -0,0 +1,34 @@ +/obj/machinery/bluespacerelay + name = "Emergency Bluespace Relay" + desc = "This sends messages through bluespace! Wow!" + icon = 'icons/obj/stationobjs.dmi' + icon_state = "bspacerelay" + + anchored = 1 + density = 1 + use_power = 1 + var/on = 1 + + idle_power_usage = 15000 + active_power_usage = 15000 + +/obj/machinery/bluespacerelay/process() + + update_power() + + update_icon() + + +/obj/machinery/bluespacerelay/update_icon() + if(on) + icon_state = initial(icon_state) + else + icon_state = "[initial(icon_state)]_off" + +/obj/machinery/bluespacerelay/proc/update_power() + + if(stat & (BROKEN|NOPOWER|EMPED)) + on = 0 + else + on = 1 + diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 4015b907f97..75bbc59f2bf 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -48,9 +48,9 @@ /obj/machinery/computer/communications/Topic(href, href_list) if(..()) return 1 - if (src.z > 1) - usr << "\red Unable to establish a connection: \black You're too far away from the station!" - return + //if (src.z > 1) + // usr << "\red Unable to establish a connection: \black You're too far away from the station!" + // return usr.set_machine(src) if(!href_list["operation"]) @@ -68,8 +68,8 @@ if (I && istype(I)) if(src.check_access(I)) authenticated = 1 - if(access_captain in I.access) - authenticated = 2 + //if(access_captain in I.access) + //authenticated = 2 crew_announcement.announcer = GetNameAndAssignmentFromId(I) if("logout") authenticated = 0 @@ -82,7 +82,7 @@ var/obj/item/device/pda/pda = I I = pda.id if (I && istype(I)) - if(access_captain in I.access || access_heads in I.access) //Let heads change the alert level. + if(access_heads in I.access) //Let heads change the alert level. var/old_level = security_level if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN if(tmp_alertlevel < SEC_LEVEL_GREEN) tmp_alertlevel = SEC_LEVEL_GREEN @@ -106,7 +106,7 @@ usr << "You need to swipe your ID." if("announce") - if(src.authenticated==2) + if(src.authenticated==1) if(message_cooldown) usr << "Please allow at least one minute to pass between announcements" return @@ -183,32 +183,35 @@ // OMG CENTCOMM LETTERHEAD if("MessageCentcomm") - if(src.authenticated==2) + if(src.authenticated==1) if(centcomm_message_cooldown) - usr << "\red Arrays recycling. Please stand by." + usr << "Arrays recycling. Please stand by." + return + if(!is_relay_online())//Contact Centcom has a check, Syndie doesn't to allow for Traitor funs. + usr <<"No Emergency Bluespace Relay detected. Unable to transmit message." return var/input = sanitize(input("Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")) if(!input || !(usr in view(1,src))) return Centcomm_announce(input, usr) - usr << "\blue Message transmitted." + usr << "blue Message transmitted." log_say("[key_name(usr)] has made an IA Centcomm announcement: [input]") centcomm_message_cooldown = 1 - spawn(300)//10 minute cooldown + spawn(300)//30 second cooldown centcomm_message_cooldown = 0 // OMG SYNDICATE ...LETTERHEAD if("MessageSyndicate") - if((src.authenticated==2) && (src.emagged)) + if((src.authenticated==1) && (src.emagged)) if(centcomm_message_cooldown) - usr << "\red Arrays recycling. Please stand by." + usr << "Arrays recycling. Please stand by." return var/input = sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")) if(!input || !(usr in view(1,src))) return Syndicate_announce(input, usr) - usr << "\blue Message transmitted." + usr << "blue Message transmitted." log_say("[key_name(usr)] has made an illegal announcement: [input]") centcomm_message_cooldown = 1 spawn(300)//10 minute cooldown @@ -279,9 +282,9 @@ /obj/machinery/computer/communications/attack_hand(var/mob/user as mob) if(..()) return - if (src.z > 6) - user << "\red Unable to establish a connection: \black You're too far away from the station!" - return + //if (src.z > 6) + // user << "\red Unable to establish a connection: \black You're too far away from the station!" + // return user.set_machine(src) var/dat = "Communications Console" @@ -301,7 +304,7 @@ if(STATE_DEFAULT) if (src.authenticated) dat += "
\[ Log Out \]" - if (src.authenticated==2) + if (src.authenticated==1) dat += "
\[ Make An Announcement \]" if(src.emagged == 0) dat += "
\[ Send an emergency message to Centcomm \]" @@ -519,6 +522,13 @@ message_admins("[key_name_admin(user)] has recalled the shuttle.", 1) return + +/proc/is_relay_online() + for(var/obj/machinery/bluespacerelay/M in world) + if(M.stat == 0) + return 1 + return 0 + /obj/machinery/computer/communications/proc/post_status(var/command, var/data1, var/data2) var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435) diff --git a/code/game/objects/items/weapons/circuitboards/machinery/commsantenna.dm b/code/game/objects/items/weapons/circuitboards/machinery/commsantenna.dm new file mode 100644 index 00000000000..81216003d52 --- /dev/null +++ b/code/game/objects/items/weapons/circuitboards/machinery/commsantenna.dm @@ -0,0 +1,16 @@ +#ifndef T_BOARD +#error T_BOARD macro is not defined but we need it! +#endif + +/obj/item/weapon/circuitboard/bluespacerelay + name = T_BOARD("bluespacerelay") + build_path = "/obj/machinery/bluespacerelay" + board_type = "machine" + origin_tech = "bluespace=4,programming=4" + frame_desc = "Requires 30 Cable Coil, 1 Hyperwave Filter and 1 Ansible Crystal, and 2 Micro-Manipulators" + req_components = list( + "/obj/item/stack/cable_coil" = 30, + "/obj/item/weapon/stock_parts/manipulator" = 2, + "/obj/item/weapon/stock_parts/subspace/filter" = 1, + "/obj/item/weapon/stock_parts/subspace/crystal" = 1, + ) \ No newline at end of file diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index fc2ee0a0b26..6fd38bb5814 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1317,21 +1317,27 @@ M.stuttering = 20 else if(href_list["CentcommReply"]) - var/mob/living/carbon/human/H = locate(href_list["CentcommReply"]) - if(!istype(H)) - usr << "This can only be used on instances of type /mob/living/carbon/human" - return - if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset)) - usr << "The person you are trying to contact is not wearing a headset" + var/mob/living/L = locate(href_list["CentcommReply"]) + if(!istype(L)) + usr << "This can only be used on instances of type /mob/living/" return - var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from Centcomm", "")) - if(!input) return + if(L.can_centcom_reply()) + var/input = input(src.owner, "Please enter a message to reply to [key_name(L)] via their headset.","Outgoing message from Centcomm", "") + if(!input) return + + src.owner << "You sent [input] to [L] via a secure channel." + log_admin("[src.owner] replied to [key_name(L)]'s Centcomm message with the message [input].") + message_admins("[src.owner] replied to [key_name(L)]'s Centcom message with: \"[input]\"") + if(!L.isAI()) + L << "You hear something crackle in your headset for a moment before a voice speaks." + L << "Please stand by for a message from Central Command." + L << "Message as follows." + L << "[input]" + L << "Message ends." + else + src.owner << "The person you are trying to contact does not have functional radio equipment." - src.owner << "You sent [input] to [H] via a secure channel." - log_admin("[src.owner] replied to [key_name(H)]'s Centcomm message with the message [input].") - message_admins("[src.owner] replied to [key_name(H)]'s Centcom message with: \"[input]\"") - H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. \"[input]\" Message ends.\"" else if(href_list["SyndicateReply"]) var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"]) @@ -2619,3 +2625,12 @@ if("list") PlayerNotesPage(text2num(href_list["index"])) return + +mob/living/proc/can_centcom_reply() + return 0 + +mob/living/carbon/human/can_centcom_reply() + return istype(l_ear, /obj/item/device/radio/headset) || istype(r_ear, /obj/item/device/radio/headset) + +mob/living/silicon/ai/can_centcom_reply() + return common_radio != null && !check_unable(2) \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 66804f5bfab..38d8247c36b 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -6,6 +6,7 @@ var/list/ai_verbs_default = list( /mob/living/silicon/ai/proc/ai_announcement, /mob/living/silicon/ai/proc/ai_call_shuttle, // /mob/living/silicon/ai/proc/ai_recall_shuttle, + /mob/living/silicon/ai/proc/ai_emergency_message, /mob/living/silicon/ai/proc/ai_camera_track, /mob/living/silicon/ai/proc/ai_camera_list, /mob/living/silicon/ai/proc/ai_goto_location, @@ -380,6 +381,30 @@ var/list/ai_verbs_default = list( if(confirm == "Yes") cancel_call_proc(src) +/mob/living/silicon/ai/var/emergency_message_cooldown = 0 +/mob/living/silicon/ai/proc/ai_emergency_message() + set category = "AI Commands" + set name = "Send Emergency Message" + + if(check_unable(AI_CHECK_WIRELESS)) + return + if(!is_relay_online()) + usr <<"No Emergency Bluespace Relay detected. Unable to transmit message." + return + if(emergency_message_cooldown) + usr << "Arrays recycling. Please stand by." + return + var/input = input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "") + if(!input) + return + Centcomm_announce(input, usr) + usr << "Message transmitted." + log_say("[key_name(usr)] has made an IA Centcomm announcement: [input]") + emergency_message_cooldown = 1 + spawn(300) + emergency_message_cooldown = 0 + + /mob/living/silicon/ai/check_eye(var/mob/user as mob) if (!camera) return null diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 86eb5cce555..9d0d547f94d 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -485,6 +485,12 @@ datum/design/circuit/tcom/receiver req_tech = list("programming" = 4, "engineering" = 3, "bluespace" = 2) build_path = /obj/item/weapon/circuitboard/telecomms/receiver +datum/design/circuit/tcom/bluespacerelay + name = "emergency bluespace relay" + id = "bluespace-relay" + req_tech = list("programming" = 4, "bluespace" = 4) + build_path = /obj/item/weapon/circuitboard/bluespacerelay + /////////////////////////////////// ////////////Mecha Modules////////// /////////////////////////////////// diff --git a/icons/obj/stationobjs.dmi b/icons/obj/stationobjs.dmi index c172c160b67..2813c5d7f8b 100755 Binary files a/icons/obj/stationobjs.dmi and b/icons/obj/stationobjs.dmi differ