Adds "linked_to_centcomm" variable to maps.

- Obviously, by default, this will be one.
- Adds new event where the link with central command is broken for
- Admins can make or break the link with Central command Indefinitely with the secrets panel
- You cannot do the following while the link is broken: Call the shuttle / Recall the shuttle / Fax Central command / Recieve messages from Central command / Send messages to Central Command / Call or Send the Cargo Shuttle
- An admin may send a message to the crew even when the link is broken, but he will be prompted first asking if he is sure.
- Blob alerts ignore whether or not the link with central command is broken
This commit is contained in:
DrCelt
2016-02-18 05:38:56 +00:00
parent 1fd0d6d5be
commit e54bb3f99b
16 changed files with 81 additions and 16 deletions

View File

@@ -117,9 +117,10 @@ var/list/alldepartments = list("Central Command")
/obj/machinery/faxmachine/Topic(href, href_list)
if(href_list["send"])
if(tofax)
log_game("([usr]/([usr.ckey]) sent a fax titled [tofax] to [dpt] - contents: [tofax.info]")
if((dpt == "Central Command") | (dpt == "Nanotrasen HR"))
if(!map.linked_to_centcomm)
to_chat(usr, "<span class='danger'>\The [src] displays a 404 error: Central Command not found</span>")
return
if(dpt == "Central Command")
Centcomm_fax(tofax, tofax.name, usr)
if(dpt == "Nanotrasen HR")
@@ -131,7 +132,7 @@ var/list/alldepartments = list("Central Command")
else
SendFax(tofax.info, tofax.name, usr, dpt)
log_game("([usr]/([usr.ckey]) sent a fax titled [tofax] to [dpt] - contents: [tofax.info]")
to_chat(usr, "Message transmitted successfully.")
faxtime = world.timeofday + cooldown_time

View File

@@ -10,7 +10,7 @@ var/global/list/outbreak_level_words=list(
/proc/biohazard_alert(var/level=0)
if(!level)
level = rand(4,7)
command_alert("Confirmed outbreak of level [level] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
command_alert("Confirmed outbreak of level [level] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert",1)
var/list/vox_sentence=list(
'sound/AI/outbreak_before.ogg',
outbreak_level_words[level],

View File

@@ -1,4 +1,4 @@
/proc/command_alert(var/text, var/title = "")
/proc/command_alert(var/text, var/title = "",var/force_report = 0)
var/command
command += "<h1 class='alert'>[command_name()] Update</h1>"
if (title && length(title) > 0)
@@ -7,6 +7,7 @@
command += {"<br><span class='alert'>[html_encode(text)]</span><br>
<br>"}
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player) && M.client)
to_chat(M, command)
if(map.linked_to_centcomm || force_report)
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player) && M.client)
to_chat(M, command)

View File

@@ -166,7 +166,7 @@ You must kill it all while minimizing the damage to the station."})
return
if (1)
command_alert("Biohazard outbreak alert status upgraded to level 9. [station_name()] is now locked down, under Directive 7-10, until further notice.", "Directive 7-10 Initiated")
command_alert("Biohazard outbreak alert status upgraded to level 9. [station_name()] is now locked down, under Directive 7-10, until further notice.", "Directive 7-10 Initiated",1)
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player) && M.client)
M << sound('sound/AI/blob_confirmed.ogg')
@@ -179,7 +179,7 @@ You must kill it all while minimizing the damage to the station."})
research_shuttle.lockdown = "Under directive 7-10, [station_name()] is quarantined until further notice." //LOCKDOWN THESE SHUTTLES
mining_shuttle.lockdown = "Under directive 7-10, [station_name()] is quarantined until further notice."
if (2)
command_alert("Biohazard outbreak containment status reaching critical mass, total quarantine failure is now possibile. As such, Directive 7-12 has now been authorized for [station_name()].", "Final Measure")
command_alert("Biohazard outbreak containment status reaching critical mass, total quarantine failure is now possibile. As such, Directive 7-12 has now been authorized for [station_name()].", "Final Measure",1)
for(var/mob/camera/blob/B in player_list)
to_chat(B, "<span class='blob'>The beings intend to eliminate you with a final suicidal attack, you must stop them quickly or consume the station before this occurs!</span>")
if(!mixed) send_intercept(2)

View File

@@ -13,7 +13,7 @@
spawn(3000)
blobevent = 0
spawn(rand(1000, 2000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert",1)
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player) && M.client)
M << sound('sound/AI/outbreak5.ogg')

View File

@@ -161,6 +161,9 @@ var/shuttle_call/shuttle_calls[0]
setMenuState(usr,COMM_SCREEN_ERT)
return
if("request_emergency_team")
if(!map.linked_to_centcomm)
to_chat(usr, "<span class='danger'>Error: No connection can be made to central command.</span>")
return
if(menu_state != COMM_SCREEN_ERT) return //Not on the right screen.
if ((!(ticker) || emergency_shuttle.location))
to_chat(usr, "<span class='warning'>Warning: The evac shuttle has already arrived.</span>")
@@ -199,6 +202,9 @@ var/shuttle_call/shuttle_calls[0]
if("callshuttle")
if(src.authenticated)
if(!map.linked_to_centcomm)
to_chat(usr, "<span class='danger'>Error: No connection can be made to central command.</span>")
return
var/response = alert("Are you sure you wish to call the shuttle?", "Confirm", "Yes", "No")
if(response == "Yes")
var/justification = stripped_input(usr, "Please input a concise justification for the shuttle call. Note that failure to properly justify a shuttle call may lead to recall or termination", "Nanotrasen Anti-Comdom Systems")
@@ -209,6 +215,9 @@ var/shuttle_call/shuttle_calls[0]
post_status("shuttle")
setMenuState(usr,COMM_SCREEN_MAIN)
if("cancelshuttle")
if(!map.linked_to_centcomm)
to_chat(usr, "<span class='danger'>Error: No connection can be made to central command.</span>")
return
if(issilicon(usr)) return
if(src.authenticated)
var/response = alert("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No")
@@ -263,6 +272,9 @@ var/shuttle_call/shuttle_calls[0]
// OMG CENTCOMM LETTERHEAD
if("MessageCentcomm")
if(src.authenticated==2)
if(!map.linked_to_centcomm)
to_chat(usr, "<span class='danger'>Error: No connection can be made to central command.</span>")
return
if(centcomm_message_cooldown)
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by for a few seconds.</span>")
return
@@ -282,6 +294,9 @@ var/shuttle_call/shuttle_calls[0]
// OMG SYNDICATE ...LETTERHEAD
if("MessageSyndicate")
if((src.authenticated==2) && (src.emagged))
if(!map.linked_to_centcomm)
to_chat(usr, "<span class='danger'>Error: No connection can be made to \[ABNORMAL ROUTING CORDINATES\] .</span>")
return
if(centcomm_message_cooldown)
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by for a few seconds.</span>")
return
@@ -452,7 +467,9 @@ var/shuttle_call/shuttle_calls[0]
if(!universe.OnShuttleCall(user))
return
if(!map.linked_to_centcomm)
to_chat(usr, "<span class='danger'>Error: No connection can be made to central command .</span>")
return
if(sent_strike_team == 1)
to_chat(user, "Centcom will not allow the shuttle to be called. Consider all contracts terminated.")
return

View File

@@ -607,7 +607,9 @@ var/list/mechtoys = list(
return 1
//Calling the shuttle
if(href_list["send"])
if(!supply_shuttle.can_move())
if(!map.linked_to_centcomm)
temp = "You aren't able to establish contact with central command, so the shuttle won't move. <BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
else if(!supply_shuttle.can_move())
temp = "For safety reasons the automated supply shuttle cannot transport live organisms, classified nuclear weaponry or homing beacons.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
else if(supply_shuttle.at_station)
supply_shuttle.moving = -1

View File

@@ -754,6 +754,8 @@ var/global/floorIsLava = 0
<A href='?src=\ref[src];secretsfun=power'>Make all areas powered</A><BR>
<A href='?src=\ref[src];secretsfun=unpower'>Make all areas unpowered</A><BR>
<A href='?src=\ref[src];secretsfun=quickpower'>Power all SMES</A><BR>
<A href='?src=\ref[src];secretsfun=breaklink'>Break the station's link with Central Command</A><BR>
<A href='?src=\ref[src];secretsfun=makelink'>Make the station linked with Central Command</A><BR>
<A href='?src=\ref[src];secretsfun=toggleprisonstatus'>Toggle Prison Shuttle Status(Use with S/R)</A><BR>
<A href='?src=\ref[src];secretsfun=activateprison'>Send Prison Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=deactivateprison'>Return Prison Shuttle</A><BR>

View File

@@ -2338,6 +2338,14 @@
log_admin("[key_name(usr)] made all SMESs powered", 1)
message_admins("<span class='notice'>[key_name_admin(usr)] made all SMESs powered</span>", 1)
power_restore_quick()
if("breaklink")
log_admin("[key_name(usr)] broke the link with central command", 1)
message_admins("<span class='notice'>[key_name_admin(usr)] broke the link with central command</span>", 1)
unlink_from_centcomm()
if("makelink")
log_admin("[key_name(usr)] created a link with central command", 1)
message_admins("<span class='notice'>[key_name_admin(usr)] created a link with central command</span>", 1)
link_to_centcomm()
if("activateprison")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","AP")

View File

@@ -597,6 +597,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!holder)
to_chat(src, "Only administrators may use this command.")
return
if(!map.linked_to_centcomm)
var/confirmation = alert("The station is not linked to central command by a relay. Ruin immersion?",,"Yes","No")
if(confirmation == "No")
return
var/input = input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null
var/customname = input(usr, "Pick a title for the report.", "Title") as text|null
if(!input)
@@ -614,7 +618,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
switch(alert("Should this be announced to the general population?",,"Yes","No"))
if("Yes")
command_alert(input, customname);
command_alert(input, customname,1);
if("No")
to_chat(world, "<span class='warning'>New Nanotrasen Update available at all communication consoles.</span>")

View File

@@ -45,6 +45,7 @@ var/list/event_last_fired = list()
possibleEvents[/datum/event/infestation] = 50
possibleEvents[/datum/event/communications_blackout] = 25
possibleEvents[/datum/event/thing_storm/meaty_gore] = 25
possibleEvents[/datum/event/unlink_from_centcomm] = 10
if(active_with_role["AI"] > 0 || active_with_role["Cyborg"] > 0)
possibleEvents[/datum/event/ionstorm] = 30

View File

@@ -0,0 +1,21 @@
/datum/event/unlink_from_centcomm
endWhen = 300
/datum/event/unlink_from_centcomm/start()
unlink_from_centcomm()
/datum/event/unlink_from_centcomm/end()
link_to_centcomm()
proc/link_to_centcomm()
if(!map.linked_to_centcomm)
map.linked_to_centcomm = 1
command_alert("A link to Central Command has been established on [station_name()].","Link Established")
proc/unlink_from_centcomm()
if(map.linked_to_centcomm)
map.linked_to_centcomm = 0
command_alert("This is an automated announcement. The link with central command has been lost. Repeat: The link with central command has been lost. Attempting to re-establish communications in T-10.","Automated announcement",1)
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player) && M.client)
M << sound('sound/AI/loss.ogg')

View File

@@ -1,2 +1,8 @@
author: DrCelt
changes: []
changes:
- experiment: Adds "linked_to_centcomm" variable to maps.
- rscadd: Adds new event where the link with central command is broken for
- rscadd: Admins can make or break the link with Central command Indefinitely with the secrets panel
- rscadd: You cannot do the following while the link is broken Call the shuttle, Recall the shuttle, Fax Central command, Recieve messages from Central command, Send messages to Central Command, Call or Send the Cargo Shuttle
- rscadd: An admin may send a message to the crew even when the link is broken, but he will be prompted first asking if he is sure.
- rscadd: Blob alerts ignore whether or not the link with central command is broken

View File

@@ -42,6 +42,7 @@
//Fuck the preprocessor
var/dorf = 0
var/linked_to_centcomm = 1
// List of package tagger locations. Due to legacy shitcode you can only append or replace ones with null, or you'll break stuff.
var/list/default_tagger_locations = list(

BIN
sound/AI/loss.ogg Normal file

Binary file not shown.

View File

@@ -1063,6 +1063,7 @@
#include "code\modules\events\immovablerod.dm"
#include "code\modules\events\infestation.dm"
#include "code\modules\events\ion_storm.dm"
#include "code\modules\events\link_with_centcomm.dm"
#include "code\modules\events\masshallucination.dm"
#include "code\modules\events\meteors.dm"
#include "code\modules\events\money_hacker.dm"