Merge branch 'master' into upstream-merge-29741

This commit is contained in:
LetterJay
2017-09-30 13:35:47 -04:00
committed by GitHub
251 changed files with 4917 additions and 2764 deletions
+44 -4
View File
@@ -26,6 +26,14 @@ GLOBAL_LIST_EMPTY(PDAs)
var/obj/item/cartridge/cartridge = null //current cartridge
var/mode = 0 //Controls what menu the PDA will display. 0 is hub; the rest are either built in or based on cartridge.
var/icon_alert = "pda-r" //Icon to be overlayed for message alerts. Taken from the pda icon file.
var/font_index = 0 //This int tells DM which font is currently selected and lets DM know when the last font has been selected so that it can cycle back to the first font when "toggle font" is pressed again.
var/font_mode = "font-family:\"VT323\", monospace;letter-spacing:1px;" //The currently selected font.
var/background_color = "#808000" //The currently selected background color.
#define FONT_VT 0
#define FONT_SHARE 1
#define FONT_ORBITRON 2
#define FONT_MONO 3
//Secondary variables
var/scanmode = 0 //1 is medical scanner, 2 is forensics, 3 is reagent scanner.
@@ -58,6 +66,13 @@ GLOBAL_LIST_EMPTY(PDAs)
var/obj/item/inserted_item //Used for pen, crayon, and lipstick insertion or removal. Same as above.
var/overlays_x_offset = 0 //x offset to use for certain overlays
/obj/item/device/pda/examine(mob/user)
..()
if(!id && !inserted_item)
return
else
to_chat(user, "<span class='notice'>Alt-click to remove contents.</span>")
/obj/item/device/pda/Initialize()
. = ..()
if(fon)
@@ -121,7 +136,8 @@ GLOBAL_LIST_EMPTY(PDAs)
hidden_uplink.interact(user)
return
var/dat = "<html><head><title>Personal Data Assistant</title></head><body bgcolor=\"#808000\"><style>a, a:link, a:visited, a:active, a:hover { color: #000000; }img {border-style:none;}</style>"
var/dat = "<!DOCTYPE html><html><head><title>Personal Data Assistant</title><link href=\"https://fonts.googleapis.com/css?family=Orbitron|Share+Tech+Mono|VT323\" rel=\"stylesheet\"></head><body bgcolor=\"" + background_color + "\"><style>body{" + font_mode + "}ul,ol{list-style-type: none;}a, a:link, a:visited, a:active, a:hover { color: #000000;text-decoration:none; }img {border-style:none;}</style>"
dat += "<a href='byond://?src=\ref[src];choice=Refresh'><img src=pda_refresh.png> Refresh</a>"
@@ -130,6 +146,12 @@ GLOBAL_LIST_EMPTY(PDAs)
if (mode)
dat += " | <a href='byond://?src=\ref[src];choice=Return'><img src=pda_menu.png> Return</a>"
if (mode == 0)
dat += "<div align=\"center\">"
dat += "<br><a href='byond://?src=\ref[src];choice=Toggle_Font'>Toggle Font</a>"
dat += " | <a href='byond://?src=\ref[src];choice=Change_Color'>Change Color</a>"
dat += "</div>"
dat += "<br>"
if (!owner)
@@ -307,6 +329,24 @@ GLOBAL_LIST_EMPTY(PDAs)
//BASIC FUNCTIONS===================================
if("Refresh")//Refresh, goes to the end of the proc.
if ("Toggle_Font")
//CODE REVISION 2
font_index = (font_index + 1) % 4
switch(font_index)
if (FONT_VT)
font_mode = "font-family:\"VT323\", monospace;letter-spacing:1px;"
if (FONT_SHARE)
font_mode = "font-family:\"Share Tech Mono\", monospace;letter-spacing:0px;"
if (FONT_ORBITRON)
font_mode = "font-family:\"Orbitron\", monospace;letter-spacing:0px; font-size:15px"
if (FONT_MONO)
font_mode = "font-family:monospace;"
if ("Change_Color")
var/new_color = input("Please enter a color name or hex value (Default is \'#808000\').")as color
background_color = new_color
if("Return")//Return
if(mode<=9)
mode = 0
@@ -400,7 +440,7 @@ GLOBAL_LIST_EMPTY(PDAs)
if (in_range(src, U) && loc == U)
if (mode == 1 && n)
note = n
notehtml = parsepencode(n, U, SIGNFONT)
notehtml = parsemarkdown(n, U)
notescanned = 0
else
U << browse(null, "window=pda")
@@ -538,7 +578,7 @@ GLOBAL_LIST_EMPTY(PDAs)
P.show_recieved_message(msg,src)
if(!multiple)
show_to_ghosts(user,msg)
log_talk(user,"[key_name(user)] (PDA: [name]) sent \"[message]\" to [key_name(P,null,TRUE)]",LOGPDA)
log_talk(user,"[key_name(user)] (PDA: [initial(name)]) sent \"[message]\" to [key_name(P,null,TRUE)]",LOGPDA)
else
if(!multiple)
to_chat(user, "<span class='notice'>ERROR: Server isn't responding.</span>")
@@ -548,7 +588,7 @@ GLOBAL_LIST_EMPTY(PDAs)
if(multiple)
show_to_sender(last_sucessful_msg,1)
show_to_ghosts(user,last_sucessful_msg,1)
log_talk(user,"[user] (PDA: [name]) sent \"[message]\" to Everyone",LOGPDA)
log_talk(user,"[user] (PDA: [initial(name)]) sent \"[message]\" to Everyone",LOGPDA)
/obj/item/device/pda/proc/show_to_sender(datum/data_pda_msg/msg,multiple = 0)
tnote += "<i><b>&rarr; To [multiple ? "Everyone" : msg.recipient]:</b></i><br>[msg.message][msg.get_photo_ref()]<br>"
+5 -2
View File
@@ -1,7 +1,7 @@
GLOBAL_LIST_EMPTY(GPS_list)
/obj/item/device/gps
name = "global positioning system"
desc = "Helping lost spacemen find their way through the planets since 2016. Alt+click to toggle power."
desc = "Helping lost spacemen find their way through the planets since 2016."
icon = 'icons/obj/telescience.dmi'
icon_state = "gps-c"
w_class = WEIGHT_CLASS_SMALL
@@ -15,6 +15,9 @@ GLOBAL_LIST_EMPTY(GPS_list)
var/updating = TRUE //Automatic updating of GPS list. Can be set to manual by user.
var/global_mode = TRUE //If disabled, only GPS signals of the same Z level are shown
/obj/item/device/gps/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to switch it [tracking ? "off":"on"].</span>")
/obj/item/device/gps/Initialize()
. = ..()
@@ -209,4 +212,4 @@ GLOBAL_LIST_EMPTY(GPS_list)
clear()
tagged = null
STOP_PROCESSING(SSfastprocess, src)
. = ..()
. = ..()
@@ -1,6 +1,6 @@
/obj/item/device/radio/headset
name = "radio headset"
desc = "An updated, modular intercom that fits over the head. Takes encryption keys. \nTo speak on the general radio frequency, use ; before speaking."
desc = "An updated, modular intercom that fits over the head. Takes encryption keys."
icon_state = "headset"
item_state = "headset"
materials = list(MAT_METAL=75)
@@ -11,6 +11,12 @@
var/obj/item/device/encryptionkey/keyslot2 = null
dog_fashion = null
/obj/item/device/radio/headset/examine(mob/user)
..()
to_chat(user, "<span class='notice'>To speak on the general radio frequency, use ; before speaking.</span>")
if (command)
to_chat(user, "<span class='notice'>Alt-click to toggle the high-volume mode.</span>")
/obj/item/device/radio/headset/Initialize()
. = ..()
recalculateChannels()
+2 -2
View File
@@ -181,7 +181,7 @@ MASS SPECTROMETER
to_chat(user, "<span class='info'>Time of Death:</span> [M.tod]")
var/tdelta = round(world.time - M.timeofdeath)
if(tdelta < (DEFIB_TIME_LIMIT * 10))
to_chat(user, "<span class='danger'>Subject died [tdelta / 10] seconds ago, defibrillation may be possible!</span>")
to_chat(user, "<span class='danger'>Subject died [DisplayTimeText(tdelta)] ago, defibrillation may be possible!</span>")
for(var/thing in M.viruses)
var/datum/disease/D = thing
@@ -214,7 +214,7 @@ MASS SPECTROMETER
var/cyberimp_detect
for(var/obj/item/organ/cyberimp/CI in C.internal_organs)
if(CI.status == ORGAN_ROBOTIC)
if(CI.status == ORGAN_ROBOTIC && !CI.syndicate_implant)
cyberimp_detect += "[C.name] is modified with a [CI.name].<br>"
if(cyberimp_detect)
to_chat(user, "<span class='notice'>Detected cybernetic modifications:</span>")
@@ -111,7 +111,6 @@ effective or pretty fucking useless.
/obj/item/device/healthanalyzer/rad_laser/interact(mob/user)
user.set_machine(src)
var/cooldown = GetCooldown()
var/dat = "Irradiation: <A href='?src=\ref[src];rad=1'>[irradiate ? "On" : "Off"]</A><br>"
dat += "Stealth Mode (NOTE: Deactivates automatically while Irradiation is off): <A href='?src=\ref[src];stealthy=[TRUE]'>[stealth ? "On" : "Off"]</A><br>"
dat += "Scan Mode: <a href='?src=\ref[src];mode=1'>"
@@ -133,7 +132,7 @@ effective or pretty fucking useless.
<A href='?src=\ref[src];radwav=-5'>-</A><A href='?src=\ref[src];radwav=-1'>-</A>
[(wavelength+(intensity*4))]
<A href='?src=\ref[src];radwav=1'>+</A><A href='?src=\ref[src];radwav=5'>+</A><BR>
Laser Cooldown: [cooldown] Seconds<BR>
Laser Cooldown: [DisplayTimeText(GetCooldown())]<BR>
"}
var/datum/browser/popup = new(user, "radlaser", "Radioactive Microlaser Interface", 400, 240)