mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Fixed pAI Digital Messenger and layout tweaks
Conflicts: code/game/objects/items/devices/PDA/PDA.dm
This commit is contained in:
@@ -338,7 +338,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return
|
||||
|
||||
lastmode = mode
|
||||
|
||||
|
||||
var/title = "Personal Data Assistant"
|
||||
|
||||
var/data[0] // This is the data that will be sent to the PDA
|
||||
@@ -367,7 +367,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(mode in cartmodes)
|
||||
data["records"] = cartridge.create_NanoUI_values()
|
||||
|
||||
if(mode == 0)
|
||||
if(mode == 0)
|
||||
cartdata["name"] = cartridge.name
|
||||
cartdata["access"] = list(\
|
||||
"access_security" = cartridge.access_security,\
|
||||
@@ -771,6 +771,71 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
return 1 // return 1 tells it to refresh the UI in NanoUI
|
||||
|
||||
|
||||
/obj/item/device/pda/proc/detonate_act(var/obj/item/device/pda/P)
|
||||
//TODO: sometimes these attacks show up on the message server
|
||||
var/i = rand(1,100)
|
||||
var/j = rand(0,1) //Possibility of losing the PDA after the detonation
|
||||
var/message = ""
|
||||
var/mob/living/M = null
|
||||
if(ismob(P.loc))
|
||||
M = P.loc
|
||||
|
||||
//switch(i) //Yes, the overlapping cases are intended.
|
||||
if(i<=10) //The traditional explosion
|
||||
P.explode()
|
||||
j=1
|
||||
message += "Your [P] suddenly explodes!"
|
||||
if(i>=10 && i<= 20) //The PDA burns a hole in the holder.
|
||||
j=1
|
||||
if(M && isliving(M))
|
||||
M.apply_damage( rand(30,60) , BURN)
|
||||
message += "You feel a searing heat! Your [P] is burning!"
|
||||
if(i>=20 && i<=25) //EMP
|
||||
empulse(P.loc, 3, 6, 1)
|
||||
message += "Your [P] emits a wave of electromagnetic energy!"
|
||||
if(i>=25 && i<=40) //Smoke
|
||||
var/datum/effect/effect/system/chem_smoke_spread/S = new /datum/effect/effect/system/chem_smoke_spread
|
||||
S.attach(P.loc)
|
||||
S.set_up(P, 10, 0, P.loc)
|
||||
playsound(P.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
S.start()
|
||||
message += "Large clouds of smoke billow forth from your [P]!"
|
||||
if(i>=40 && i<=45) //Bad smoke
|
||||
var/datum/effect/effect/system/bad_smoke_spread/B = new /datum/effect/effect/system/bad_smoke_spread
|
||||
B.attach(P.loc)
|
||||
B.set_up(P, 10, 0, P.loc)
|
||||
playsound(P.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
B.start()
|
||||
message += "Large clouds of noxious smoke billow forth from your [P]!"
|
||||
if(i>=65 && i<=75) //Weaken
|
||||
if(M && isliving(M))
|
||||
M.apply_effects(0,1)
|
||||
message += "Your [P] flashes with a blinding white light! You feel weaker."
|
||||
if(i>=75 && i<=85) //Stun and stutter
|
||||
if(M && isliving(M))
|
||||
M.apply_effects(1,0,0,0,1)
|
||||
message += "Your [P] flashes with a blinding white light! You feel weaker."
|
||||
if(i>=85) //Sparks
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(2, 1, P.loc)
|
||||
s.start()
|
||||
message += "Your [P] begins to spark violently!"
|
||||
if(i>45 && i<65 && prob(50)) //Nothing happens
|
||||
message += "Your [P] bleeps loudly."
|
||||
j = prob(10)
|
||||
|
||||
if(j) //This kills the PDA
|
||||
P.Del()
|
||||
if(message)
|
||||
message += "It melts in a puddle of plastic."
|
||||
else
|
||||
message += "Your [P] shatters in a thousand pieces!"
|
||||
|
||||
if(M && isliving(M))
|
||||
message = "\red" + message
|
||||
M.show_message(message, 1)
|
||||
|
||||
/obj/item/device/pda/proc/remove_id()
|
||||
if (id)
|
||||
if (ismob(loc))
|
||||
@@ -805,7 +870,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/obj/machinery/message_server/useMS = null
|
||||
if(message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
//PDAs are now dependant on the Message Server.
|
||||
//PDAs are now dependent on the Message Server.
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
@@ -824,8 +889,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
t = Gibberish(t, signal.data["compression"] + 50)
|
||||
|
||||
if(useMS && useTC) // only send the message if it's stable
|
||||
if(useTC != 2) // Does our recepient have a broadcaster on their level?
|
||||
U << "ERROR: Cannot reach recepient."
|
||||
if(useTC != 2) // Does our recipient have a broadcaster on their level?
|
||||
U << "ERROR: Cannot reach recipient."
|
||||
return
|
||||
useMS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
tnote.Add(list(list("sent" = 1, "owner" = "[P.owner]", "job" = "[P.ownjob]", "message" = "[t]", "target" = "\ref[P]")))
|
||||
@@ -867,7 +932,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
if(L)
|
||||
L << "\icon[P] <b>Message from [src.owner] ([ownjob]), </b>\"[t]\" (<a href='byond://?src=\ref[P];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
|
||||
nanomanager.update_user_uis(L, P) // Update the recieving user's PDA UI so that they can see the new message
|
||||
nanomanager.update_user_uis(L, P) // Update the receiving user's PDA UI so that they can see the new message
|
||||
|
||||
nanomanager.update_user_uis(U, P) // Update the sending user's PDA UI so that they can see the new message
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
if(temp)
|
||||
left_part = temp
|
||||
else if(src.stat == 2) // Show some flavor text if the pAI is dead
|
||||
left_part = "<b><font color=red>ÈRrÖR Ða†Ä ÇÖRrÚþ†Ìoñ</font></b>" //This file has to be save as ANSI or this will not display correctly
|
||||
left_part = "<b><font color=red>ÈRrÖR Ða†Ä ÇÖRrÚþ†Ìoñ</font></b>" //This file has to be saved as ANSI or this will not display correctly
|
||||
right_part = "<pre>Program index hash not found</pre>"
|
||||
|
||||
else
|
||||
@@ -75,19 +75,19 @@
|
||||
<html>
|
||||
<head>
|
||||
<style type=\"text/css\">
|
||||
body { background-image:url(\"painew.png\"); background-color:#333333; background-repeat:no-repeat; margin-top:14px; margin-left:2px; }
|
||||
body { background-image:url(\"painew.png\"); background-color:#333333; background-repeat:no-repeat; margin-top:12px; margin-left:4px; }
|
||||
|
||||
#header { text-align:center; color:white; font-size: 30px; height: 37px; width: 660px; letter-spacing: 2px; z-index: 4; font-family:\"Courier New\"; font-weight:bold; }
|
||||
#content { position: absolute; left: 10px; height: 320px; width: 640px; z-index: 0; font-family: \"Verdana\"; font-size:13px; }
|
||||
p { font-size:13px; }
|
||||
|
||||
#leftmenu {color: #CCCCCC; padding:12px; width: 399px; height: 381px; overflow: auto; min-height: 330px; position: absolute; z-index: 0; }
|
||||
#leftmenu {color: #CCCCCC; padding:12px; width: 388px; height: 371px; overflow: auto; min-height: 330px; position: absolute; z-index: 0; }
|
||||
#leftmenu a:link { color: #CCCCCC; }
|
||||
#leftmenu a:hover { color: #CC3333; }
|
||||
#leftmenu a:visited { color: #CCCCCC; }
|
||||
#leftmenu a:active { color: #CCCCCC; }
|
||||
|
||||
#rightmenu {color: #CCCCCC; padding:12px; width: 209px; height: 381px; overflow: auto; min-height: 330px; left: 420px; position: absolute; z-index: 0; }
|
||||
#rightmenu {color: #CCCCCC; padding:12px; width: 209px; height: 371px; overflow: auto; min-height: 330px; left: 420px; position: absolute; z-index: 0; }
|
||||
#rightmenu a:link { color: #CCCCCC; }
|
||||
#rightmenu a:hover { color: #CC3333; }
|
||||
#rightmenu a:visited { color: #CCCCCC; }
|
||||
@@ -108,7 +108,7 @@
|
||||
</div>
|
||||
</body>
|
||||
</html>"}
|
||||
usr << browse(dat, "window=pai;size=680x470;border=0;can_close=1;can_resize=1;can_minimize=1;titlebar=1")
|
||||
usr << browse(dat, "window=pai;size=685x449;border=0;can_close=1;can_resize=1;can_minimize=1;titlebar=1")
|
||||
onclose(usr, "pai")
|
||||
temp = null
|
||||
return
|
||||
@@ -291,7 +291,7 @@
|
||||
dat += "<b>Basic</b> <br>"
|
||||
for(var/s in src.software)
|
||||
if(s == "digital messenger")
|
||||
dat += "<a href='byond://?src=\ref[src];software=pdamessage;sub=0'>Digital Messenger</a> [(src.secHUD) ? "<font color=#55FF55>•</font>" : "<font color=#FF5555>•</font>"] <br>"
|
||||
dat += "<a href='byond://?src=\ref[src];software=pdamessage;sub=0'>Digital Messenger</a> [(pda.toff) ? "<font color=#FF5555>•</font>" : "<font color=#55FF55>•</font>"] <br>"
|
||||
if(s == "crew manifest")
|
||||
dat += "<a href='byond://?src=\ref[src];software=manifest;sub=0'>Crew Manifest</a> <br>"
|
||||
if(s == "medical records")
|
||||
@@ -311,11 +311,11 @@
|
||||
dat += "<a href='byond://?src=\ref[src];software=atmosensor;sub=0'>Atmospheric Sensor</a> <br>"
|
||||
if(s == "heartbeat sensor")
|
||||
dat += "<a href='byond://?src=\ref[src];software=[s]'>Heartbeat Sensor</a> <br>"
|
||||
if(s == "security HUD") //This file has to be save as ANSI or this will not display correctly
|
||||
if(s == "security HUD") //This file has to be saved as ANSI or this will not display correctly
|
||||
dat += "<a href='byond://?src=\ref[src];software=securityhud;sub=0'>Facial Recognition Suite</a> [(src.secHUD) ? "<font color=#55FF55>•</font>" : "<font color=#FF5555>•</font>"] <br>"
|
||||
if(s == "medical HUD") //This file has to be save as ANSI or this will not display correctly
|
||||
if(s == "medical HUD") //This file has to be saved as ANSI or this will not display correctly
|
||||
dat += "<a href='byond://?src=\ref[src];software=medicalhud;sub=0'>Medical Analysis Suite</a> [(src.medHUD) ? "<font color=#55FF55>•</font>" : "<font color=#FF5555>•</font>"] <br>"
|
||||
if(s == "universal translator") //This file has to be save as ANSI or this will not display correctly
|
||||
if(s == "universal translator") //This file has to be saved as ANSI or this will not display correctly
|
||||
dat += "<a href='byond://?src=\ref[src];software=translator;sub=0'>Universal Translator</a> [(src.universal_speak) ? "<font color=#55FF55>•</font>" : "<font color=#FF5555>•</font>"] <br>"
|
||||
if(s == "projection array")
|
||||
dat += "<a href='byond://?src=\ref[src];software=projectionarray;sub=0'>Projection Array</a> <br>"
|
||||
@@ -643,5 +643,14 @@
|
||||
dat += "<li><a href='byond://?src=\ref[src];software=pdamessage;target=\ref[P]'>[P]</a>"
|
||||
dat += "</li>"
|
||||
dat += "</ul>"
|
||||
dat += "Messages: <hr> [pda.tnote]"
|
||||
dat += "Messages: <hr>"
|
||||
|
||||
dat += "<style>td.a { vertical-align:top; }</style>"
|
||||
dat += "<table>"
|
||||
for(var/index in pda.tnote)
|
||||
if(index["sent"])
|
||||
dat += addtext("<tr><td class='a'><i><b>To</b></i></td><td class='a'><i><b>→</b></i></td><td><i><b><a href='byond://?src=\ref[src];software=pdamessage;target=",index["src"],"'>", index["owner"],"</a>: </b></i>", index["message"], "<br></td></tr>")
|
||||
else
|
||||
dat += addtext("<tr><td class='a'><i><b>From</b></i></td><td class='a'><i><b>→</b></i></td><td><i><b><a href='byond://?src=\ref[src];software=pdamessage;target=",index["target"],"'>", index["owner"],"</a>: </b></i>", index["message"], "<br></td></tr>")
|
||||
dat += "</table>"
|
||||
return dat
|
||||
Reference in New Issue
Block a user