mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
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 += "<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>"
|
||||
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()
|
||||
|
||||
@@ -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 = "<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/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)
|
||||
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 << "<span class='warning'>BZZT.. The console beeps and brings up the Message Logs.</span>"
|
||||
screen = 1
|
||||
else
|
||||
usr << "<span class='notice'>It looks like the console is already being hacked into.</span>"
|
||||
// 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 += "<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
|
||||
|
||||
@@ -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 = "<head><title>Message Monitor Console</title></head><body>"
|
||||
dat += "<center><h2>Message Monitor Console</h2></center><hr>"
|
||||
dat += "<center><h4><font color='blue'[message]</h5></center>"
|
||||
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<br>"
|
||||
dat += "<dd><A>	ERROR: Server not found</A><br></dd>"
|
||||
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 += "<A href='?src=\ref[src];find=1'>2. Link To A Server</a><br>"
|
||||
dat += "<A href='?src=\ref[src];clear=1'>3. Clear Message Logs</a><hr>"
|
||||
dat += "<font color='red'> KEY REQUIRED</font><br>"
|
||||
dat += "<A href='?src=\ref[src];view=1'>4. View Message Logs </a><br>"
|
||||
dat += "<A href='?src=\ref[src];pass=1'>5. Set Custom Key</a><hr><br>"
|
||||
dat += "<dd><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></dd>"
|
||||
dat += "<dd><A href='?src=\ref[src];find=1'>	2. Link To A Server</a><hr></dd>"
|
||||
dat += "<dd><font color='red'> KEY REQUIRED</font></dd><hr>"
|
||||
dat += "<dd><A href='?src=\ref[src];view=1'>	3. View Message Logs </a><br></dd>"
|
||||
dat += "<dd><A href='?src=\ref[src];viewr=1'>	4. View Request Console Logs </a></br></dd>"
|
||||
dat += "<dd><A href='?src=\ref[src];clear=1'>	5. Clear Message Logs</a><br></dd>"
|
||||
dat += "<dd><A href='?src=\ref[src];clearr=1'>	6. Clear Request Console Logs</a><br></dd>"
|
||||
dat += "<dd><A href='?src=\ref[src];pass=1'>	7. Set Custom Key</a><br></dd>"
|
||||
dat += "<dd><A href='?src=\ref[src];msg=1'>	8. Send Admin Message</a><hr><br></dd>"
|
||||
//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 += "<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
|
||||
if(1)
|
||||
if(hacking)
|
||||
if(hacking || emag)
|
||||
screen = 2
|
||||
return src.attack_hand(user)
|
||||
if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
|
||||
usr << "<span class='notice'>No server detected.</span>"
|
||||
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 += "<center><A href='?src=\ref[src];back=1'>Return</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>"
|
||||
for(var/list/datum/data_pda_msg/pda in src.linkedServer.pda_msgs)
|
||||
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%'>Sender</th><th width='15%'>Recipient</th><th width='300px' word-wrap: break-word>Message</th></tr>"
|
||||
for(var/datum/data_pda_msg/pda in src.linkedServer.pda_msgs)
|
||||
index++
|
||||
if(index > 3000)
|
||||
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>"
|
||||
//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.<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."
|
||||
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<br>
|
||||
10110011001101111011100100110001101101001011011100110011<br>
|
||||
10010000001100110011011110111001000100000011100110110010<br>
|
||||
10111001001110110011001010111001000100000011010110110010<br>
|
||||
10111100100101110001000000100100101110100001000000111011<br>
|
||||
10110100101101100011011000010000001110100011000010110101<br>
|
||||
10110010100100000001100100011000000100000011100110110010<br>
|
||||
10110001101101111011011100110010001110011001000000110011<br>
|
||||
00110111101110010001000000110010101110110011001010111001<br>
|
||||
00111100100100000011000110110100001100001011100100110000<br>
|
||||
10110001101110100011001010111001000100000011101000110100<br>
|
||||
00110000101110100001000000111010001101000011001010010000<br>
|
||||
00111000001100001011100110111001101110111011011110111001<br>
|
||||
00110010000100000011010000110000101110011001011100010000<br>
|
||||
00100100101101110001000000111010001101000011001010010000<br>
|
||||
00110110101100101011000010110111001110100011010010110110<br>
|
||||
10110010100101100001000000111010001101000011010010111001<br>
|
||||
10010000001100011011011110110111001110011011011110110110<br>
|
||||
00110010100100000011000110110000101101110001000000111001<br>
|
||||
00110010101110110011001010110000101101100001000000111100<br>
|
||||
10110111101110101011100100010000001110100011100100111010<br>
|
||||
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>"
|
||||
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 << "<span class='warning'>Brute-force completed! The key is '[currentKey]'.</span>"
|
||||
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.</span>"
|
||||
message = "<span class='alert'>NOTICE: Server selected.</span>"
|
||||
else if(message_servers && message_servers.len > 0)
|
||||
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
|
||||
usr << "<span class='notice'>No server detected.</span>"
|
||||
message = noserver
|
||||
|
||||
//View the logs - KEY REQUIRED
|
||||
if (href_list["view"])
|
||||
if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
|
||||
usr << "<span class='notice'>No server detected.</span>"
|
||||
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 << "<span class='warning'>ALERT: Incorrect password!</span>"
|
||||
|
||||
message = incorrectkey
|
||||
|
||||
//Clears the logs - KEY REQUIRED
|
||||
if (href_list["clear"])
|
||||
if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
|
||||
usr << "<span class='notice'>No server detected.</span>"
|
||||
message = noserver
|
||||
else
|
||||
src.linkedServer.pda_msgs = list()
|
||||
usr << "<span class='notice'>Logs cleared.</span>"
|
||||
|
||||
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 = "<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(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
|
||||
usr << "<span class='notice'>No server detected.</span>"
|
||||
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 = "<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
|
||||
usr << "<span class='notice'>Password set.</span>"
|
||||
else
|
||||
usr << "<span class='warning'>ALERT: Incorrect password!</span>"
|
||||
message = "<span class='notice'>NOTICE: Decryption key set.</span>"
|
||||
|
||||
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 = "<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>← 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>← 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"])
|
||||
src.screen = 0
|
||||
|
||||
@@ -248,46 +248,55 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
sending += "<br>"
|
||||
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 += "<B><FONT color='red'>High Priority message from <A href='?src=\ref[Console];write=[ckey(department)]'>[department]</A></FONT></B><BR>[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 += "<B><FONT color='red'>Extreme Priority message from [ckey(department)]</FONT></B><BR>[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 += "<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(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]"
|
||||
// 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 += "<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
|
||||
switch(text2num(href_list["setScreen"]))
|
||||
|
||||
@@ -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 += "<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)
|
||||
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)
|
||||
dat += "<A href='?src=\ref[src];edit=2'>Show Editor</A><BR><BR>"
|
||||
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
|
||||
|
||||
@@ -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 += "<li><a href='byond://?src=\ref[src];choice=Message;target=\ref[P]'>[P]</a>"
|
||||
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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "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("<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
|
||||
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
|
||||
onclose(usr, "[name]")
|
||||
usr << "<span class='notice'>It is too far away.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/paper/verb/rename()
|
||||
@@ -155,7 +160,7 @@
|
||||
t = dd_replacetext(t, "\[/i\]", "</I>")
|
||||
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, "\[sign\]", "<font face=\"[signfont]\"><i>[user.real_name]</i></font>")
|
||||
t = dd_replacetext(t, "\[field\]", "<span class=\"paper_field\"></span>")
|
||||
@@ -190,6 +195,7 @@
|
||||
|
||||
return t
|
||||
|
||||
|
||||
/obj/item/weapon/paper/proc/openhelp(mob/user as mob)
|
||||
user << browse({"<HTML><HEAD><TITLE>Pen Help</TITLE></HEAD>
|
||||
<BODY>
|
||||
|
||||
@@ -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
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 65 KiB |
Reference in New Issue
Block a user