diff --git a/code/defines/mob/living/carbon/metroid.dm b/code/defines/mob/living/carbon/metroid.dm
index 48fd4fea5c1..296cb7ef0c7 100644
--- a/code/defines/mob/living/carbon/metroid.dm
+++ b/code/defines/mob/living/carbon/metroid.dm
@@ -15,7 +15,7 @@
gender = NEUTER
update_icon = 0
- nutrition = 800 // 1000 = max
+ nutrition = 900 // 1000 = max
see_in_dark = 8
@@ -54,5 +54,5 @@
gender = NEUTER
update_icon = 0
- nutrition = 1000 // 1200 = max
+ nutrition = 1100 // 1200 = max
diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm
index 9769dfff0ce..ae14642a5ad 100644
--- a/code/game/machinery/computer/HolodeckControl.dm
+++ b/code/game/machinery/computer/HolodeckControl.dm
@@ -42,6 +42,8 @@
dat += "(Begin Wildlife Simulation)
"
dat += "Ensure the holodeck is empty before testing.
"
dat += "
"
+ if(issilicon(user))
+ dat += "(Re-Enable Safety Protocols?)
"
dat += "Safety Protocols are DISABLED
"
else
if(issilicon(user))
@@ -101,7 +103,7 @@
else if(href_list["AIoverride"])
if(!issilicon(usr)) return
- emagged = 1
+ emagged = !emagged
src.add_fingerprint(usr)
src.updateUsrDialog()
diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm
index e8c557cea23..a21b4bdc344 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -1,24 +1,62 @@
// Allows you to monitor messages that passes the server.
+
+
+
/obj/machinery/computer/message_monitor
name = "Message Monitor Console"
- desc = "Used to Monitor the crew's messages, that are sent via PDA."
- icon_state = "comm_monitor"
+ 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_logs"
+ var/hack_icon = "comm_logsc"
+ var/normal_icon = "comm_logs"
circuit = "/obj/item/weapon/circuitboard/message_monitor"
+ //Server linked to.
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 = "ALERT: No server detected."
+ var/incorrectkey = "ALERT: Incorrect decryption key!"
+ var/defaultmsg = "Welcome. Please select an option."
+ var/rebootmsg = "%$&(£: Critical %$$@ Error // !RestArting! - ?pLeaSe wAit!"
+ //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/emag = 0 // When it is emagged.
+ var/message = "System bootup complete. Please select an option." // 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)
+ if(stat & (NOPOWER|BROKEN))
+ return
+ if(!istype(user, /mob/living))
+ return
if(istype(O,/obj/item/weapon/card/emag/))
- //Just brings up the Message Log without having to know the passcode.
- if(!hacking)
- usr << "BZZT.. The console beeps and brings up the Message Logs."
- screen = 1
- else
- usr << "It looks like the console is already being hacked into."
+ // 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.
+ // It'll take more time if there's more characters in the password..
+ if(!emag)
+ icon_state = hack_icon // An error screen I made in the computers.dmi
+ emag = 1
+ 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 += "
£%@%(*$%&(£&?*(%&£/{}"
+ 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 << "It is too hot to mess with!"
+ return
+
..()
return
@@ -34,33 +72,42 @@
return
if(!istype(user, /mob/living))
return
+ //If the computer is being hacked or is emagged, display the reboot message.
+ if(hacking || emag)
+ message = rebootmsg
var/dat = "
Message Monitor Console"
dat += "Message Monitor Console
"
+ dat += ""
switch(screen)
//Main menu
if(0)
- if(hacking)
+ if(hacking || emag)
screen = 2
return src.attack_hand(user)
+ // = TAB
if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
- dat += "1. ERROR: Server not found
"
+ dat += " ERROR: Server not found
"
else
- dat += "1. Toggle Power: [src.linkedServer.active ? "\[On\]":"\[Off\]"]
"
- dat += "2. Link To A Server
"
- dat += "3. Clear Message Logs
"
- dat += " KEY REQUIRED
"
- dat += "4. View Message Logs
"
- dat += "5. Set Custom Key
"
+ dat += " 1. Toggle Power: [src.linkedServer.active ? "\[On\]":"\[Off\]"]
"
+ dat += " 2. Link To A Server
"
+ dat += " KEY REQUIRED
"
+ dat += " 3. View Message Logs
"
+ dat += " 4. View Request Console Logs "
+ dat += " 5. Clear Message Logs
"
+ dat += " 6. Clear Request Console Logs
"
+ dat += " 7. Set Custom Key
"
+ dat += " 8. Send Admin Message
"
//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))
- dat += "*&@. Bruteforce Key
"
+ dat += "*&@#. Bruteforce Key
"
+
//Message Logs
if(1)
- if(hacking)
+ if(hacking || emag)
screen = 2
return src.attack_hand(user)
if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
- usr << "No server detected."
+ message = noserver
screen = 0
return src.attack_hand(user)
@@ -68,50 +115,120 @@
//var/recipient = "Unspecified" //name of the person
//var/sender = "Unspecified" //name of the sender
//var/message = "Blank" //transferred message
- dat += "Return - Refresh
"
- dat += "| Sender | Recipient | Message |
"
- for(var/list/datum/data_pda_msg/pda in src.linkedServer.pda_msgs)
+ dat += "Back - Refresh
"
+ dat += "| X | Sender | Recipient | Message |
"
+ for(var/datum/data_pda_msg/pda in src.linkedServer.pda_msgs)
index++
if(index > 3000)
break
- dat += "| [pda.sender] | [pda.recipient] | [pda.message] |
"
+ // Del - Sender - Recepient - Message
+ // X - Al Green - Your Mom - WHAT UP!?
+ dat += "| X | [pda.sender] | [pda.recipient] | [pda.message] |
"
dat += "
"
//Hacking screen.
if(2)
- if(!hacking)
+ if(!hacking && !emag)
screen = 0
return src.attack_hand(user)
if(istype(user, /mob/living/silicon/ai) || istype(user, /mob/living/silicon/robot))
- dat += "Brute-forcing for server key.
This will take anywhere from two to five minutes."
+ dat += "Brute-forcing for server key.
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."
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.
- dat += {"010101000110100001101001011100110010000001110111011010010110110
- 0011011000010000001110100011000010110101101100101001000000110000101101110
- 01111001011101110110100001100101011100100110010100100000011001100111001001
- 10111101101101001000000111010001110111011011110010000001110100011011110010
- 00000110011001101001011101100110010100100000011011010110100101101110011101
- 01011101000110010101110011001011100010000001001001011011100010000001110100
- 01101000011001010010000001101101011001010110000101101110001011010111010001
- 10100101101101011001010010110000100000011101000110100001101001011100110010
- 00000110001101101111011011100111001101101111011011000110010100100000011000
- 11011000010110111000100000011100100110010101110110011001010110000101101100
- 00100000011110010110111101110101011100100010000001110100011100100111010101
- 10010100100000011010010110111001110100011001010110111001110100011010010110
- 11110110111001110011001000000110100101100110001000000111100101101111011101
- 01001000000110110001100101011101000010000001110011011011110110110101100101
- 01101111011011100110010100100000011000010110001101100011011001010111001101
- 11001100100000011010010111010000101110001000000100110101100001011010110110
- 01010010000001110011011101010111001001100101001000000110111001101111001000
- 00011010000111010101101101011000010110111001110011001000000110010101101110
- 01110100011001010111001000100000011101000110100001100101001000000111001001
- 10111101101111011011010010000001100100011101010111001001101001011011100110
- 01110010000001110100011010000110000101110100001000000111010001101001011011
- 010110010100101110"}
+ dat += {"01000010011100100111010101110100011001010010110
+ 10110011001101111011100100110001101101001011011100110011
+ 10010000001100110011011110111001000100000011100110110010
+ 10111001001110110011001010111001000100000011010110110010
+ 10111100100101110001000000100100101110100001000000111011
+ 10110100101101100011011000010000001110100011000010110101
+ 10110010100100000001100100011000000100000011100110110010
+ 10110001101101111011011100110010001110011001000000110011
+ 00110111101110010001000000110010101110110011001010111001
+ 00111100100100000011000110110100001100001011100100110000
+ 10110001101110100011001010111001000100000011101000110100
+ 00110000101110100001000000111010001101000011001010010000
+ 00111000001100001011100110111001101110111011011110111001
+ 00110010000100000011010000110000101110011001011100010000
+ 00100100101101110001000000111010001101000011001010010000
+ 00110110101100101011000010110111001110100011010010110110
+ 10110010100101100001000000111010001101000011010010111001
+ 10010000001100011011011110110111001110011011011110110110
+ 00110010100100000011000110110000101101110001000000111001
+ 00110010101110110011001010110000101101100001000000111100
+ 10110111101110101011100100010000001110100011100100111010
+ 10110010100100000011010010110111001110100011001010110111
+ 00111010001101001011011110110111001110011001000000110100
+ 10110011000100000011110010110111101110101001000000110110
+ 00110010101110100001000000111001101101111011011010110010
+ 10110111101101110011001010010000001100001011000110110001
+ 10110010101110011011100110010000001101001011101000010111
+ 00010000001001101011000010110101101100101001000000111001
+ 10111010101110010011001010010000001101110011011110010000
+ 00110100001110101011011010110000101101110011100110010000
+ 00110010101101110011101000110010101110010001000000111010
+ 00110100001100101001000000111001001101111011011110110110
+ 10010000001100100011101010111001001101001011011100110011
+ 10010000001110100011010000110000101110100001000000111010
+ 001101001011011010110010100101110"}
+
+ //Fake messages
+ if(3)
+ if(hacking || emag)
+ screen = 2
+ return src.attack_hand(user)
+ dat += "Back - Reset
"
+
+ dat += {"
+ | Sender |
+ Recipient |
+ Recepient Job |
+ Message |
"}
+ //Sender - Recepient - Message
+ //Al Green - Your Mom - WHAT UP!?
+
+ dat += {"| [customsender] |
+ [customrecepient ? customrecepient.owner : "NONE"] |
+ [customjob] |
+ [custommessage] |
"}
+ dat += "
Send"
+
+ //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 += "Back - Refresh
"
+ dat += {"| X | Sending Dep. | Receiving Dep. |
+ Message | Stamp | ID Auth. | Priority. |
"}
+ 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 += {"| X | [rc.send_dpt] |
+ [rc.rec_dpt] | [rc.message] | [rc.stamp] | [rc.id_auth] | [rc.priority] |
"}
+ dat += "
"
dat += ""
- user << browse(dat, "window=message;size=500x700")
+ message = defaultmsg
+ user << browse(dat, "window=message;size=700x700")
onclose(user, "message")
return
@@ -122,8 +239,19 @@
var/currentKey = src.linkedServer.decryptkey
user << "Brute-force completed! The key is '[currentKey]'."
src.hacking = 0
+ src.icon_state = normal_icon
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)
if(..())
return
@@ -132,62 +260,210 @@
if(!istype(usr, /mob/living))
return
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"])
linkedServer.active = !linkedServer.active
-
+ //Find a server
if (href_list["find"])
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
- usr << "Server selected."
+ message = "NOTICE: Server selected."
else if(message_servers && message_servers.len > 0)
linkedServer = message_servers[1]
- usr << "Single Server Detected - Server selected."
+ message = "NOTICE: Only Single Server Detected - Server selected."
else
- usr << "No server detected."
+ message = noserver
+ //View the logs - KEY REQUIRED
if (href_list["view"])
if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- usr << "No server detected."
+ 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 = 1
else
- usr << "ALERT: Incorrect password!"
-
+ message = incorrectkey
+ //Clears the logs - KEY REQUIRED
if (href_list["clear"])
if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- usr << "No server detected."
+ message = noserver
else
- src.linkedServer.pda_msgs = list()
- usr << "Logs cleared."
-
+ var/dkey = trim(input(usr, "Please enter the decryption key.") as text|null)
+ if(dkey && dkey != "")
+ if(src.linkedServer.decryptkey == dkey)
+ src.linkedServer.pda_msgs = list()
+ message = "NOTICE: Logs cleared."
+ 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 = "NOTICE: Logs cleared."
+ else
+ message = incorrectkey
+ //Change the password - KEY REQUIRED
if (href_list["pass"])
if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- usr << "No server detected."
+ message = noserver
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 == src.linkedServer.decryptkey)
- var/newkey = trim(input(usr,"Please enter the new key."))
- if(newkey && newkey != "")
+ var/newkey = trim(input(usr,"Please enter the new key (3 - 16 characters max):"))
+ if(length(newkey) <= 3)
+ message = "NOTICE: Decryption key too short!"
+ else if(length(newkey) > 16)
+ message = "NOTICE: Decryption key too long!"
+ else if(newkey && newkey != "")
src.linkedServer.decryptkey = newkey
- usr << "Password set."
- else
- usr << "ALERT: Incorrect password!"
+ message = "NOTICE: Decryption key set."
+ else
+ message = incorrectkey
+ //Hack the Console to get the password
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))
src.hacking = 1
src.screen = 2
- //usr << "[src.linkedServer.decryptkey]"
- spawn((100*6)*rand(2, 4))
+ src.icon_state = hack_icon
+ //Time it takes to bruteforce is dependant on the password length.
+ spawn(100*length(src.linkedServer.decryptkey))
if(src && src.linkedServer && 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 = "NOTICE: Log Deleted!"
+ //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 = "NOTICE: Log Deleted!"
+ //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 = "NOTICE: No recepient selected!"
+ return src.attack_hand(usr)
+
+ if(isnull(custommessage) || custommessage == "")
+ message = "NOTICE: No message entered!"
+ 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 += "← From [customsender] ([customjob]):
[custommessage]
"
+ 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] Message from [customsender] ([customjob]), \"[custommessage]\" (Reply)"
+ 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 += "← From [PDARec.owner] ([customjob]):
[custommessage]
"
+ 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] Message from [PDARec.owner] ([customjob]), \"[custommessage]\" (Reply)"
+ 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"])
src.screen = 0
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index 19390cfb4a8..d36270da666 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -248,46 +248,55 @@ var/list/obj/machinery/requests_console/allConsoles = list()
sending += "
"
screen = 7 //if it's successful, this will get overrwritten (7 = unsufccessfull, 6 = successfull)
if (sending)
+ var/pass = 0
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)
+ pass = 1
- for (var/obj/machinery/requests_console/Console in allConsoles)
- if (ckey(Console.department) == ckey(href_list["department"]))
+ if(pass)
- switch(priority)
- if("2") //High priority
- 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 += "High Priority message from [department]
[sending]"
+ for (var/obj/machinery/requests_console/Console in allConsoles)
+ if (ckey(Console.department) == ckey(href_list["department"]))
- // if("3") //Not implemanted, but will be //Removed as it doesn't look like anybody intends on implimenting it ~Carn
- // if(Console.newmessagepriority < 3)
- // Console.newmessagepriority = 3
- // Console.icon_state = "req_comp3"
- // if(!Console.silent)
- // playsound(Console.loc, 'twobeep.ogg', 50, 1)
- // for (var/mob/O in hearers(7, Console.loc))
- // O.show_message(text("\icon[Console] *The Requests Console yells: 'EXTREME PRIORITY alert in [department]'"))
- // Console.messages += "Extreme Priority message from [ckey(department)]
[message]"
+ switch(priority)
+ if("2") //High priority
+ 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 += "High Priority message from [department]
[sending]"
- 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 += "Message from [department]
[message]"
+ // if("3") //Not implemanted, but will be //Removed as it doesn't look like anybody intends on implimenting it ~Carn
+ // if(Console.newmessagepriority < 3)
+ // Console.newmessagepriority = 3
+ // Console.icon_state = "req_comp3"
+ // if(!Console.silent)
+ // playsound(Console.loc, 'twobeep.ogg', 50, 1)
+ // for (var/mob/O in hearers(7, Console.loc))
+ // O.show_message(text("\icon[Console] *The Requests Console yells: 'EXTREME PRIORITY alert in [department]'"))
+ // Console.messages += "Extreme Priority message from [ckey(department)]
[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 += "Message from [department]
[message]"
+
+ screen = 6
+ Console.luminosity = 2
+ messages += "Message sent to [dpt]
[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 += "Message sent to [dpt]
[message]"
//Handle screen switching
switch(text2num(href_list["setScreen"]))
diff --git a/code/game/magic/musician.dm b/code/game/magic/musician.dm
index caf0cc6266d..239a87b122b 100644
--- a/code/game/magic/musician.dm
+++ b/code/game/magic/musician.dm
@@ -15,6 +15,7 @@
var/playing = 0
var/help = 0
var/edit = 1
+ var/repeat = 0
proc
playnote(var/note as text)
@@ -368,42 +369,44 @@
M << sound(soundfile)
playsong()
- var/cur_oct[7]
- var/cur_acc[7]
- for(var/i = 1 to 7)
- cur_oct[i] = "3"
- cur_acc[i] = "n"
+ do
+ var/cur_oct[7]
+ var/cur_acc[7]
+ for(var/i = 1 to 7)
+ cur_oct[i] = "3"
+ cur_acc[i] = "n"
- for(var/line in song.lines)
- //world << line
- for(var/beat in dd_text2list(lowertext(line), ","))
- //world << "beat: [beat]"
- var/list/notes = dd_text2list(beat, "/")
- for(var/note in dd_text2list(notes[1], "-"))
- //world << "note: [note]"
- if(!playing || !anchored)//If the piano is playing, or is loose
- playing = 0
- return
- if(lentext(note) == 0)
- continue
- //world << "Parse: [copytext(note,1,2)]"
- var/cur_note = text2ascii(note) - 96
- if(cur_note < 1 || cur_note > 7)
- continue
- for(var/i=2 to lentext(note))
- var/ni = copytext(note,i,i+1)
- if(!text2num(ni))
- if(ni == "#" || ni == "b" || ni == "n")
- cur_acc[cur_note] = ni
- else if(ni == "s")
- cur_acc[cur_note] = "#" // so shift is never required
- else
- cur_oct[cur_note] = ni
- playnote(uppertext(copytext(note,1,2)) + cur_acc[cur_note] + cur_oct[cur_note])
- if(notes.len >= 2 && text2num(notes[2]))
- sleep(song.tempo / text2num(notes[2]))
- else
- sleep(song.tempo)
+ for(var/line in song.lines)
+ //world << line
+ for(var/beat in dd_text2list(lowertext(line), ","))
+ //world << "beat: [beat]"
+ var/list/notes = dd_text2list(beat, "/")
+ for(var/note in dd_text2list(notes[1], "-"))
+ //world << "note: [note]"
+ if(!playing || !anchored)//If the piano is playing, or is loose
+ playing = 0
+ return
+ if(lentext(note) == 0)
+ continue
+ //world << "Parse: [copytext(note,1,2)]"
+ var/cur_note = text2ascii(note) - 96
+ if(cur_note < 1 || cur_note > 7)
+ continue
+ for(var/i=2 to lentext(note))
+ var/ni = copytext(note,i,i+1)
+ if(!text2num(ni))
+ if(ni == "#" || ni == "b" || ni == "n")
+ cur_acc[cur_note] = ni
+ else if(ni == "s")
+ cur_acc[cur_note] = "#" // so shift is never required
+ else
+ cur_oct[cur_note] = ni
+ playnote(uppertext(copytext(note,1,2)) + cur_acc[cur_note] + cur_oct[cur_note])
+ if(notes.len >= 2 && text2num(notes[2]))
+ sleep(song.tempo / text2num(notes[2]))
+ else
+ sleep(song.tempo)
+ while(repeat)
playing = 0
updateUsrDialog()
@@ -417,9 +420,10 @@
if(song)
if(song.lines.len > 0 && !(playing))
dat += "Play Song
"
+ dat += "Repeat Song: [repeat ? "Yes" : "No"]
"
if(playing)
- dat += "Stop Playing
"
-
+ dat += "Stop Playing
"
+ dat += "Repeat Song: [repeat ? "Yes" : "No"]
"
if(!edit)
dat += "Show Editor
"
else
@@ -460,7 +464,11 @@
onclose(user, "piano")
Topic(href, href_list)
+
if(in_range(src, usr) && !issilicon(usr) && anchored)
+ if(href_list["repeat"])
+ repeat = !repeat
+
if(href_list["tempo"])
song.tempo += text2num(href_list["tempo"])
if(song.tempo < 1)
@@ -531,6 +539,7 @@
song.lines = lines
song.tempo = tempo
updateUsrDialog()
+
add_fingerprint(usr)
updateUsrDialog()
return
diff --git a/code/game/objects/devices/PDA/PDA.dm b/code/game/objects/devices/PDA/PDA.dm
index 1741daad358..a9c44b25154 100644
--- a/code/game/objects/devices/PDA/PDA.dm
+++ b/code/game/objects/devices/PDA/PDA.dm
@@ -1,6 +1,9 @@
//The advanced pea-green monochrome lcd of tomorrow.
+var/global/list/obj/item/device/pda/PDAs = list()
+
+
/obj/item/device/pda
name = "PDA"
desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a preprogrammed ROM cartridge."
@@ -182,6 +185,7 @@
/obj/item/device/pda/New()
..()
+ PDAs += src
spawn(3)
if (default_cartridge)
cartridge = new default_cartridge(src)
@@ -331,7 +335,7 @@
var/count = 0
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
dat += "[P]"
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate))
@@ -1008,6 +1012,7 @@
return
/obj/item/device/pda/Del()
+ PDAs -= src
if (src.id)
src.id.loc = get_turf(src.loc)
..()
@@ -1042,7 +1047,7 @@
usr << "You can't send PDA messages because you are dead!"
return
- for (var/obj/item/device/pda/P in world)
+ for (var/obj/item/device/pda/P in PDAs)
if (!P.owner)
continue
else if (P == src)
diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm
index 58562fb5aa9..42d78f72ea6 100644
--- a/code/modules/mob/living/carbon/metroid/life.dm
+++ b/code/modules/mob/living/carbon/metroid/life.dm
@@ -87,20 +87,20 @@
var/hungry = 0 // determines if the metroid is 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)
- if(400 to 1100) hungry = 1
- if(0 to 399)
+ if(301 to 600) hungry = 1
+ if(0 to 300)
starving = 1
else
- switch(nutrition)
- if(150 to 800) hungry = 1
- if(0 to 149) starving = 1
+ switch(nutrition) // 1000 max nutrition
+ if(201 to 500) hungry = 1
+ if(0 to 200) starving = 1
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
for(var/mob/M in Friends)
friendnum++
@@ -504,8 +504,8 @@
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)
var/mob/living/carbon/metroid/M = new/mob/living/carbon/metroid(loc)
- M.nutrition = round(nutrition/number)
- M.powerlevel = round(powerlevel / number)
+ M.nutrition = round(nutrition * 0.9)
+ M.powerlevel = round(powerlevel/number)
M.Friends = Friends
M.tame = tame
M.rabid = rabid
@@ -518,6 +518,7 @@
if(!client)
var/mob/living/carbon/metroid/adult/A = new/mob/living/carbon/metroid/adult(src.loc)
A.nutrition = nutrition
+ A.nutrition += 100
A.powerlevel = max(0, powerlevel-1)
A.Friends = Friends
A.tame = tame
diff --git a/code/modules/mob/living/carbon/metroid/powers.dm b/code/modules/mob/living/carbon/metroid/powers.dm
index 63169dedad6..d42a6f3cd09 100644
--- a/code/modules/mob/living/carbon/metroid/powers.dm
+++ b/code/modules/mob/living/carbon/metroid/powers.dm
@@ -76,6 +76,7 @@
if(Victim.health <= 0)
Victim.adjustToxLoss(rand(2,4))
+ // Heal yourself
adjustToxLoss(-10)
adjustOxyLoss(-10)
adjustBruteLoss(-10)
@@ -136,7 +137,8 @@
if(Victim && !rabid && !attacked)
if(Victim.LAssailant && Victim.LAssailant != Victim)
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(prob(85))
@@ -205,7 +207,7 @@
var/list/babies = list()
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)
- M.nutrition = round(nutrition/number)
+ M.nutrition = round(nutrition * 0.9)
M.powerlevel = round(powerlevel / number)
if(i != 1) step_away(M,src)
babies += M
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index d6a96e50a69..8d0b6fb83a0 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -45,12 +45,17 @@
set src in oview(1)
// ..() //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)))
- usr << browse("[name][stars(info)][stamps]", "window=[name]")
- onclose(usr, "[name]")
+ // I didn't like the idea that people can read tiny pieces of paper from across the room.
+ // Now you need to be next to the paper in order to read it.
+ if(in_range(usr, src))
+ if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)))
+ usr << browse("[name][stars(info)][stamps]", "window=[name]")
+ onclose(usr, "[name]")
+ else
+ usr << browse("[name][info][stamps]", "window=[name]")
+ onclose(usr, "[name]")
else
- usr << browse("[name][info][stamps]", "window=[name]")
- onclose(usr, "[name]")
+ usr << "It is too far away."
return
/obj/item/weapon/paper/verb/rename()
@@ -155,7 +160,7 @@
t = dd_replacetext(t, "\[/i\]", "")
t = dd_replacetext(t, "\[u\]", "")
t = dd_replacetext(t, "\[/u\]", "")
- t = dd_replacetext(t, "\[large\]", "")
+ t = dd_replacetext(t, "\[large\]", "")
t = dd_replacetext(t, "\[/large\]", "")
t = dd_replacetext(t, "\[sign\]", "[user.real_name]")
t = dd_replacetext(t, "\[field\]", "")
@@ -190,6 +195,7 @@
return t
+
/obj/item/weapon/paper/proc/openhelp(mob/user as mob)
user << browse({"Pen Help
diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm
index 42496f73c96..d9e41f1b25a 100644
--- a/code/modules/research/message_server.dm
+++ b/code/modules/research/message_server.dm
@@ -1,4 +1,4 @@
-var/global/list/message_servers = list()
+var/global/list/obj/machinery/message_server/message_servers = list()
/datum/data_pda_msg
var/recipient = "Unspecified" //name of the person
@@ -6,6 +6,7 @@ var/global/list/message_servers = list()
var/message = "Blank" //transferred message
/datum/data_pda_msg/New(var/param_rec = "",var/param_sender = "",var/param_message = "")
+
if(param_rec)
recipient = param_rec
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_rc_msg/rc_msgs = list()
var/active = 1
- var/decryptkey = "password";
+ var/decryptkey = "password"
/obj/machinery/message_server/New()
message_servers += src
- decryptkey = generateKey()
+ decryptkey = GenerateKey()
send_pda_message("System Administrator", "system", "This is an automated message. The messaging system is functioning correctly.")
..()
return
@@ -70,10 +71,10 @@ var/global/list/message_servers = list()
..()
return
-/obj/machinery/message_server/proc/generateKey()
+/obj/machinery/message_server/proc/GenerateKey()
//Feel free to move to Helpers.
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("1", "2", "3", "4", "5", "6", "7", "8", "9", "0")
return newKey
diff --git a/icons/obj/computer.dmi b/icons/obj/computer.dmi
index d5c8368af4d..1682c1fabc4 100644
Binary files a/icons/obj/computer.dmi and b/icons/obj/computer.dmi differ