Committing a patch for Giacom. See details here:

http://nanotrasen.com/phpBB3/viewtopic.php?f=16&t=9018

Also some very small metroid changes to make them more balanced and less KILL KILL KILL.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3839 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
vageyenaman@gmail.com
2012-06-16 06:11:14 +00:00
parent fa0a3efa34
commit 449610bee2
11 changed files with 478 additions and 167 deletions

View File

@@ -15,7 +15,7 @@
gender = NEUTER gender = NEUTER
update_icon = 0 update_icon = 0
nutrition = 800 // 1000 = max nutrition = 900 // 1000 = max
see_in_dark = 8 see_in_dark = 8
@@ -54,5 +54,5 @@
gender = NEUTER gender = NEUTER
update_icon = 0 update_icon = 0
nutrition = 1000 // 1200 = max nutrition = 1100 // 1200 = max

View File

@@ -42,6 +42,8 @@
dat += "<A href='?src=\ref[src];wildlifecarp=1'>(<font color=red>Begin Wildlife Simulation</font>)</A><BR>" dat += "<A href='?src=\ref[src];wildlifecarp=1'>(<font color=red>Begin Wildlife Simulation</font>)</A><BR>"
dat += "Ensure the holodeck is empty before testing.<BR>" dat += "Ensure the holodeck is empty before testing.<BR>"
dat += "<BR>" dat += "<BR>"
if(issilicon(user))
dat += "<A href='?src=\ref[src];AIoverride=1'>(<font color=green>Re-Enable Safety Protocols?</font>)</A><BR>"
dat += "Safety Protocols are <font color=red> DISABLED </font><BR>" dat += "Safety Protocols are <font color=red> DISABLED </font><BR>"
else else
if(issilicon(user)) if(issilicon(user))
@@ -101,7 +103,7 @@
else if(href_list["AIoverride"]) else if(href_list["AIoverride"])
if(!issilicon(usr)) return if(!issilicon(usr)) return
emagged = 1 emagged = !emagged
src.add_fingerprint(usr) src.add_fingerprint(usr)
src.updateUsrDialog() src.updateUsrDialog()

View File

@@ -1,24 +1,62 @@
// Allows you to monitor messages that passes the server. // Allows you to monitor messages that passes the server.
/obj/machinery/computer/message_monitor /obj/machinery/computer/message_monitor
name = "Message Monitor Console" name = "Message Monitor Console"
desc = "Used to Monitor the crew's messages, that are sent via PDA." desc = "Used to Monitor the crew's messages, that are sent via PDA. Can also be used to view Request Console messages."
icon_state = "comm_monitor" icon_state = "comm_logs"
var/hack_icon = "comm_logsc"
var/normal_icon = "comm_logs"
circuit = "/obj/item/weapon/circuitboard/message_monitor" circuit = "/obj/item/weapon/circuitboard/message_monitor"
//Server linked to.
var/obj/machinery/message_server/linkedServer = null var/obj/machinery/message_server/linkedServer = null
var/screen = 0 // 0 = Main menu, 1 = Message Logs //Sparks effect - For emag
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread
//Messages - Saves me time if I want to change something.
var/noserver = "<span class='alert'>ALERT: No server detected.</span>"
var/incorrectkey = "<span class='warning'>ALERT: Incorrect decryption key!</span>"
var/defaultmsg = "<span class='notice'>Welcome. Please select an option.</span>"
var/rebootmsg = "<span class='warning'>%$&(<28>: Critical %$$@ Error // !RestArting! <lOadiNg backUp iNput ouTput> - ?pLeaSe wAit!</span>"
//Computer properties
var/screen = 0 // 0 = Main menu, 1 = Message Logs, 2 = Hacked screen, 3 = Custom Message
var/hacking = 0 // Is it being hacked into by the AI/Cyborg var/hacking = 0 // Is it being hacked into by the AI/Cyborg
var/emag = 0 // When it is emagged.
var/message = "<span class='notice'>System bootup complete. Please select an option.</span>" // The message that shows on the main menu.
// Custom Message Properties
var/customsender = "System Administrator"
var/obj/item/device/pda/customrecepient = null
var/customjob = "Admin"
var/custommessage = "This is a test, please ignore."
/obj/machinery/computer/message_monitor/attackby(obj/item/weapon/O as obj, mob/user as mob) /obj/machinery/computer/message_monitor/attackby(obj/item/weapon/O as obj, mob/user as mob)
if(stat & (NOPOWER|BROKEN))
return
if(!istype(user, /mob/living))
return
if(istype(O,/obj/item/weapon/card/emag/)) if(istype(O,/obj/item/weapon/card/emag/))
//Just brings up the Message Log without having to know the passcode. // Will create sparks and print out the console's password. You will then have to wait a while for the console to be back online.
if(!hacking) // It'll take more time if there's more characters in the password..
usr << "<span class='warning'>BZZT.. The console beeps and brings up the Message Logs.</span>" if(!emag)
screen = 1 icon_state = hack_icon // An error screen I made in the computers.dmi
else emag = 1
usr << "<span class='notice'>It looks like the console is already being hacked into.</span>" screen = 2
spark_system.set_up(5, 0, src)
src.spark_system.start()
var/obj/item/weapon/paper/monitorkey/MK = new/obj/item/weapon/paper/monitorkey
MK.loc = src.loc
// Will help make emagging the console not so easy to get away with.
MK.info += "<br><br><font color='red'><3E>%@%(*$%&(<28>&?*(%&<26>/{}</font>"
spawn(100*length(src.linkedServer.decryptkey)) UnmagConsole()
message = rebootmsg
if(isscrewdriver(O) && emag)
//Stops people from just unscrewing the monitor and putting it back to get the console working again.
user << "<span class='warning'>It is too hot to mess with!</span>"
return
..() ..()
return return
@@ -34,33 +72,42 @@
return return
if(!istype(user, /mob/living)) if(!istype(user, /mob/living))
return return
//If the computer is being hacked or is emagged, display the reboot message.
if(hacking || emag)
message = rebootmsg
var/dat = "<head><title>Message Monitor Console</title></head><body>" var/dat = "<head><title>Message Monitor Console</title></head><body>"
dat += "<center><h2>Message Monitor Console</h2></center><hr>" dat += "<center><h2>Message Monitor Console</h2></center><hr>"
dat += "<center><h4><font color='blue'[message]</h5></center>"
switch(screen) switch(screen)
//Main menu //Main menu
if(0) if(0)
if(hacking) if(hacking || emag)
screen = 2 screen = 2
return src.attack_hand(user) return src.attack_hand(user)
//&#09; = TAB
if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN))) if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
dat += "1. ERROR: Server not found<br>" dat += "<dd><A>&#09;ERROR: Server not found</A><br></dd>"
else else
dat += "<A href='?src=\ref[src];active=1'>1. Toggle Power: [src.linkedServer.active ? "<font color='green'>\[On\]</font>":"<font color='red'>\[Off\]</font>"]</a><br>" dat += "<dd><A href='?src=\ref[src];active=1'>&#09;1. Toggle Power: [src.linkedServer.active ? "<font color='green'>\[On\]</font>":"<font color='red'>\[Off\]</font>"]</a><br></dd>"
dat += "<A href='?src=\ref[src];find=1'>2. Link To A Server</a><br>" dat += "<dd><A href='?src=\ref[src];find=1'>&#09;2. Link To A Server</a><hr></dd>"
dat += "<A href='?src=\ref[src];clear=1'>3. Clear Message Logs</a><hr>" dat += "<dd><font color='red'> KEY REQUIRED</font></dd><hr>"
dat += "<font color='red'> KEY REQUIRED</font><br>" dat += "<dd><A href='?src=\ref[src];view=1'>&#09;3. View Message Logs </a><br></dd>"
dat += "<A href='?src=\ref[src];view=1'>4. View Message Logs </a><br>" dat += "<dd><A href='?src=\ref[src];viewr=1'>&#09;4. View Request Console Logs </a></br></dd>"
dat += "<A href='?src=\ref[src];pass=1'>5. Set Custom Key</a><hr><br>" dat += "<dd><A href='?src=\ref[src];clear=1'>&#09;5. Clear Message Logs</a><br></dd>"
dat += "<dd><A href='?src=\ref[src];clearr=1'>&#09;6. Clear Request Console Logs</a><br></dd>"
dat += "<dd><A href='?src=\ref[src];pass=1'>&#09;7. Set Custom Key</a><br></dd>"
dat += "<dd><A href='?src=\ref[src];msg=1'>&#09;8. Send Admin Message</a><hr><br></dd>"
//Malf/Traitor AIs can bruteforce into the system to gain the Key. //Malf/Traitor AIs can bruteforce into the system to gain the Key.
if((istype(user, /mob/living/silicon/ai) || istype(user, /mob/living/silicon/robot)) && (user.mind.special_role && user.mind.original == user)) if((istype(user, /mob/living/silicon/ai) || istype(user, /mob/living/silicon/robot)) && (user.mind.special_role && user.mind.original == user))
dat += "<A href='?src=\ref[src];hack=1'><i><font color='Red'>*&@. Bruteforce Key</font></i></font></a><br>" dat += "<dd><A href='?src=\ref[src];hack=1'><i><font color='Red'>*&@#. Bruteforce Key</font></i></font></a><br></dd>"
//Message Logs //Message Logs
if(1) if(1)
if(hacking) if(hacking || emag)
screen = 2 screen = 2
return src.attack_hand(user) return src.attack_hand(user)
if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN))) if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
usr << "<span class='notice'>No server detected.</span>" message = noserver
screen = 0 screen = 0
return src.attack_hand(user) return src.attack_hand(user)
@@ -68,50 +115,120 @@
//var/recipient = "Unspecified" //name of the person //var/recipient = "Unspecified" //name of the person
//var/sender = "Unspecified" //name of the sender //var/sender = "Unspecified" //name of the sender
//var/message = "Blank" //transferred message //var/message = "Blank" //transferred message
dat += "<center><A href='?src=\ref[src];back=1'>Return</a> - <A href='?src=\ref[src];refresh=1'>Refresh</center><hr>" dat += "<center><A href='?src=\ref[src];back=1'>Back</a> - <A href='?src=\ref[src];refresh=1'>Refresh</center><hr>"
dat += "<table border='1' width='100%'><tr><th width='20%'>Sender</th><th width='20%'>Recipient</th><th width='300px' word-wrap: break-word>Message</th></tr>" dat += "<table border='1' width='100%'><tr><th width = '5%'>X</th><th width='15%'>Sender</th><th width='15%'>Recipient</th><th width='300px' word-wrap: break-word>Message</th></tr>"
for(var/list/datum/data_pda_msg/pda in src.linkedServer.pda_msgs) for(var/datum/data_pda_msg/pda in src.linkedServer.pda_msgs)
index++ index++
if(index > 3000) if(index > 3000)
break break
dat += "<tr><td width='20%'>[pda.sender]</td><td width='20%'>[pda.recipient]</td><td width='80%'>[pda.message]</td></tr>" // Del - Sender - Recepient - Message
// X - Al Green - Your Mom - WHAT UP!?
dat += "<tr><td width = '5%'><center><A href='?src=\ref[src];delete=\ref[pda]' style='color: rgb(255,0,0)'>X</a></center></td><td width='15%'>[pda.sender]</td><td width='15%'>[pda.recipient]</td><td width='300px'>[pda.message]</td></tr>"
dat += "</table>" dat += "</table>"
//Hacking screen. //Hacking screen.
if(2) if(2)
if(!hacking) if(!hacking && !emag)
screen = 0 screen = 0
return src.attack_hand(user) return src.attack_hand(user)
if(istype(user, /mob/living/silicon/ai) || istype(user, /mob/living/silicon/robot)) if(istype(user, /mob/living/silicon/ai) || istype(user, /mob/living/silicon/robot))
dat += "Brute-forcing for server key.<br> This will take anywhere from two to five minutes." dat += "Brute-forcing for server key.<br> It will take 20 seconds for every character that the password has."
dat += "In the meantime, this console can reveal your true intentions if you let someone access it. Make sure no humans enter the room during that time." dat += "In the meantime, this console can reveal your true intentions if you let someone access it. Make sure no humans enter the room during that time."
else else
//It's the same message as the one above but in binary. Because robots understand binary and humans don't... well I thought it was clever. //It's the same message as the one above but in binary. Because robots understand binary and humans don't... well I thought it was clever.
dat += {"010101000110100001101001011100110010000001110111011010010110110 dat += {"01000010011100100111010101110100011001010010110<br>
0011011000010000001110100011000010110101101100101001000000110000101101110 10110011001101111011100100110001101101001011011100110011<br>
01111001011101110110100001100101011100100110010100100000011001100111001001 10010000001100110011011110111001000100000011100110110010<br>
10111101101101001000000111010001110111011011110010000001110100011011110010 10111001001110110011001010111001000100000011010110110010<br>
00000110011001101001011101100110010100100000011011010110100101101110011101 10111100100101110001000000100100101110100001000000111011<br>
01011101000110010101110011001011100010000001001001011011100010000001110100 10110100101101100011011000010000001110100011000010110101<br>
01101000011001010010000001101101011001010110000101101110001011010111010001 10110010100100000001100100011000000100000011100110110010<br>
10100101101101011001010010110000100000011101000110100001101001011100110010 10110001101101111011011100110010001110011001000000110011<br>
00000110001101101111011011100111001101101111011011000110010100100000011000 00110111101110010001000000110010101110110011001010111001<br>
11011000010110111000100000011100100110010101110110011001010110000101101100 00111100100100000011000110110100001100001011100100110000<br>
00100000011110010110111101110101011100100010000001110100011100100111010101 10110001101110100011001010111001000100000011101000110100<br>
10010100100000011010010110111001110100011001010110111001110100011010010110 00110000101110100001000000111010001101000011001010010000<br>
11110110111001110011001000000110100101100110001000000111100101101111011101 00111000001100001011100110111001101110111011011110111001<br>
01001000000110110001100101011101000010000001110011011011110110110101100101 00110010000100000011010000110000101110011001011100010000<br>
01101111011011100110010100100000011000010110001101100011011001010111001101 00100100101101110001000000111010001101000011001010010000<br>
11001100100000011010010111010000101110001000000100110101100001011010110110 00110110101100101011000010110111001110100011010010110110<br>
01010010000001110011011101010111001001100101001000000110111001101111001000 10110010100101100001000000111010001101000011010010111001<br>
00011010000111010101101101011000010110111001110011001000000110010101101110 10010000001100011011011110110111001110011011011110110110<br>
01110100011001010111001000100000011101000110100001100101001000000111001001 00110010100100000011000110110000101101110001000000111001<br>
10111101101111011011010010000001100100011101010111001001101001011011100110 00110010101110110011001010110000101101100001000000111100<br>
01110010000001110100011010000110000101110100001000000111010001101001011011 10110111101110101011100100010000001110100011100100111010<br>
010110010100101110"} 10110010100100000011010010110111001110100011001010110111<br>
00111010001101001011011110110111001110011001000000110100<br>
10110011000100000011110010110111101110101001000000110110<br>
00110010101110100001000000111001101101111011011010110010<br>
10110111101101110011001010010000001100001011000110110001<br>
10110010101110011011100110010000001101001011101000010111<br>
00010000001001101011000010110101101100101001000000111001<br>
10111010101110010011001010010000001101110011011110010000<br>
00110100001110101011011010110000101101110011100110010000<br>
00110010101101110011101000110010101110010001000000111010<br>
00110100001100101001000000111001001101111011011110110110<br>
10010000001100100011101010111001001101001011011100110011<br>
10010000001110100011010000110000101110100001000000111010<br>
001101001011011010110010100101110"}
//Fake messages
if(3)
if(hacking || emag)
screen = 2
return src.attack_hand(user)
dat += "<center><A href='?src=\ref[src];back=1'>Back</a> - <A href='?src=\ref[src];Reset=1'>Reset</a></center><hr>"
dat += {"<table border='1' width='100%'>
<tr><td width='20%'><A href='?src=\ref[src];select=Sender'>Sender</a></td>
<td width='20%'><A href='?src=\ref[src];select=Recepient'>Recipient</a></td>
<td width='20%'><A href='?src=\ref[src];select=RecJob'>Recepient Job</a></td>
<td width='300px' word-wrap: break-word><A href='?src=\ref[src];select=Message'>Message</a></td></tr>"}
//Sender - Recepient - Message
//Al Green - Your Mom - WHAT UP!?
dat += {"<tr><td width='20%'>[customsender]</td>
<td width='20%'>[customrecepient ? customrecepient.owner : "NONE"]</td>
<td width='20%'>[customjob]</td>
<td width='300px'>[custommessage]</td></tr>"}
dat += "</table><br><center><A href='?src=\ref[src];select=Send'>Send</a>"
//Request Console Logs
if(4)
if(hacking || emag)
screen = 2
return src.attack_hand(user)
if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
message = noserver
screen = 0
return src.attack_hand(user)
var/index = 0
/* data_rc_msg
X - 5%
var/rec_dpt = "Unspecified" //name of the person - 15%
var/send_dpt = "Unspecified" //name of the sender- 15%
var/message = "Blank" //transferred message - 300px
var/stamp = "Unstamped" - 15%
var/id_auth = "Unauthenticated" - 15%
var/priority = "Normal" - 10%
*/
dat += "<center><A href='?src=\ref[src];back=1'>Back</a> - <A href='?src=\ref[src];refresh=1'>Refresh</center><hr>"
dat += {"<table border='1' width='100%'><tr><th width = '5%'>X</th><th width='15%'>Sending Dep.</th><th width='15%'>Receiving Dep.</th>
<th width='300px' word-wrap: break-word>Message</th><th width='15%'>Stamp</th><th width='15%'>ID Auth.</th><th width='15%'>Priority.</th></tr>"}
for(var/datum/data_rc_msg/rc in src.linkedServer.rc_msgs)
index++
if(index > 3000)
break
// Del - Sender - Recepient - Message
// X - Al Green - Your Mom - WHAT UP!?
dat += {"<tr><td width = '5%'><center><A href='?src=\ref[src];deleter=\ref[rc]' style='color: rgb(255,0,0)'>X</a></center></td><td width='15%'>[rc.send_dpt]</td>
<td width='15%'>[rc.rec_dpt]</td><td width='300px'>[rc.message]</td><td width='15%'>[rc.stamp]</td><td width='15%'>[rc.id_auth]</td><td width='15%'>[rc.priority]</td></tr>"}
dat += "</table>"
dat += "</body>" dat += "</body>"
user << browse(dat, "window=message;size=500x700") message = defaultmsg
user << browse(dat, "window=message;size=700x700")
onclose(user, "message") onclose(user, "message")
return return
@@ -122,8 +239,19 @@
var/currentKey = src.linkedServer.decryptkey var/currentKey = src.linkedServer.decryptkey
user << "<span class='warning'>Brute-force completed! The key is '[currentKey]'.</span>" user << "<span class='warning'>Brute-force completed! The key is '[currentKey]'.</span>"
src.hacking = 0 src.hacking = 0
src.icon_state = normal_icon
src.screen = 0 // Return the screen back to normal src.screen = 0 // Return the screen back to normal
/obj/machinery/computer/message_monitor/proc/UnmagConsole()
src.icon_state = normal_icon
src.emag = 0
/obj/machinery/computer/message_monitor/proc/ResetMessage()
customsender = "System Administrator"
customrecepient = null
custommessage = "This is a test, please ignore."
customjob = "Admin"
/obj/machinery/computer/message_monitor/Topic(href, href_list) /obj/machinery/computer/message_monitor/Topic(href, href_list)
if(..()) if(..())
return return
@@ -132,62 +260,210 @@
if(!istype(usr, /mob/living)) if(!istype(usr, /mob/living))
return return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
//Turn the server on/off.
if (href_list["active"]) if (href_list["active"])
linkedServer.active = !linkedServer.active linkedServer.active = !linkedServer.active
//Find a server
if (href_list["find"]) if (href_list["find"])
if(message_servers && message_servers.len > 1) if(message_servers && message_servers.len > 1)
src.linkedServer = input(usr,"Please select a server.", "Select a server.", null) as null|anything in message_servers src.linkedServer = input(usr,"Please select a server.", "Select a server.", null) as null|anything in message_servers
usr << "Server selected.</span>" message = "<span class='alert'>NOTICE: Server selected.</span>"
else if(message_servers && message_servers.len > 0) else if(message_servers && message_servers.len > 0)
linkedServer = message_servers[1] linkedServer = message_servers[1]
usr << "<span class='notice'>Single Server Detected - Server selected.</span>" message = "<span class='notice'>NOTICE: Only Single Server Detected - Server selected.</span>"
else else
usr << "<span class='notice'>No server detected.</span>" message = noserver
//View the logs - KEY REQUIRED
if (href_list["view"]) if (href_list["view"])
if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN))) if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
usr << "<span class='notice'>No server detected.</span>" message = noserver
else else
var/dkey = trim(input(usr, "Please enter the decryption key.") as text|null) var/dkey = trim(input(usr, "Please enter the decryption key.") as text|null)
if(dkey && dkey != "") if(dkey && dkey != "")
if(src.linkedServer.decryptkey == dkey) if(src.linkedServer.decryptkey == dkey)
src.screen = 1 src.screen = 1
else else
usr << "<span class='warning'>ALERT: Incorrect password!</span>" message = incorrectkey
//Clears the logs - KEY REQUIRED
if (href_list["clear"]) if (href_list["clear"])
if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN))) if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
usr << "<span class='notice'>No server detected.</span>" message = noserver
else else
src.linkedServer.pda_msgs = list() var/dkey = trim(input(usr, "Please enter the decryption key.") as text|null)
usr << "<span class='notice'>Logs cleared.</span>" if(dkey && dkey != "")
if(src.linkedServer.decryptkey == dkey)
src.linkedServer.pda_msgs = list()
message = "<span class='notice'>NOTICE: Logs cleared.</span>"
else
message = incorrectkey
//Clears the request console logs - KEY REQUIRED
if (href_list["clearr"])
if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
message = noserver
else
var/dkey = trim(input(usr, "Please enter the decryption key.") as text|null)
if(dkey && dkey != "")
if(src.linkedServer.decryptkey == dkey)
src.linkedServer.rc_msgs = list()
message = "<span class='notice'>NOTICE: Logs cleared.</span>"
else
message = incorrectkey
//Change the password - KEY REQUIRED
if (href_list["pass"]) if (href_list["pass"])
if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN))) if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
usr << "<span class='notice'>No server detected.</span>" message = noserver
else else
var/dkey = trim(input(usr,"Please enter the decryption key.") as text|null) var/dkey = trim(input(usr,"Please enter the decryption key:") as text|null)
if(dkey && dkey != "") if(dkey && dkey != "")
if(dkey == src.linkedServer.decryptkey) if(dkey == src.linkedServer.decryptkey)
var/newkey = trim(input(usr,"Please enter the new key.")) var/newkey = trim(input(usr,"Please enter the new key (3 - 16 characters max):"))
if(newkey && newkey != "") if(length(newkey) <= 3)
message = "<span class='notice'>NOTICE: Decryption key too short!</span>"
else if(length(newkey) > 16)
message = "<span class='notice'>NOTICE: Decryption key too long!</span>"
else if(newkey && newkey != "")
src.linkedServer.decryptkey = newkey src.linkedServer.decryptkey = newkey
usr << "<span class='notice'>Password set.</span>" message = "<span class='notice'>NOTICE: Decryption key set.</span>"
else
usr << "<span class='warning'>ALERT: Incorrect password!</span>"
else
message = incorrectkey
//Hack the Console to get the password
if (href_list["hack"]) if (href_list["hack"])
if((istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) && (usr.mind.special_role && usr.mind.original == usr)) if((istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) && (usr.mind.special_role && usr.mind.original == usr))
src.hacking = 1 src.hacking = 1
src.screen = 2 src.screen = 2
//usr << "[src.linkedServer.decryptkey]" src.icon_state = hack_icon
spawn((100*6)*rand(2, 4)) //Time it takes to bruteforce is dependant on the password length.
spawn(100*length(src.linkedServer.decryptkey))
if(src && src.linkedServer && usr) if(src && src.linkedServer && usr)
BruteForce(usr) BruteForce(usr)
//Delete the log.
if (href_list["delete"])
//Are they on the view logs screen?
if(screen == 1)
if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
message = noserver
else //if(istype(href_list["delete"], /datum/data_pda_msg))
src.linkedServer.pda_msgs -= locate(href_list["delete"])
message = "<span class='notice'>NOTICE: Log Deleted!</span>"
//Delete the request console log.
if (href_list["deleter"])
//Are they on the view logs screen?
if(screen == 4)
if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
message = noserver
else //if(istype(href_list["delete"], /datum/data_pda_msg))
src.linkedServer.rc_msgs -= locate(href_list["deleter"])
message = "<span class='notice'>NOTICE: Log Deleted!</span>"
//Create a custom message
if (href_list["msg"])
if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
message = noserver
else
var/dkey = trim(input(usr, "Please enter the decryption key.") as text|null)
if(dkey && dkey != "")
if(src.linkedServer.decryptkey == dkey)
src.screen = 3
else
message = incorrectkey
//Fake messaging selection - KEY REQUIRED
if (href_list["select"])
if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
message = noserver
screen = 0
else
switch(href_list["select"])
//Reset
if("Reset")
ResetMessage()
//Select Your Name
if("Sender")
customsender = input(usr, "Please enter the sender's name.") as text|null
//Select Receiver
if("Recepient")
//Get out list of viable PDAs
if(PDAs && PDAs.len > 0)
customrecepient = input(usr, "Select a PDA from the list.") as null|anything in PDAs
else
customrecepient = null
//Enter custom job
if("RecJob")
customjob = input(usr, "Please enter the sender's job.") as text|null
//Enter message
if("Message")
custommessage = input(usr, "Please enter your message.") as text|null
custommessage = copytext(sanitize(custommessage), 1, MAX_MESSAGE_LEN)
//Send message
if("Send")
if(isnull(customsender) || customsender == "")
customsender = "UNKNOWN"
if(isnull(customrecepient))
message = "<span class='notice'>NOTICE: No recepient selected!</span>"
return src.attack_hand(usr)
if(isnull(custommessage) || custommessage == "")
message = "<span class='notice'>NOTICE: No message entered!</span>"
return src.attack_hand(usr)
var/obj/item/device/pda/PDARec = null
for (var/obj/item/device/pda/P in PDAs)
if (!P.owner||P.toff) continue
if(P.owner == customsender)
PDARec = P
//Sender isn't faking as someone who exists
if(isnull(PDARec))
src.linkedServer.send_pda_message("[customrecepient.owner]", "[customsender]","[custommessage]")
customrecepient.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[customrecepient];choice=Message;target=\ref[src]'>[customsender]</a> ([customjob]):</b></i><br>[custommessage]<br>"
if (!customrecepient.silent)
playsound(customrecepient.loc, 'twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, customrecepient.loc))
O.show_message(text("\icon[customrecepient] *[customrecepient.ttone]*"))
if( customrecepient.loc && ishuman(customrecepient.loc) )
var/mob/living/carbon/human/H = customrecepient.loc
H << "\icon[customrecepient] <b>Message from [customsender] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
log_pda("[usr] (PDA: [customsender]) sent \"[custommessage]\" to [customrecepient.owner]")
customrecepient.overlays = null
customrecepient.overlays += image('pda.dmi', "pda-r")
//Sender is faking as someone who exists
else
src.linkedServer.send_pda_message("[customrecepient.owner]", "[PDARec.owner]","[custommessage]")
customrecepient.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[customrecepient];choice=Message;target=\ref[PDARec]'>[PDARec.owner]</a> ([customjob]):</b></i><br>[custommessage]<br>"
if (!customrecepient.silent)
playsound(customrecepient.loc, 'twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, customrecepient.loc))
O.show_message(text("\icon[customrecepient] *[customrecepient.ttone]*"))
if( customrecepient.loc && ishuman(customrecepient.loc) )
var/mob/living/carbon/human/H = customrecepient.loc
H << "\icon[customrecepient] <b>Message from [PDARec.owner] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[customrecepient];choice=Message;skiprefresh=1;target=\ref[PDARec]'>Reply</a>)"
log_pda("[usr] (PDA: [PDARec.owner]) sent \"[custommessage]\" to [customrecepient.owner]")
customrecepient.overlays = null
customrecepient.overlays += image('pda.dmi', "pda-r")
//Finally..
ResetMessage()
//Request Console Logs - KEY REQUIRED
if(href_list["viewr"])
if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
message = noserver
else
var/dkey = trim(input(usr, "Please enter the decryption key.") as text|null)
if(dkey && dkey != "")
if(src.linkedServer.decryptkey == dkey)
src.screen = 4
else
message = incorrectkey
//usr << href_list["select"]
if (href_list["back"]) if (href_list["back"])
src.screen = 0 src.screen = 0

View File

@@ -248,46 +248,55 @@ var/list/obj/machinery/requests_console/allConsoles = list()
sending += "<br>" sending += "<br>"
screen = 7 //if it's successful, this will get overrwritten (7 = unsufccessfull, 6 = successfull) screen = 7 //if it's successful, this will get overrwritten (7 = unsufccessfull, 6 = successfull)
if (sending) if (sending)
var/pass = 0
for (var/obj/machinery/message_server/MS in world) for (var/obj/machinery/message_server/MS in world)
if(!MS.active) continue
MS.send_rc_message(href_list["department"],department,log_msg,msgStamped,msgVerified,priority) MS.send_rc_message(href_list["department"],department,log_msg,msgStamped,msgVerified,priority)
pass = 1
for (var/obj/machinery/requests_console/Console in allConsoles) if(pass)
if (ckey(Console.department) == ckey(href_list["department"]))
switch(priority) for (var/obj/machinery/requests_console/Console in allConsoles)
if("2") //High priority if (ckey(Console.department) == ckey(href_list["department"]))
if(Console.newmessagepriority < 2)
Console.newmessagepriority = 2
Console.icon_state = "req_comp2"
if(!Console.silent)
playsound(Console.loc, 'twobeep.ogg', 50, 1)
for (var/mob/O in hearers(5, Console.loc))
O.show_message(text("\icon[Console] *The Requests Console beeps: 'PRIORITY Alert in [department]'"))
Console.messages += "<B><FONT color='red'>High Priority message from <A href='?src=\ref[Console];write=[ckey(department)]'>[department]</A></FONT></B><BR>[sending]"
// if("3") //Not implemanted, but will be //Removed as it doesn't look like anybody intends on implimenting it ~Carn switch(priority)
// if(Console.newmessagepriority < 3) if("2") //High priority
// Console.newmessagepriority = 3 if(Console.newmessagepriority < 2)
// Console.icon_state = "req_comp3" Console.newmessagepriority = 2
// if(!Console.silent) Console.icon_state = "req_comp2"
// playsound(Console.loc, 'twobeep.ogg', 50, 1) if(!Console.silent)
// for (var/mob/O in hearers(7, Console.loc)) playsound(Console.loc, 'twobeep.ogg', 50, 1)
// O.show_message(text("\icon[Console] *The Requests Console yells: 'EXTREME PRIORITY alert in [department]'")) for (var/mob/O in hearers(5, Console.loc))
// Console.messages += "<B><FONT color='red'>Extreme Priority message from [ckey(department)]</FONT></B><BR>[message]" O.show_message(text("\icon[Console] *The Requests Console beeps: 'PRIORITY Alert in [department]'"))
Console.messages += "<B><FONT color='red'>High Priority message from <A href='?src=\ref[Console];write=[ckey(department)]'>[department]</A></FONT></B><BR>[sending]"
else // Normal priority // if("3") //Not implemanted, but will be //Removed as it doesn't look like anybody intends on implimenting it ~Carn
if(Console.newmessagepriority < 1) // if(Console.newmessagepriority < 3)
Console.newmessagepriority = 1 // Console.newmessagepriority = 3
Console.icon_state = "req_comp1" // Console.icon_state = "req_comp3"
if(!Console.silent) // if(!Console.silent)
playsound(Console.loc, 'twobeep.ogg', 50, 1) // playsound(Console.loc, 'twobeep.ogg', 50, 1)
for (var/mob/O in hearers(4, Console.loc)) // for (var/mob/O in hearers(7, Console.loc))
O.show_message(text("\icon[Console] *The Requests Console beeps: 'Message from [department]'")) // O.show_message(text("\icon[Console] *The Requests Console yells: 'EXTREME PRIORITY alert in [department]'"))
Console.messages += "<B>Message from <A href='?src=\ref[Console];write=[ckey(department)]'>[department]</A></FONT></B><BR>[message]" // Console.messages += "<B><FONT color='red'>Extreme Priority message from [ckey(department)]</FONT></B><BR>[message]"
else // Normal priority
if(Console.newmessagepriority < 1)
Console.newmessagepriority = 1
Console.icon_state = "req_comp1"
if(!Console.silent)
playsound(Console.loc, 'twobeep.ogg', 50, 1)
for (var/mob/O in hearers(4, Console.loc))
O.show_message(text("\icon[Console] *The Requests Console beeps: 'Message from [department]'"))
Console.messages += "<B>Message from <A href='?src=\ref[Console];write=[ckey(department)]'>[department]</A></FONT></B><BR>[message]"
screen = 6
Console.luminosity = 2
messages += "<B>Message sent to [dpt]</B><BR>[message]"
else
for (var/mob/O in hearers(4, src.loc))
O.show_message(text("\icon[src] *The Requests Console beeps: 'NOTICE: No server detected!'"))
screen = 6
Console.luminosity = 2
messages += "<B>Message sent to [dpt]</B><BR>[message]"
//Handle screen switching //Handle screen switching
switch(text2num(href_list["setScreen"])) switch(text2num(href_list["setScreen"]))

View File

@@ -15,6 +15,7 @@
var/playing = 0 var/playing = 0
var/help = 0 var/help = 0
var/edit = 1 var/edit = 1
var/repeat = 0
proc proc
playnote(var/note as text) playnote(var/note as text)
@@ -368,42 +369,44 @@
M << sound(soundfile) M << sound(soundfile)
playsong() playsong()
var/cur_oct[7] do
var/cur_acc[7] var/cur_oct[7]
for(var/i = 1 to 7) var/cur_acc[7]
cur_oct[i] = "3" for(var/i = 1 to 7)
cur_acc[i] = "n" cur_oct[i] = "3"
cur_acc[i] = "n"
for(var/line in song.lines) for(var/line in song.lines)
//world << line //world << line
for(var/beat in dd_text2list(lowertext(line), ",")) for(var/beat in dd_text2list(lowertext(line), ","))
//world << "beat: [beat]" //world << "beat: [beat]"
var/list/notes = dd_text2list(beat, "/") var/list/notes = dd_text2list(beat, "/")
for(var/note in dd_text2list(notes[1], "-")) for(var/note in dd_text2list(notes[1], "-"))
//world << "note: [note]" //world << "note: [note]"
if(!playing || !anchored)//If the piano is playing, or is loose if(!playing || !anchored)//If the piano is playing, or is loose
playing = 0 playing = 0
return return
if(lentext(note) == 0) if(lentext(note) == 0)
continue continue
//world << "Parse: [copytext(note,1,2)]" //world << "Parse: [copytext(note,1,2)]"
var/cur_note = text2ascii(note) - 96 var/cur_note = text2ascii(note) - 96
if(cur_note < 1 || cur_note > 7) if(cur_note < 1 || cur_note > 7)
continue continue
for(var/i=2 to lentext(note)) for(var/i=2 to lentext(note))
var/ni = copytext(note,i,i+1) var/ni = copytext(note,i,i+1)
if(!text2num(ni)) if(!text2num(ni))
if(ni == "#" || ni == "b" || ni == "n") if(ni == "#" || ni == "b" || ni == "n")
cur_acc[cur_note] = ni cur_acc[cur_note] = ni
else if(ni == "s") else if(ni == "s")
cur_acc[cur_note] = "#" // so shift is never required cur_acc[cur_note] = "#" // so shift is never required
else else
cur_oct[cur_note] = ni cur_oct[cur_note] = ni
playnote(uppertext(copytext(note,1,2)) + cur_acc[cur_note] + cur_oct[cur_note]) playnote(uppertext(copytext(note,1,2)) + cur_acc[cur_note] + cur_oct[cur_note])
if(notes.len >= 2 && text2num(notes[2])) if(notes.len >= 2 && text2num(notes[2]))
sleep(song.tempo / text2num(notes[2])) sleep(song.tempo / text2num(notes[2]))
else else
sleep(song.tempo) sleep(song.tempo)
while(repeat)
playing = 0 playing = 0
updateUsrDialog() updateUsrDialog()
@@ -417,9 +420,10 @@
if(song) if(song)
if(song.lines.len > 0 && !(playing)) if(song.lines.len > 0 && !(playing))
dat += "<A href='?src=\ref[src];play=1'>Play Song</A><BR><BR>" dat += "<A href='?src=\ref[src];play=1'>Play Song</A><BR><BR>"
dat += "<A href='?src=\ref[src];repeat=1'>Repeat Song: [repeat ? "Yes" : "No"]</A><BR><BR>"
if(playing) if(playing)
dat += "<A href='?src=\ref[src];stop=1'>Stop Playing</A><BR><BR>" dat += "<A href='?src=\ref[src];stop=1'>Stop Playing</A><BR>"
dat += "<A href='?src=\ref[src];repeat=1'>Repeat Song: [repeat ? "Yes" : "No"]</A><BR><BR>"
if(!edit) if(!edit)
dat += "<A href='?src=\ref[src];edit=2'>Show Editor</A><BR><BR>" dat += "<A href='?src=\ref[src];edit=2'>Show Editor</A><BR><BR>"
else else
@@ -460,7 +464,11 @@
onclose(user, "piano") onclose(user, "piano")
Topic(href, href_list) Topic(href, href_list)
if(in_range(src, usr) && !issilicon(usr) && anchored) if(in_range(src, usr) && !issilicon(usr) && anchored)
if(href_list["repeat"])
repeat = !repeat
if(href_list["tempo"]) if(href_list["tempo"])
song.tempo += text2num(href_list["tempo"]) song.tempo += text2num(href_list["tempo"])
if(song.tempo < 1) if(song.tempo < 1)
@@ -531,6 +539,7 @@
song.lines = lines song.lines = lines
song.tempo = tempo song.tempo = tempo
updateUsrDialog() updateUsrDialog()
add_fingerprint(usr) add_fingerprint(usr)
updateUsrDialog() updateUsrDialog()
return return

View File

@@ -1,6 +1,9 @@
//The advanced pea-green monochrome lcd of tomorrow. //The advanced pea-green monochrome lcd of tomorrow.
var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda /obj/item/device/pda
name = "PDA" name = "PDA"
desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a preprogrammed ROM cartridge." desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a preprogrammed ROM cartridge."
@@ -182,6 +185,7 @@
/obj/item/device/pda/New() /obj/item/device/pda/New()
..() ..()
PDAs += src
spawn(3) spawn(3)
if (default_cartridge) if (default_cartridge)
cartridge = new default_cartridge(src) cartridge = new default_cartridge(src)
@@ -331,7 +335,7 @@
var/count = 0 var/count = 0
if (!toff) if (!toff)
for (var/obj/item/device/pda/P in world) for (var/obj/item/device/pda/P in PDAs)
if (!P.owner||P.toff||P == src) continue if (!P.owner||P.toff||P == src) continue
dat += "<li><a href='byond://?src=\ref[src];choice=Message;target=\ref[P]'>[P]</a>" dat += "<li><a href='byond://?src=\ref[src];choice=Message;target=\ref[P]'>[P]</a>"
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate)) if (istype(cartridge, /obj/item/weapon/cartridge/syndicate))
@@ -1008,6 +1012,7 @@
return return
/obj/item/device/pda/Del() /obj/item/device/pda/Del()
PDAs -= src
if (src.id) if (src.id)
src.id.loc = get_turf(src.loc) src.id.loc = get_turf(src.loc)
..() ..()
@@ -1042,7 +1047,7 @@
usr << "You can't send PDA messages because you are dead!" usr << "You can't send PDA messages because you are dead!"
return return
for (var/obj/item/device/pda/P in world) for (var/obj/item/device/pda/P in PDAs)
if (!P.owner) if (!P.owner)
continue continue
else if (P == src) else if (P == src)

View File

@@ -87,20 +87,20 @@
var/hungry = 0 // determines if the metroid is hungry var/hungry = 0 // determines if the metroid is hungry
var/starving = 0 // determines if the metroid is starving-hungry var/starving = 0 // determines if the metroid is starving-hungry
if(istype(src, /mob/living/carbon/metroid/adult)) if(istype(src, /mob/living/carbon/metroid/adult)) // 1200 max nutrition
switch(nutrition) switch(nutrition)
if(400 to 1100) hungry = 1 if(301 to 600) hungry = 1
if(0 to 399) if(0 to 300)
starving = 1 starving = 1
else else
switch(nutrition) switch(nutrition) // 1000 max nutrition
if(150 to 800) hungry = 1 if(201 to 500) hungry = 1
if(0 to 149) starving = 1 if(0 to 200) starving = 1
if(starving && !client) // if a metroid is starving, it starts losing its friends if(starving && !client) // if a metroid is starving, it starts losing its friends
if(prob(15) && Friends.len > 0) if(prob(1) && Friends.len > 0)
var/friendnum = 0 var/friendnum = 0
for(var/mob/M in Friends) for(var/mob/M in Friends)
friendnum++ friendnum++
@@ -504,8 +504,8 @@
var/number = pick(2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,4) var/number = pick(2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,4)
for(var/i=1,i<=number,i++) // reproduce (has a small chance of producing 3 or 4 offspring) for(var/i=1,i<=number,i++) // reproduce (has a small chance of producing 3 or 4 offspring)
var/mob/living/carbon/metroid/M = new/mob/living/carbon/metroid(loc) var/mob/living/carbon/metroid/M = new/mob/living/carbon/metroid(loc)
M.nutrition = round(nutrition/number) M.nutrition = round(nutrition * 0.9)
M.powerlevel = round(powerlevel / number) M.powerlevel = round(powerlevel/number)
M.Friends = Friends M.Friends = Friends
M.tame = tame M.tame = tame
M.rabid = rabid M.rabid = rabid
@@ -518,6 +518,7 @@
if(!client) if(!client)
var/mob/living/carbon/metroid/adult/A = new/mob/living/carbon/metroid/adult(src.loc) var/mob/living/carbon/metroid/adult/A = new/mob/living/carbon/metroid/adult(src.loc)
A.nutrition = nutrition A.nutrition = nutrition
A.nutrition += 100
A.powerlevel = max(0, powerlevel-1) A.powerlevel = max(0, powerlevel-1)
A.Friends = Friends A.Friends = Friends
A.tame = tame A.tame = tame

View File

@@ -76,6 +76,7 @@
if(Victim.health <= 0) if(Victim.health <= 0)
Victim.adjustToxLoss(rand(2,4)) Victim.adjustToxLoss(rand(2,4))
// Heal yourself
adjustToxLoss(-10) adjustToxLoss(-10)
adjustOxyLoss(-10) adjustOxyLoss(-10)
adjustBruteLoss(-10) adjustBruteLoss(-10)
@@ -136,7 +137,8 @@
if(Victim && !rabid && !attacked) if(Victim && !rabid && !attacked)
if(Victim.LAssailant && Victim.LAssailant != Victim) if(Victim.LAssailant && Victim.LAssailant != Victim)
if(prob(50)) if(prob(50))
Friends |= Victim.LAssailant if(!(Victim.LAssailant in Friends))
Friends.Add(Victim.LAssailant) // no idea why i was using the |= operator
if(M.client && istype(src, /mob/living/carbon/human)) if(M.client && istype(src, /mob/living/carbon/human))
if(prob(85)) if(prob(85))
@@ -205,7 +207,7 @@
var/list/babies = list() var/list/babies = list()
for(var/i=1,i<=number,i++) // reproduce (has a small chance of producing 3 or 4 offspring) for(var/i=1,i<=number,i++) // reproduce (has a small chance of producing 3 or 4 offspring)
var/mob/living/carbon/metroid/M = new/mob/living/carbon/metroid(loc) var/mob/living/carbon/metroid/M = new/mob/living/carbon/metroid(loc)
M.nutrition = round(nutrition/number) M.nutrition = round(nutrition * 0.9)
M.powerlevel = round(powerlevel / number) M.powerlevel = round(powerlevel / number)
if(i != 1) step_away(M,src) if(i != 1) step_away(M,src)
babies += M babies += M

View File

@@ -45,12 +45,17 @@
set src in oview(1) set src in oview(1)
// ..() //We don't want them to see the dumb "this is a paper" thing every time. // ..() //We don't want them to see the dumb "this is a paper" thing every time.
if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon))) // I didn't like the idea that people can read tiny pieces of paper from across the room.
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]") // Now you need to be next to the paper in order to read it.
onclose(usr, "[name]") if(in_range(usr, src))
if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)))
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
else
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
else else
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]") usr << "<span class='notice'>It is too far away.</span>"
onclose(usr, "[name]")
return return
/obj/item/weapon/paper/verb/rename() /obj/item/weapon/paper/verb/rename()
@@ -155,7 +160,7 @@
t = dd_replacetext(t, "\[/i\]", "</I>") t = dd_replacetext(t, "\[/i\]", "</I>")
t = dd_replacetext(t, "\[u\]", "<U>") t = dd_replacetext(t, "\[u\]", "<U>")
t = dd_replacetext(t, "\[/u\]", "</U>") t = dd_replacetext(t, "\[/u\]", "</U>")
t = dd_replacetext(t, "\[large\]", "<font size = \"4\">") t = dd_replacetext(t, "\[large\]", "<font size=\"4\">")
t = dd_replacetext(t, "\[/large\]", "</font>") t = dd_replacetext(t, "\[/large\]", "</font>")
t = dd_replacetext(t, "\[sign\]", "<font face=\"[signfont]\"><i>[user.real_name]</i></font>") t = dd_replacetext(t, "\[sign\]", "<font face=\"[signfont]\"><i>[user.real_name]</i></font>")
t = dd_replacetext(t, "\[field\]", "<span class=\"paper_field\"></span>") t = dd_replacetext(t, "\[field\]", "<span class=\"paper_field\"></span>")
@@ -190,6 +195,7 @@
return t return t
/obj/item/weapon/paper/proc/openhelp(mob/user as mob) /obj/item/weapon/paper/proc/openhelp(mob/user as mob)
user << browse({"<HTML><HEAD><TITLE>Pen Help</TITLE></HEAD> user << browse({"<HTML><HEAD><TITLE>Pen Help</TITLE></HEAD>
<BODY> <BODY>

View File

@@ -1,4 +1,4 @@
var/global/list/message_servers = list() var/global/list/obj/machinery/message_server/message_servers = list()
/datum/data_pda_msg /datum/data_pda_msg
var/recipient = "Unspecified" //name of the person var/recipient = "Unspecified" //name of the person
@@ -6,6 +6,7 @@ var/global/list/message_servers = list()
var/message = "Blank" //transferred message var/message = "Blank" //transferred message
/datum/data_pda_msg/New(var/param_rec = "",var/param_sender = "",var/param_message = "") /datum/data_pda_msg/New(var/param_rec = "",var/param_sender = "",var/param_message = "")
if(param_rec) if(param_rec)
recipient = param_rec recipient = param_rec
if(param_sender) if(param_sender)
@@ -56,11 +57,11 @@ var/global/list/message_servers = list()
var/list/datum/data_pda_msg/pda_msgs = list() var/list/datum/data_pda_msg/pda_msgs = list()
var/list/datum/data_rc_msg/rc_msgs = list() var/list/datum/data_rc_msg/rc_msgs = list()
var/active = 1 var/active = 1
var/decryptkey = "password"; var/decryptkey = "password"
/obj/machinery/message_server/New() /obj/machinery/message_server/New()
message_servers += src message_servers += src
decryptkey = generateKey() decryptkey = GenerateKey()
send_pda_message("System Administrator", "system", "This is an automated message. The messaging system is functioning correctly.") send_pda_message("System Administrator", "system", "This is an automated message. The messaging system is functioning correctly.")
..() ..()
return return
@@ -70,10 +71,10 @@ var/global/list/message_servers = list()
..() ..()
return return
/obj/machinery/message_server/proc/generateKey() /obj/machinery/message_server/proc/GenerateKey()
//Feel free to move to Helpers. //Feel free to move to Helpers.
var/newKey var/newKey
newKey += pick("the", "if", "of", "as", "in", "a", "you", "from", "to", "an", "too", "little", "snow", "dead", "drunk", "rose") newKey += pick("the", "if", "of", "as", "in", "a", "you", "from", "to", "an", "too", "little", "snow", "dead", "drunk", "rosebud", "duck", "al", "le")
newKey += pick("diamond", "beer", "mushroom", "assistant", "clown", "captain", "twinkie", "security", "nuke", "small", "big", "escape", "yellow", "gloves", "monkey", "engine", "nuclear", "ai") newKey += pick("diamond", "beer", "mushroom", "assistant", "clown", "captain", "twinkie", "security", "nuke", "small", "big", "escape", "yellow", "gloves", "monkey", "engine", "nuclear", "ai")
newKey += pick("1", "2", "3", "4", "5", "6", "7", "8", "9", "0") newKey += pick("1", "2", "3", "4", "5", "6", "7", "8", "9", "0")
return newKey return newKey

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 65 KiB