Files
CHOMPStation2/code/game/machinery/computer3/computers/communications.dm
Cameron653 28175d86c7 Late September Sync (#579)
* Elevators aren't bottomless voids!

* Updates changelog

* Sombrero Code

* Fixes #2365

* Adds changelog

* Sleeper is evil.

* no message

* Changelog

* Stops observers from leaving prints on the ground.

No more spooking the mortals, ghosts.

* Allows autotraitor in secret to start with 0 players

* Adds changelog

* Makes diona slightly less slow

* Adds changelog

* Bowling Shirts

* Updates changelog

* Adds a missing description

* Flat Cap Changes and Hair Bow

* Fixed Error

* Adds an in-hand

* Lower Torso cannot be amputated

* Smoke works, adds changelog

* Updates changelog

* Makes Unathi Voidsuits Less Fat

* Medical related fixes

* Fuzzy Cuffs

* Tube Top

* Made Icons for Security Suit Less Gaunt

* Revert "Medical related fixes"

This reverts commit d7c59520e6.

* Just the fix to random med item now

* Adds organ fixing

* Fixes Evening Glove Coloring

* HAZMAT Suits

* Changes Unathi sprite slightly

* Tweaks skirt pathing

* Corrects changelog

* Adds changelog

* Construction Voidsuits

* makes people bleed real good

* adderino changeling

* Biohazard Voidsuit

* Revert "Revert "Adds hub passwordu""

* Explosive implants should no longer gib on limbs.

* Adds space penguins and space geese.

* Revert "Revert "Revert "Adds hub passwordu"""

* Makes flash rounds respect eye protection

* Water > Fire

* There's plenty lying around, I think

* Naming inconsistencies fixed

The short naming of central command has been really inconsistent across
the game's files. This has always annoyed the shit out of me.

CentComm and Centcomm and Centcom are now all CentCom, specifically with
that capitalization. Why one M instead of two M's? Because Comm with two
'M's = Communications. Hence, Telecomms, NOT Telecoms. Telecoms is
incorrect. CentCom was also chosen because CentCom with one M and this
casing is most found throughout the game's files.

Speaking of Telecomms, I corrected one instance in the game where it's
Telecom. Like I said, this is not correct. There was only one
inconsistency.

Likewise, Nanotrasen has been changed to NanoTrasen. Nanotrasen only
appears 20 times, where NanoTrasen appears 62. NanoTrasen is clearly the
preferred, correct naming.

* Almost forgot plural of Telecomm

* Finalizes work, adds designs to research.

* Press Vest

* Removes Mags/Shells, Adds Recorder and Flashlight

* Fixes spans.

* Raises the number of players needed to start Ninja

* Still needs to fix internal bleeding

* Allows Wirer To Attach to Toolbelts

* Fixes #393

* Tweaks FBP temperature

* Corrects Changelog

* Fixes some Advanced Egun oversights

* Embiggens the laser carbine and the lasercannon.

* Messenger Bags

* Health analyzers detect appendicitis

* Custom Circuit Additions & Fixes
Adds Med Scanner and Advanced Med Scanner circuits.
Clock circuit is now functional.
Five second delay will delay for five seconds and not one second.
Renaming circuitry now respects ability to do so (e.g. being alive).
Firing circuit can now be obtained by science normally.
Examining inside assembly cases now requires adjacency.

* More Additions
You can now cancel inputting on a text or numberpad.
Zero is now displayed properly on the UI and not be shown as null.
The small and medium assemblies now have real sprites.
Total health percentage for med scanners and advanced med scanners now reports a proper percentage and not 1 or 0.
The constant memory chip now can be set by using it in hand, making it usable.
The constant memory chip now accepts refs as data to store.  To use, select 'ref' when using inhand, then hit it against the thing you want to store.

* Allows Chemists to View Medical Records on their PDA

* Refactors splinting

* Refactors the forceMove() drop.

Makes dropping a its proc instead, cleaning up forceMove() handling.

* Replaces ORGAN_SPLINTED

* Supportive suits now only loop through bad organs

* Adds changelog

* Lasercannon tweaks

* Bloodloss tweak

* Adds hawaii shirt

Attachable to any uniform, works like suit jackets.

* Changelog cause why not

At this rate I'll forget how to do those otherwise

* Adds randomized alohas

Also some color matrix helpers from TG

* Appendicitis doesn't cancel itself out.

* Removes debug stuff

* Radsuit Sprite Changes

* Allows us to actually use the messenger bags

* Fixes spelling mistake

* Ported ventcrawling from vg.

* Fixes changelog errors

* Updates changelog

* Tweaks vent crawling.

The ability to ventcrawl is now checked by the /handle_ventcrawl() proc, making it possible to properly check before and after the do_after() call.
Moves various checks into the base can_ventcrawl proc.
Now lists the first object that prevents a mob from ventcrawling, making it easier to correct the exception list.
Removes the issmall() check, instead checks if the crawling mob has the relevant verb. Fixes #14081.

* Suit Storage Items

* Adds in IB removal

* More Circuit Things
Adds Locomotion circuit, which makes the machine move in a given direction.
Adds Signaler circuit, which can send and receive signals from a signaler.
Adds a new tool, the Debugger, which lets one directly set data in a specific pin.  It can also pulse activation pins.
Adds ability to define custom cooldown times for each component.
Smoke generator now has a 30 second cooldown.
Cleans up some code somewhat.

* Adds design for locomotion circuit.

* Cleans up code

* Even more sprites by Mechoid.
Fixes abs to rel converter.

* Black Messenger Bag

* Powersink fix

* Even More Sodding Circuits
Adds new RNG circuit, to make random numbers each time.
Adds new Concatenating circuit, so you can make lots of small strings into one big one.
Adds new light and advanced light circuit.  Basic just has a normal light that can be toggled.  Advanced allows it to be any color using RGB, and a brightness between 0 and 6.
New sprites for the debugger and wirer, by Mechoid.
Hopefully finally fixes smoke generator from being unobtainable.

* Adds basic circuit kit and spare circuit tools to Tech Storage.

* Part the first

* Changelog

* Allows robots to be constructed with prosthetic limbs as well as borg limbs.

* Map change

* Secbelt can hold stun revolvers and eguns

* Voidsuit Sprite Changes

* Tweaks burst laser

* Lasers, energy projectiles, and muzzle flashes now produce light.

It's a bit wonky due to lighting only updating once every half-second,
but it's very much functional, at least on my desktop.

* Adds bridge bunnies

* Slightly cleans up the occupation screen, adds uniform to locker

* Map Changes

* Adds Changelog

* Fixes stuff

* Allows jobbanning of cargo department jobs

* Re-adds balance changes to heavy lasers.

They got changed by accident when I did the laser light show.
Also, adds changelogs for my last couple changes, because I'm an
    idiot and forgot them.

* Fixed missing sprite

* Dress Loadout Additions

* I Can't Believe It's Not Circuits (it is)
Fixes numberpad and letterpad pulsing.
Debugger and Constant chip can now have null written to it.
Adds new sound output, with two types so far.  One being the 'beeper' type, which can do things like buzz, ping, beep, etc.  The second type is a securitron speaker, which allows us to get closer to building a functioning Beepsky.

* Adds EPv2 Circuit
Adds a circuit that allows it to send and receive EPv2 messages, allowing for a more robust transmission of data that signalers cannot deliver.  Bonus: Communicators can send text messages to custom machines using this.

* Updates changelog

* Fixes not being able to put things in medkits.

* Technomancer Tweaks

Cost for various spells and equipment adjusted greatly.  In general, things are cheaper, and everything should now be in multiples of 25, so no points are wasted.
The default jumpsuit for Technomancers is now heavily insulated, protecting them from tasers, batons, and perhaps unfortunate lightning strikes.
Instability between 31 and 50 made less harsh.
Wards made with a scepter of enhancement will break the cloak of anyone invisible that it can see.
Fire aura buffed, increased rate of heating as well as temperature cap for both non-scepter and scepter effects.
Reflect spell made more forgiving for the Technomancer, lasting longer before expiring.
Projectile spells should be able to hit people more reliably.

* Shotgun Reloading Tweak
Adds ability to hit a shotgun or similar weapon with a container containing ammo, to load said ammo into the shotgun one at a time automatically, instead of having to play inventory tetris, as requested by some people.

* Use sanitizeName for the guest pass terminal name input to prevent excessively long names.

* Circuit UI and Assembly Tweaks
Adds new drone assembly, which has stats between the medium and large assembly.  Sprites by Mechoid.
Assemblies now have a light UI when examined while opened, which displays what's inside, as well as how close to the cap for parts or complexity you are getting.  Click the names of a component to open the wiring interface for that component.  You can also rename each component from the UI.  Bonus:  Having multiple components of the same name will no longer appear as one component.
Adds ability to rename the assembly, using the new UI.

* Revert "Ported ventcrawling from vg."

* Re-adds a nice, useful macro

* Fixes #2431

* Tweaks Riot armor

* Fixes a typo in the DNA Modifier

* Ripped Jeans (And White Shorts)

* Adds shanking

* Adds changelog

* Removes a stray world <<

* Ported ventcrawling from vg.

* Tweaks vent crawling.

The ability to ventcrawl is now checked by the /handle_ventcrawl() proc, making it possible to properly check before and after the do_after() call.
Moves various checks into the base can_ventcrawl proc.
Now lists the first object that prevents a mob from ventcrawling, making it easier to correct the exception list.
Removes the issmall() check, instead checks if the crawling mob has the relevant verb. Fixes #14081.

* Long, time-consuming not one-line fix

* Makes cigs branded too

Description of cig/cigbutt would reveal its brand for dastardly murdersolving revelations.

* Adding a article

* The door hacker now only pings the user

* Removes implants from Deathsquad

* Adds the ability to apply pressure to bleeding wounds

* Shoes

* EVA rigs should use their default sprites on Taj and Unathi

* Fixing some errors

* Update loadout_xeno.dm

* Delete back_vr.dmi

* Add files via upload
2016-09-24 14:12:43 -04:00

394 lines
14 KiB
Plaintext

/obj/machinery/computer3/communications
default_prog = /datum/file/program/communications
spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/networking/radio/subspace)
/obj/machinery/computer3/communications/captain
default_prog = /datum/file/program/communications
spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/networking/radio/subspace,/obj/item/part/computer/cardslot/dual)
spawn_files = list(/datum/file/program/card_comp, /datum/file/program/security, /datum/file/program/crew, /datum/file/program/arcade,
/datum/file/camnet_key, /datum/file/camnet_key/entertainment, /datum/file/camnet_key/singulo)
/datum/file/program/communications
var/const/STATE_DEFAULT = 1
var/const/STATE_CALLSHUTTLE = 2
var/const/STATE_CANCELSHUTTLE = 3
var/const/STATE_MESSAGELIST = 4
var/const/STATE_VIEWMESSAGE = 5
var/const/STATE_DELMESSAGE = 6
var/const/STATE_STATUSDISPLAY = 7
var/const/STATE_ALERT_LEVEL = 8
var/const/STATE_CONFIRM_LEVEL = 9
/datum/file/program/communications
name = "CentCom communications relay"
desc = "Used to connect to CentCom."
active_state = "comm"
req_access = list(access_heads)
var/prints_intercept = 1
var/authenticated = 0
var/list/messagetitle = list()
var/list/messagetext = list()
var/currmsg = 0
var/aicurrmsg = 0
var/state = STATE_DEFAULT
var/aistate = STATE_DEFAULT
var/message_cooldown = 0
var/centcomm_message_cooldown = 0
var/tmp_alertlevel = 0
var/status_display_freq = "1435"
var/stat_msg1
var/stat_msg2
var/datum/announcement/priority/crew_announcement = new
New()
..()
crew_announcement.newscast = 1
Reset()
..()
authenticated = 0
state = STATE_DEFAULT
aistate = STATE_DEFAULT
Topic(var/href, var/list/href_list)
if(!interactable() || !computer.radio || ..(href,href_list) )
return
if (computer.z > 1)
usr << "<span class='danger'>Unable to establish a connection:</span> You're too far away from the station!"
return
if("main" in href_list)
state = STATE_DEFAULT
if("login" in href_list)
var/mob/M = usr
var/obj/item/I = M.get_active_hand()
if(I)
I = I.GetID()
if(istype(I,/obj/item/weapon/card/id) && check_access(I))
authenticated = 1
if(access_captain in I.GetAccess())
authenticated = 2
crew_announcement.announcer = GetNameAndAssignmentFromId(I)
if(istype(I,/obj/item/weapon/card/emag))
authenticated = 2
computer.emagged = 1
if("logout" in href_list)
authenticated = 0
crew_announcement.announcer = ""
if("swipeidseclevel" in href_list)
var/mob/M = usr
var/obj/item/I = M.get_active_hand()
I = I.GetID()
if (istype(I,/obj/item/weapon/card/id))
if(access_captain in I.GetAccess())
var/old_level = security_level
if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN
if(tmp_alertlevel < SEC_LEVEL_GREEN) tmp_alertlevel = SEC_LEVEL_GREEN
if(tmp_alertlevel > SEC_LEVEL_BLUE) tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this
set_security_level(tmp_alertlevel)
if(security_level != old_level)
//Only notify the admins if an actual change happened
log_game("[key_name(usr)] has changed the security level to [get_security_level()].")
message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].")
switch(security_level)
if(SEC_LEVEL_GREEN)
feedback_inc("alert_comms_green",1)
if(SEC_LEVEL_BLUE)
feedback_inc("alert_comms_blue",1)
tmp_alertlevel = 0
else:
usr << "You are not authorized to do this."
tmp_alertlevel = 0
state = STATE_DEFAULT
else
usr << "You need to swipe your ID."
if("announce" in href_list)
if(authenticated==2)
if(message_cooldown)
usr << "Please allow at least one minute to pass between announcements"
return
var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement")
if(!input || !interactable())
return
crew_announcement.Announce(input)
message_cooldown = 1
spawn(600)//One minute cooldown
message_cooldown = 0
if("callshuttle" in href_list)
state = STATE_DEFAULT
if(authenticated)
state = STATE_CALLSHUTTLE
if("callshuttle2" in href_list)
if(!computer.radio.subspace)
return
if(authenticated)
call_shuttle_proc(usr)
if(emergency_shuttle.online())
post_status("shuttle")
state = STATE_DEFAULT
if("cancelshuttle" in href_list)
state = STATE_DEFAULT
if(authenticated)
state = STATE_CANCELSHUTTLE
if("messagelist" in href_list)
currmsg = 0
state = STATE_MESSAGELIST
if("viewmessage" in href_list)
state = STATE_VIEWMESSAGE
if (!currmsg)
if(href_list["message-num"])
currmsg = text2num(href_list["message-num"])
else
state = STATE_MESSAGELIST
if("delmessage" in href_list)
state = (currmsg) ? STATE_DELMESSAGE : STATE_MESSAGELIST
if("delmessage2" in href_list)
if(authenticated)
if(currmsg)
var/title = messagetitle[currmsg]
var/text = messagetext[currmsg]
messagetitle.Remove(title)
messagetext.Remove(text)
if(currmsg == aicurrmsg)
aicurrmsg = 0
currmsg = 0
state = STATE_MESSAGELIST
else
state = STATE_VIEWMESSAGE
if("status" in href_list)
state = STATE_STATUSDISPLAY
// Status display stuff
if("setstat" in href_list)
switch(href_list["statdisp"])
if("message")
post_status("message", stat_msg1, stat_msg2)
if("alert")
post_status("alert", href_list["alert"])
else
post_status(href_list["statdisp"])
if("setmsg1" in href_list)
stat_msg1 = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 40), 40)
computer.updateDialog()
if("setmsg2" in href_list)
stat_msg2 = reject_bad_text(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 40), 40)
computer.updateDialog()
// OMG CENTCOMM LETTERHEAD
if("MessageCentCom" in href_list)
if(!computer.radio.subspace)
return
if(authenticated==2)
if(centcomm_message_cooldown)
usr << "Arrays recycling. Please stand by."
return
var/input = sanitize(input("Please choose a message to transmit to [boss_short] 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 || !interactable())
return
CentCom_announce(input, usr)
usr << "Message transmitted."
log_say("[key_name(usr)] has made a [boss_short] announcement: [input]")
centcomm_message_cooldown = 1
spawn(600)//10 minute cooldown
centcomm_message_cooldown = 0
// OMG SYNDICATE ...LETTERHEAD
if("MessageSyndicate" in href_list)
if((authenticated==2) && (computer.emagged))
if(centcomm_message_cooldown)
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.", "To abort, send an empty message.", ""))
if(!input || !interactable())
return
Syndicate_announce(input, usr)
usr << "Message transmitted."
log_say("[key_name(usr)] has made an illegal announcement: [input]")
centcomm_message_cooldown = 1
spawn(600)//10 minute cooldown
centcomm_message_cooldown = 0
if("RestoreBackup" in href_list)
usr << "Backup routing data restored!"
computer.emagged = 0
computer.updateDialog()
// AI interface
if("ai-main" in href_list)
aicurrmsg = 0
aistate = STATE_DEFAULT
if("ai-callshuttle" in href_list)
aistate = STATE_CALLSHUTTLE
if("ai-callshuttle2" in href_list)
if(!computer.radio.subspace)
return
call_shuttle_proc(usr)
aistate = STATE_DEFAULT
if("ai-messagelist" in href_list)
aicurrmsg = 0
aistate = STATE_MESSAGELIST
if("ai-viewmessage" in href_list)
aistate = STATE_VIEWMESSAGE
if (!aicurrmsg)
if(href_list["message-num"])
aicurrmsg = text2num(href_list["message-num"])
else
aistate = STATE_MESSAGELIST
if("ai-delmessage" in href_list)
aistate = (aicurrmsg) ? STATE_DELMESSAGE : STATE_MESSAGELIST
if("ai-delmessage2" in href_list)
if(aicurrmsg)
var/title = messagetitle[aicurrmsg]
var/text = messagetext[aicurrmsg]
messagetitle.Remove(title)
messagetext.Remove(text)
if(currmsg == aicurrmsg)
currmsg = 0
aicurrmsg = 0
aistate = STATE_MESSAGELIST
if("ai-status" in href_list)
aistate = STATE_STATUSDISPLAY
if("securitylevel" in href_list)
tmp_alertlevel = text2num( href_list["newalertlevel"] )
if(!tmp_alertlevel) tmp_alertlevel = 0
state = STATE_CONFIRM_LEVEL
if("changeseclevel" in href_list)
state = STATE_ALERT_LEVEL
computer.updateUsrDialog()
proc/main_menu()
var/dat = ""
if (computer.radio.subspace)
if(emergency_shuttle.online() && emergency_shuttle.location())
var/timeleft = emergency_shuttle.estimate_arrival_time()
dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]<BR>"
refresh = 1
else
refresh = 0
if (authenticated)
dat += "<BR>\[ <A HREF='?src=\ref[src];logout'>Log Out</A> \]"
if (authenticated==2)
dat += "<BR>\[ <A HREF='?src=\ref[src];announce'>Make An Announcement</A> \]"
if(computer.emagged == 0)
dat += "<BR>\[ <A HREF='?src=\ref[src];MessageCentCom'>Send an emergency message to [boss_short]</A> \]"
else
dat += "<BR>\[ <A HREF='?src=\ref[src];MessageSyndicate'>Send an emergency message to \[UNKNOWN\]</A> \]"
dat += "<BR>\[ <A HREF='?src=\ref[src];RestoreBackup'>Restore Backup Routing Data</A> \]"
dat += "<BR>\[ <A HREF='?src=\ref[src];changeseclevel'>Change alert level</A> \]"
if(emergency_shuttle.location())
if (emergency_shuttle.online())
dat += "<BR>\[ <A HREF='?src=\ref[src];cancelshuttle'>Cancel Shuttle Call</A> \]"
else
dat += "<BR>\[ <A HREF='?src=\ref[src];callshuttle'>Call Emergency Shuttle</A> \]"
dat += "<BR>\[ <A HREF='?src=\ref[src];status'>Set Status Display</A> \]"
else
dat += "<BR>\[ <A HREF='?src=\ref[src];login'>Log In</A> \]"
dat += "<BR>\[ <A HREF='?src=\ref[src];messagelist'>Message List</A> \]"
return dat
proc/confirm_menu(var/prompt,var/yes_option)
return "Are you sure you want to [prompt]? \[ [topic_link(src,yes_option,"OK")] | [topic_link(src,"main","Cancel")] \]"
interact()
if(!interactable())
return
if(!computer.radio)
computer.Crash(MISSING_PERIPHERAL)
return
var/dat = ""
switch(state)
if(STATE_DEFAULT)
dat = main_menu()
if(STATE_CALLSHUTTLE)
dat = confirm_menu("call the shuttle","callshuttle2")
if(STATE_CANCELSHUTTLE)
dat = confirm_menu("cancel the shuttle","cancelshuttle2")
if(STATE_MESSAGELIST)
dat += "Messages:"
for(var/i = 1; i<=messagetitle.len; i++)
dat += "<BR><A HREF='?src=\ref[src];viewmessage;message-num=[i]'>[messagetitle[i]]</A>"
if(STATE_VIEWMESSAGE)
if (currmsg)
dat += "<B>[messagetitle[currmsg]]</B><BR><BR>[messagetext[currmsg]]"
if (authenticated)
dat += "<BR><BR>\[ <A HREF='?src=\ref[src];delmessage'>Delete \]"
else
state = STATE_MESSAGELIST
interact()
return
if(STATE_DELMESSAGE)
if (currmsg)
dat += "Are you sure you want to delete this message? \[ <A HREF='?src=\ref[src];delmessage2'>OK</A> | <A HREF='?src=\ref[src];viewmessage'>Cancel</A> \]"
else
state = STATE_MESSAGELIST
interact()
return
if(STATE_STATUSDISPLAY)
dat += "\[ <A HREF='?src=\ref[src];main'>Back</A> \]<BR>"
dat += "Set Status Displays<BR>"
dat += "\[ <A HREF='?src=\ref[src];setstat;statdisp=blank'>Clear</A> \]<BR>"
dat += "\[ <A HREF='?src=\ref[src];setstat;statdisp=time'>Station Time</A> \]"
dat += "\[ <A HREF='?src=\ref[src];setstat;statdisp=shuttle'>Shuttle ETA</A> \]<BR>"
dat += "\[ <A HREF='?src=\ref[src];setstat;statdisp=message'>Message</A> \]"
dat += "<ul><li> Line 1: <A HREF='?src=\ref[src];setmsg1'>[ stat_msg1 ? stat_msg1 : "(none)"]</A>"
dat += "<li> Line 2: <A HREF='?src=\ref[src];setmsg2'>[ stat_msg2 ? stat_msg2 : "(none)"]</A></ul><br>"
dat += "\[ Alert: <A HREF='?src=\ref[src];setstat;statdisp=alert;alert=default'>None</A> |"
dat += " <A HREF='?src=\ref[src];setstat;statdisp=alert;alert=redalert'>Red Alert</A> |"
dat += " <A HREF='?src=\ref[src];setstat;statdisp=alert;alert=lockdown'>Lockdown</A> |"
dat += " <A HREF='?src=\ref[src];setstat;statdisp=alert;alert=biohazard'>Biohazard</A> \]<BR><HR>"
if(STATE_ALERT_LEVEL)
dat += "Current alert level: [get_security_level()]<BR>"
if(security_level == SEC_LEVEL_DELTA)
dat += "<font color='red'><b>The self-destruct mechanism is active. Find a way to deactivate the mechanism to lower the alert level or evacuate.</b></font>"
else
dat += "<A HREF='?src=\ref[src];securitylevel;newalertlevel=[SEC_LEVEL_BLUE]'>Blue</A><BR>"
dat += "<A HREF='?src=\ref[src];securitylevel;newalertlevel=[SEC_LEVEL_GREEN]'>Green</A>"
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];swipeidseclevel'>Swipe ID</A> to confirm change.<BR>"
popup.set_content(dat)
popup.open()
proc/post_status(var/command, var/data1, var/data2)
var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435)
if(!frequency) return
var/datum/signal/status_signal = new
status_signal.source = src
status_signal.transmission_method = 1
status_signal.data["command"] = command
switch(command)
if("message")
status_signal.data["msg1"] = data1
status_signal.data["msg2"] = data2
if("alert")
status_signal.data["picture_state"] = data1
frequency.post_signal(src, status_signal)