mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-27 10:41:42 +00:00
Merge branch 'master' of git://github.com/Baystation12/Baystation12 into TGUpdates
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
var/state = STATE_DEFAULT
|
||||
var/aistate = STATE_DEFAULT
|
||||
var/message_cooldown = 0
|
||||
var/centcomm_message_cooldown = 0
|
||||
var/tmp_alertlevel = 0
|
||||
var/const
|
||||
STATE_DEFAULT = 1
|
||||
@@ -31,6 +32,7 @@
|
||||
var/stat_msg2
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/communications/process()
|
||||
..()
|
||||
if(state != STATE_STATUSDISPLAY)
|
||||
@@ -82,7 +84,7 @@
|
||||
switch(get_security_level())
|
||||
if(SEC_LEVEL_GREEN)
|
||||
feedback_inc("alert_comms_green",1)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
if(SEC_LEVEL_BLUE)
|
||||
feedback_inc("alert_comms_blue",1)
|
||||
tmp_alertlevel = 0
|
||||
else:
|
||||
@@ -168,6 +170,46 @@
|
||||
stat_msg2 = input("Line 2", "Enter Message Text", stat_msg2) as text|null
|
||||
src.updateDialog()
|
||||
|
||||
// OMG CENTCOMM LETTERHEAD
|
||||
if("MessageCentcomm")
|
||||
if(src.authenticated==2)
|
||||
if(centcomm_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.", "To abort, send an empty message.", "")
|
||||
if(!input || !(usr in view(1,src)))
|
||||
return
|
||||
Centcomm_announce(input, usr)
|
||||
usr << "Message transmitted."
|
||||
log_say("[key_name(usr)] has sent Centcomm a message: [input]")
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(600)//One minute cooldown
|
||||
message_cooldown = 0
|
||||
|
||||
|
||||
// OMG SYNDICATE ...LETTERHEAD
|
||||
if("MessageSyndicate")
|
||||
if((src.authenticated==2) && (src.emagged))
|
||||
if(centcomm_message_cooldown)
|
||||
usr << "Arrays recycling. Please stand by."
|
||||
return
|
||||
var/input = 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.", "To abort, send an empty message.", "")
|
||||
if(!input || !(usr in view(1,src)))
|
||||
return
|
||||
Syndicate_announce(input, usr)
|
||||
usr << "Message transmitted."
|
||||
log_say("[key_name(usr)] has sent the Syndicate a message: [input]")
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(600)//One minute cooldown
|
||||
message_cooldown = 0
|
||||
|
||||
if("RestoreBackup")
|
||||
usr << "Backup routing data restored!"
|
||||
src.emagged = 0
|
||||
src.updateDialog()
|
||||
|
||||
|
||||
|
||||
// AI interface
|
||||
if("ai-main")
|
||||
src.aicurrmsg = 0
|
||||
@@ -214,6 +256,11 @@
|
||||
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/communications/attackby(var/obj/I as obj, var/mob/user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag/))
|
||||
src.emagged = 1
|
||||
user << "You scramble the communication routing circuits!"
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/communications/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
@@ -247,6 +294,12 @@
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=logout'>Log Out</A> \]"
|
||||
if (src.authenticated==2)
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=announce'>Make An Announcement</A> \]"
|
||||
if(src.emagged == 0)
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=MessageCentcomm'>Send an emergency message to Centcomm</A> \]"
|
||||
else
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=MessageSyndicate'>Send an emergency message to \[UNKNOWN\]</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=RestoreBackup'>Restore Backup Routing Data</A> \]"
|
||||
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=changeseclevel'>Change alert level</A> \]"
|
||||
if(emergency_shuttle.location==0)
|
||||
if (emergency_shuttle.online)
|
||||
@@ -303,12 +356,15 @@
|
||||
if(STATE_CONFIRM_LEVEL)
|
||||
dat += "Current alert level: [get_security_level()]<BR>"
|
||||
dat += "Confirm the change to: [num2seclevel(tmp_alertlevel)]<BR>"
|
||||
dat += "<A HREF='?src=\ref[src];operation=swipeidseclevel'>Swipt ID</A> to confirm change.<BR>"
|
||||
dat += "<A HREF='?src=\ref[src];operation=swipeidseclevel'>Swipe ID</A> to confirm change.<BR>"
|
||||
|
||||
dat += "<BR>\[ [(src.state != STATE_DEFAULT) ? "<A HREF='?src=\ref[src];operation=main'>Main Menu</A> | " : ""]<A HREF='?src=\ref[user];mach_close=communications'>Close</A> \]"
|
||||
user << browse(dat, "window=communications;size=400x500")
|
||||
onclose(user, "communications")
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/communications/proc/interact_ai(var/mob/living/silicon/ai/user as mob)
|
||||
var/dat = ""
|
||||
switch(src.aistate)
|
||||
@@ -361,6 +417,10 @@
|
||||
if(usr.stat == 2)
|
||||
usr << "You can't call the shuttle because you are dead!"
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||
if(confirm != "Yes") return
|
||||
|
||||
call_shuttle_proc(src)
|
||||
|
||||
// hack to display shuttle timer
|
||||
@@ -388,11 +448,15 @@
|
||||
return
|
||||
|
||||
if(world.time < 6000) // Ten minute grace period to let the game get going without lolmetagaming. -- TLE
|
||||
user << "The emergency shuttle is refueling. Please wait another [(6000-world.time)/10] seconds before trying again."
|
||||
user << "The emergency shuttle is refueling. Please wait another [round((6000-world.time)/600)] minutes before trying again."
|
||||
return
|
||||
|
||||
if(emergency_shuttle.direction == -1)
|
||||
user << "Shuttle may not be called while returning to CentCom."
|
||||
user << "The emergency shuttle may not be called while returning to CentCom."
|
||||
return
|
||||
|
||||
if(emergency_shuttle.online)
|
||||
user << "The emergency shuttle is already on its way."
|
||||
return
|
||||
|
||||
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "sandbox")
|
||||
@@ -426,7 +490,7 @@
|
||||
|
||||
/obj/machinery/computer/communications/proc/post_status(var/command, var/data1, var/data2)
|
||||
|
||||
var/datum/radio_frequency/frequency = radio_controller.return_frequency(status_display_freq)
|
||||
var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435)
|
||||
|
||||
if(!frequency) return
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
|
||||
var/global/BSACooldown = 0
|
||||
|
||||
|
||||
////////////////////////////////
|
||||
/proc/message_admins(var/text, var/admin_ref = 0)
|
||||
var/rendered = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[text]</span></span>"
|
||||
@@ -904,6 +907,92 @@
|
||||
cl.jumptomob(M)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (href_list["BlueSpaceArtillery"])
|
||||
var/mob/M = locate(href_list["BlueSpaceArtillery"])
|
||||
if(!M)
|
||||
return
|
||||
|
||||
var/choice = alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Blue Space Artillery?", "Confirm Firing?" , "Yes" , "No")
|
||||
if (choice == "No")
|
||||
return
|
||||
|
||||
if(BSACooldown)
|
||||
src.owner << "Standby! Reload cycle in progress! Gunnary crews ready in five seconds!"
|
||||
return
|
||||
|
||||
BSACooldown = 1
|
||||
spawn(50)
|
||||
BSACooldown = 0
|
||||
|
||||
|
||||
M << "You've been hit by bluespace artillery!"
|
||||
log_admin("[key_name(M)] has been hit by Bluespace Artillery fired by [src.owner]")
|
||||
message_admins("[key_name(M)] has been hit by Bluespace Artillery fired by [src.owner]")
|
||||
var/obj/effect/stop/S
|
||||
S = new /obj/effect/stop
|
||||
S.victim = M
|
||||
S.loc = M.loc
|
||||
spawn(20)
|
||||
del(S)
|
||||
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && (istype(T,/turf/simulated/floor/)))
|
||||
if(prob(80))
|
||||
T:break_tile_to_plating()
|
||||
else
|
||||
T:break_tile()
|
||||
|
||||
if(M.health == 1)
|
||||
M.gib()
|
||||
else
|
||||
M.adjustBruteLoss( min( 99 , (M.health - 1) ) )
|
||||
M.Stun(20)
|
||||
M.Weaken(20)
|
||||
M.stuttering = 20
|
||||
|
||||
if (href_list["CentcommReply"])
|
||||
var/mob/M = locate(href_list["CentcommReply"])
|
||||
if(!M)
|
||||
return
|
||||
if(!istype(M, /mob/living/carbon/human))
|
||||
alert("Centcomm cannot transmit to non-humans.")
|
||||
return
|
||||
if((!istype(M:l_ear, /obj/item/device/radio/headset)) && (!istype(M:r_ear, /obj/item/device/radio/headset)))
|
||||
alert("The person you're trying to reply to doesn't have a headset! Centcomm cannot transmit directly to them.")
|
||||
return
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(M)] via their headset.","Outgoing message from Centcomm", "")
|
||||
if(!input)
|
||||
return
|
||||
|
||||
src.owner << "You sent [input] to [M] via a secure channel."
|
||||
log_admin("[src.owner] replied to [key_name(M)]'s Centcomm message with the message [input].")
|
||||
M << "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.\""
|
||||
|
||||
return
|
||||
|
||||
if (href_list["SyndicateReply"])
|
||||
var/mob/M = locate(href_list["SyndicateReply"])
|
||||
if(!M)
|
||||
return
|
||||
if(!istype(M, /mob/living/carbon/human))
|
||||
alert("The Syndicate cannot transmit to non-humans.")
|
||||
return
|
||||
if((!istype(M:l_ear, /obj/item/device/radio/headset)) && (!istype(M:r_ear, /obj/item/device/radio/headset)))
|
||||
alert("The person you're trying to reply to doesn't have a headset! Centcomm cannot transmit directly to them.")
|
||||
return
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(M)] via their headset.","Outgoing message from The Syndicate", "")
|
||||
if(!input)
|
||||
return
|
||||
|
||||
src.owner << "You sent [input] to [M] via a secure channel."
|
||||
log_admin("[src.owner] replied to [key_name(M)]'s Syndicate message with the message [input].")
|
||||
M << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. [input]. Message ends.\""
|
||||
|
||||
return
|
||||
|
||||
if (href_list["jumpto"])
|
||||
if(rank in list("Badmin", "Game Admin", "Game Master"))
|
||||
var/mob/M = locate(href_list["jumpto"])
|
||||
|
||||
@@ -18,3 +18,25 @@
|
||||
|
||||
usr << "Your prayers have been received by the gods."
|
||||
//log_admin("HELP: [key_name(src)]: [msg]")
|
||||
|
||||
|
||||
/proc/Centcomm_announce(var/text , var/mob/Sender)
|
||||
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
|
||||
// log_admin("[key_name(Sender)] sent a message to Centcomm! The message was [msg]") // Handled somewhere else
|
||||
|
||||
for (var/mob/M in world)
|
||||
if (M.client && M.client.holder)
|
||||
M << "\blue <b><font color=orange>CENTCOMM:</font>[key_name(Sender, M)] (<A HREF='?src=\ref[M.client.holder];adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?src=\ref[M.client.holder];adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?src=\ref[M.client.holder];adminplayersubtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?src=\ref[M.client.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[M.client.holder];BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?src=\ref[M.client.holder];CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
//
|
||||
/proc/Syndicate_announce(var/text , var/mob/Sender)
|
||||
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
|
||||
// log_admin("[key_name(Sender)] sent a message to the Syndicate! The message was [msg]") // Handled somewhere else
|
||||
|
||||
for (var/mob/M in world)
|
||||
if (M.client && M.client.holder)
|
||||
M << "\blue <b><font color=crimson>SYNDICATE:</font>[key_name(Sender, M)] (<A HREF='?src=\ref[M.client.holder];adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?src=\ref[M.client.holder];adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?src=\ref[M.client.holder];adminplayersubtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?src=\ref[M.client.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[M.client.holder];BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?src=\ref[M.client.holder];SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user