mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Cleaned up PDA code a litte more. Can again resize window. The close button is in the menu.
Toilets now work more like actual toilets. They will auto-flush when you insert a small object. You can also dunk people's heads into the toilet and try to choke them if you have a good grip. Fixed wiring near detective's office. Fixed larva and monkeys not being able to move on tables. Fixed larva not being able to crawl through vents. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1535 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
var/ttone = "beep" //The ringtone!
|
||||
var/honkamt = 0 //How many honks left when infected with honk.exe
|
||||
var/mimeamt = 0 //How many silence left when infected with mime.exe
|
||||
var/note = "Congratulations, your station has chosen the Thinktronic 5100 Personal Data Assistant!" //Current note in the notepad function.
|
||||
var/note = "Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant!" //Current note in the notepad function.
|
||||
var/cart = "" //A place to stick cartridge menu information
|
||||
|
||||
var/obj/item/weapon/integrated_uplink/uplink = null
|
||||
@@ -135,7 +135,7 @@
|
||||
else
|
||||
switch (mode)
|
||||
if (0)
|
||||
dat += "<h2>PERSONAL DATA ASSISTANT</h2>"
|
||||
dat += "<h2>PERSONAL DATA ASSISTANT v.1.2</h2>"
|
||||
dat += "Owner: [owner], [ownjob]<br>"
|
||||
dat += text("ID: <A href='?src=\ref[];choice=Authenticate'>[]</A><br>", src, (id ? "[id.registered], [id.assignment]" : "----------"))
|
||||
dat += "Station Time: [round(world.time / 36000)+12]:[(world.time / 600 % 60) < 10 ? add_zero(world.time / 600 % 60, 1) : world.time / 600 % 60]"//:[world.time / 100 % 6][world.time / 100 % 10]"
|
||||
@@ -214,13 +214,11 @@
|
||||
dat += "<a href='byond://?src=\ref[src];choice=21'><img src=pda_mail.png> Messages</a><br>"
|
||||
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate))
|
||||
dat += "<h4><a href='byond://?src=\ref[src];choice=22'> Hidden Menu</a><h4>"
|
||||
|
||||
dat += "<b>[cartridge:shock_charges] detonation charges left.</b><HR>"
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/clown))
|
||||
dat += "<h4><a href='byond://?src=\ref[src];choice=23'> Hidden Menu</a><h4>"
|
||||
|
||||
dat += "<b>[cartridge:honk_charges] viral files left.</b><HR>"
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/mime))
|
||||
dat += "<h4><a href='byond://?src=\ref[src];choice=24'> Hidden Menu</a><h4>"
|
||||
dat += "<b>[cartridge:mime_charges] viral files left.</b><HR>"
|
||||
|
||||
dat += "<h4><img src=pda_menu.png> Detected PDAs</h4>"
|
||||
|
||||
@@ -231,7 +229,13 @@
|
||||
if (!toff)
|
||||
for (var/obj/item/device/pda/P in world)
|
||||
if (!P.owner||P.toff||P == src) continue
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=\ref[P]'>[P]</a>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Message;target=\ref[P]'>[P]</a>"
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate))
|
||||
dat += " (<a href='byond://?src=\ref[src];choice=Detonate;target=\ref[P]'><img src=pda_boom.png>*Detonate*</a>)"
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/clown))
|
||||
dat += " (<a href='byond://?src=\ref[src];choice=Send Honk;target=\ref[P]'><img src=pda_honk.png>*Send Virus*</a>)"
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/mime))
|
||||
dat += " (<a href='byond://?src=\ref[src];choice=Send Silence;target=\ref[P]'>*Send Virus*</a>)"
|
||||
dat += "</li>"
|
||||
count++
|
||||
dat += "</ul>"
|
||||
@@ -247,51 +251,6 @@
|
||||
dat += tnote
|
||||
dat += "<br>"
|
||||
|
||||
if(22)
|
||||
dat += "<h4><img src=pda_mail.png> Datomatix</h4>"
|
||||
dat += "<b>[cartridge:shock_charges] detonation charges left.</b><HR>"
|
||||
dat += "<h4><img src=pda_menu.png> Detected PDAs</h4>"
|
||||
dat += "<ul>"
|
||||
var/count = 0
|
||||
for (var/obj/item/device/pda/P in world)
|
||||
if (!P.owner||P.toff||P == src) continue
|
||||
dat += " (<a href='byond://?src=\ref[src];choice=\ref[P]'><img src=pda_boom.png> <i>[P]</i> *Detonate*</a>)"
|
||||
dat += "</li>"
|
||||
count++
|
||||
dat += "</ul>"
|
||||
if (count == 0)
|
||||
dat += "None detected.<br>"
|
||||
|
||||
if(23)
|
||||
dat += "<h4><img src=pda_mail.png> Honk Attack!!</h4>"
|
||||
dat += "<b>[cartridge:honk_charges] viral files left.</b><HR>"
|
||||
dat += "<h4><img src=pda_menu.png> Detected PDAs</h4>"
|
||||
dat += "<ul>"
|
||||
var/count = 0
|
||||
for (var/obj/item/device/pda/P in world)
|
||||
if (!P.owner||P.toff||P == src) continue
|
||||
dat += " (<a href='byond://?src=\ref[src];choice=\ref[P]'><img src=pda_honk.png> <i>[P]</i> *Send Virus*</a>)"
|
||||
dat += "</li>"
|
||||
count++
|
||||
dat += "</ul>"
|
||||
if (count == 0)
|
||||
dat += "None detected.<br>"
|
||||
|
||||
if(24)
|
||||
dat += "<h4><img src=pda_mail.png> Silent but Deadly...</h4>"
|
||||
dat += "<b>[cartridge:mime_charges] viral files left.</b><HR>"
|
||||
dat += "<h4><img src=pda_menu.png> Detected PDAs</h4>"
|
||||
dat += "<ul>"
|
||||
var/count = 0
|
||||
for (var/obj/item/device/pda/P in world)
|
||||
if (!P.owner||P.toff||P == src) continue
|
||||
dat += " (<a href='byond://?src=\ref[src];choice=\ref[P]'> <i>[P]</i> *Send Virus*</a>)"
|
||||
dat += "</li>"
|
||||
count++
|
||||
dat += "</ul>"
|
||||
if (count == 0)
|
||||
dat += "None detected.<br>"
|
||||
|
||||
if (3)
|
||||
dat += "<h4><img src=pda_atmos.png> Atmospheric Readings</h4>"
|
||||
|
||||
@@ -324,7 +283,7 @@
|
||||
dat += cart
|
||||
|
||||
dat += "</body></html>"
|
||||
user << browse(dat, "window=pda;size=400x444;border=1;can_resize=0;can_close=0;can_minimize=0")
|
||||
user << browse(dat, "window=pda;size=400x444;border=1;can_resize=1;can_close=0;can_minimize=0")
|
||||
onclose(user, "pda", src)
|
||||
|
||||
/obj/item/device/pda/Topic(href, href_list)
|
||||
@@ -353,7 +312,7 @@
|
||||
mode = round(mode/10)
|
||||
if(mode==4)//Fix for cartridges. Redirects to hub.
|
||||
mode = 0
|
||||
else if(mode==44||mode==45)//Fix for cartridges. Redirects to refresh the menu.
|
||||
else if(mode >= 40 && mode <= 49)//Fix for cartridges. Redirects to refresh the menu.
|
||||
cartridge.mode = mode
|
||||
cartridge.unlock()
|
||||
if ("Authenticate")//Checks for ID
|
||||
@@ -395,12 +354,6 @@
|
||||
mode = 2
|
||||
if("21")//Read messeges
|
||||
mode = 21
|
||||
if("22")//Detonate PDAs
|
||||
mode = 22
|
||||
if("23")//Send honk virus
|
||||
mode = 23
|
||||
if("24")//Send silence virus
|
||||
mode = 24
|
||||
if("3")//Atmos scan
|
||||
mode = 3
|
||||
if("4")//Redirects to hub
|
||||
@@ -473,6 +426,70 @@
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
if("Message")
|
||||
var/t = input(U, "Please enter message", name, null) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, U) && loc != U)
|
||||
return
|
||||
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
|
||||
if (isnull(P)||P.toff || toff)
|
||||
return
|
||||
|
||||
if (last_text && world.time < last_text + 5)
|
||||
return
|
||||
|
||||
last_text = world.time
|
||||
|
||||
for (var/obj/machinery/message_server/MS in world)
|
||||
MS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
|
||||
tnote += "<i><b>→ To [P.owner]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];editnote=\ref[src]'>[owner]</a>:</b></i><br>[t]<br>"
|
||||
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
for (var/mob/living/silicon/ai/A in world)
|
||||
A.show_message("<i>Intercepted message from <b>[P:owner]</b>: [t]</i>")
|
||||
|
||||
if (!P.silent)
|
||||
playsound(P.loc, 'twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
O.show_message(text("\icon[P] *[P.ttone]*"))
|
||||
|
||||
P.overlays = null
|
||||
P.overlays += image('pda.dmi', "pda-r")
|
||||
if("Send Honk")//Honk virus
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/clown))
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge:honk_charges > 0)
|
||||
cartridge:honk_charges--
|
||||
U.show_message("\blue Virus sent!", 1)
|
||||
P.honkamt = (rand(15,20))
|
||||
updateUsrDialog()
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
if("Send Silence")//Silent virus
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/mime))
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge:mime_charges > 0)
|
||||
cartridge:mime_charges--
|
||||
U.show_message("\blue Virus sent!", 1)
|
||||
P.silent = 1
|
||||
P.ttone = "silence"
|
||||
updateUsrDialog()
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
|
||||
//SYNDICATE FUNCTIONS===================================
|
||||
|
||||
@@ -491,112 +508,46 @@
|
||||
uplink.active = 0
|
||||
note = uplink.orignote
|
||||
updateUsrDialog()
|
||||
if("Detonate")//Detonate PDA
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge:shock_charges > 0)
|
||||
cartridge:shock_charges--
|
||||
|
||||
var/difficulty = 0
|
||||
|
||||
if (!isnull(P.cartridge))
|
||||
difficulty += P.cartridge.access_medical
|
||||
difficulty += P.cartridge.access_security
|
||||
difficulty += P.cartridge.access_engine
|
||||
difficulty += P.cartridge.access_clown
|
||||
difficulty += P.cartridge.access_janitor
|
||||
difficulty += P.cartridge.access_manifest * 2
|
||||
else
|
||||
difficulty += 2
|
||||
|
||||
if ((prob(difficulty * 12)) || (P.uplink))
|
||||
U.show_message("\red An error flashes on your [src].", 1)
|
||||
else if (prob(difficulty * 3))
|
||||
U.show_message("\red Energy feeds back into your [src]!", 1)
|
||||
explode()
|
||||
else
|
||||
U.show_message("\blue Success!", 1)
|
||||
P.explode()
|
||||
updateUsrDialog()
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
|
||||
//LINK FUNCTIONS===================================
|
||||
|
||||
else//Else, redirects based on current menu
|
||||
switch(mode)
|
||||
if(0)//Cartridge menu linking
|
||||
mode = text2num(href_list["choice"])
|
||||
cartridge.mode = mode
|
||||
cartridge.unlock()
|
||||
if(2)//Message people.
|
||||
var/t = input(U, "Please enter message", name, null) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, U) && loc != U)
|
||||
return
|
||||
|
||||
var/obj/item/device/pda/P = locate(href_list["choice"])
|
||||
|
||||
if (isnull(P)||P.toff || toff)
|
||||
return
|
||||
|
||||
if (last_text && world.time < last_text + 5)
|
||||
return
|
||||
|
||||
last_text = world.time
|
||||
|
||||
for (var/obj/machinery/message_server/MS in world)
|
||||
MS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
|
||||
tnote += "<i><b>→ To [P.owner]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];editnote=\ref[src]'>[owner]</a>:</b></i><br>[t]<br>"
|
||||
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
for (var/mob/living/silicon/ai/A in world)
|
||||
A.show_message("<i>Intercepted message from <b>[P:owner]</b>: [t]</i>")
|
||||
|
||||
if (!P.silent)
|
||||
playsound(P.loc, 'twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
O.show_message(text("\icon[P] *[P.ttone]*"))
|
||||
|
||||
P.overlays = null
|
||||
P.overlays += image('pda.dmi', "pda-r")
|
||||
if(22)//Detonate PDA
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
|
||||
var/obj/item/device/pda/P = locate(href_list["choice"])
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge:shock_charges > 0)
|
||||
cartridge:shock_charges--
|
||||
|
||||
var/difficulty = 0
|
||||
|
||||
if (!isnull(P.cartridge))
|
||||
difficulty += P.cartridge.access_medical
|
||||
difficulty += P.cartridge.access_security
|
||||
difficulty += P.cartridge.access_engine
|
||||
difficulty += P.cartridge.access_clown
|
||||
difficulty += P.cartridge.access_janitor
|
||||
difficulty += P.cartridge.access_manifest * 2
|
||||
else
|
||||
difficulty += 2
|
||||
|
||||
if ((prob(difficulty * 12)) || (P.uplink))
|
||||
U.show_message("\red An error flashes on your [src].", 1)
|
||||
else if (prob(difficulty * 3))
|
||||
U.show_message("\red Energy feeds back into your [src]!", 1)
|
||||
explode()
|
||||
else
|
||||
U.show_message("\blue Success!", 1)
|
||||
P.explode()
|
||||
updateUsrDialog()
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
if(23)//Honk virus
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/clown))
|
||||
var/obj/item/device/pda/P = locate(href_list["choice"])
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge:honk_charges > 0)
|
||||
cartridge:honk_charges--
|
||||
U.show_message("\blue Virus sent!", 1)
|
||||
P.honkamt = (rand(15,20))
|
||||
updateUsrDialog()
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
if(24)//Silent virus
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/mime))
|
||||
var/obj/item/device/pda/P = locate(href_list["choice"])
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge:mime_charges > 0)
|
||||
cartridge:mime_charges--
|
||||
U.show_message("\blue Virus sent!", 1)
|
||||
P.silent = 1
|
||||
P.ttone = "silence"
|
||||
updateUsrDialog()
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
else//Cartridge menu linking
|
||||
mode = text2num(href_list["choice"])
|
||||
cartridge.mode = mode
|
||||
cartridge.unlock()
|
||||
|
||||
//EXTRA FUNCTIONS===================================
|
||||
|
||||
@@ -610,7 +561,6 @@
|
||||
for (var/mob/M in viewers(1, loc))
|
||||
if (M.client && M.machine == src)
|
||||
attack_self(M)
|
||||
// attack_self(U)
|
||||
return
|
||||
|
||||
// access to status display signals
|
||||
|
||||
@@ -124,10 +124,8 @@
|
||||
if (!istype(loc, /obj/item/device/pda))
|
||||
return
|
||||
|
||||
// loc:mode = "cart" //Switch right to the notes program
|
||||
|
||||
src.generate_menu()
|
||||
src.print_to_host(src.menu)
|
||||
src.print_to_host(menu)
|
||||
return
|
||||
|
||||
proc/print_to_host(var/text)
|
||||
@@ -167,20 +165,20 @@
|
||||
menu = "<h4><img src=pda_signaler.png> Remote Signaling System</h4>"
|
||||
|
||||
menu += {"
|
||||
<a href='byond://?src=\ref[src];ssend=1'>Send Signal</A><BR>
|
||||
<a href='byond://?src=\ref[src];choice=Send Signal'>Send Signal</A><BR>
|
||||
Frequency:
|
||||
<a href='byond://?src=\ref[src];sfreq=-10'>-</a>
|
||||
<a href='byond://?src=\ref[src];sfreq=-2'>-</a>
|
||||
<a href='byond://?src=\ref[src];choice=Signal Frequency;sfreq=-10'>-</a>
|
||||
<a href='byond://?src=\ref[src];choice=Signal Frequency;sfreq=-2'>-</a>
|
||||
[format_frequency(src.radio:frequency)]
|
||||
<a href='byond://?src=\ref[src];sfreq=2'>+</a>
|
||||
<a href='byond://?src=\ref[src];sfreq=10'>+</a><br>
|
||||
<a href='byond://?src=\ref[src];choice=Signal Frequency;sfreq=2'>+</a>
|
||||
<a href='byond://?src=\ref[src];choice=Signal Frequency;sfreq=10'>+</a><br>
|
||||
<br>
|
||||
Code:
|
||||
<a href='byond://?src=\ref[src];scode=-5'>-</a>
|
||||
<a href='byond://?src=\ref[src];scode=-1'>-</a>
|
||||
<a href='byond://?src=\ref[src];choice=Signal Code;scode=-5'>-</a>
|
||||
<a href='byond://?src=\ref[src];choice=Signal Code;scode=-1'>-</a>
|
||||
[src.radio:code]
|
||||
<a href='byond://?src=\ref[src];scode=1'>+</a>
|
||||
<a href='byond://?src=\ref[src];scode=5'>+</a><br>"}
|
||||
<a href='byond://?src=\ref[src];choice=Signal Code;scode=1'>+</a>
|
||||
<a href='byond://?src=\ref[src];choice=Signal Code;scode=5'>+</a><br>"}
|
||||
if (41) //crew manifest
|
||||
|
||||
menu = "<h4><img src=pda_notes.png> Crew Manifest</h4>"
|
||||
@@ -194,15 +192,15 @@ Code:
|
||||
if (42) //status displays
|
||||
menu = "<h4><img src=pda_status.png> Station Status Display Interlink</h4>"
|
||||
|
||||
menu += "\[ <A HREF='?src=\ref[src];statdisp=blank'>Clear</A> \]<BR>"
|
||||
menu += "\[ <A HREF='?src=\ref[src];statdisp=shuttle'>Shuttle ETA</A> \]<BR>"
|
||||
menu += "\[ <A HREF='?src=\ref[src];statdisp=message'>Message</A> \]"
|
||||
menu += "<ul><li> Line 1: <A HREF='?src=\ref[src];statdisp=setmsg1'>[ message1 ? message1 : "(none)"]</A>"
|
||||
menu += "<li> Line 2: <A HREF='?src=\ref[src];statdisp=setmsg2'>[ message2 ? message2 : "(none)"]</A></ul><br>"
|
||||
menu += "\[ Alert: <A HREF='?src=\ref[src];statdisp=alert;alert=default'>None</A> |"
|
||||
menu += " <A HREF='?src=\ref[src];statdisp=alert;alert=redalert'>Red Alert</A> |"
|
||||
menu += " <A HREF='?src=\ref[src];statdisp=alert;alert=lockdown'>Lockdown</A> |"
|
||||
menu += " <A HREF='?src=\ref[src];statdisp=alert;alert=biohazard'>Biohazard</A> \]<BR>"
|
||||
menu += "\[ <A HREF='?src=\ref[src];choice=Status;statdisp=blank'>Clear</A> \]<BR>"
|
||||
menu += "\[ <A HREF='?src=\ref[src];choice=Status;statdisp=shuttle'>Shuttle ETA</A> \]<BR>"
|
||||
menu += "\[ <A HREF='?src=\ref[src];choice=Status;statdisp=message'>Message</A> \]"
|
||||
menu += "<ul><li> Line 1: <A HREF='?src=\ref[src];choice=Status;statdisp=setmsg1'>[ message1 ? message1 : "(none)"]</A>"
|
||||
menu += "<li> Line 2: <A HREF='?src=\ref[src];choice=Status;statdisp=setmsg2'>[ message2 ? message2 : "(none)"]</A></ul><br>"
|
||||
menu += "\[ Alert: <A HREF='?src=\ref[src];choice=Status;statdisp=alert;alert=default'>None</A> |"
|
||||
menu += " <A HREF='?src=\ref[src];choice=Status;statdisp=alert;alert=redalert'>Red Alert</A> |"
|
||||
menu += " <A HREF='?src=\ref[src];choice=Status;statdisp=alert;alert=lockdown'>Lockdown</A> |"
|
||||
menu += " <A HREF='?src=\ref[src];choice=Status;statdisp=alert;alert=biohazard'>Biohazard</A> \]<BR>"
|
||||
|
||||
if (43) //Muskets' power monitor
|
||||
menu = "<h4><img src=pda_power.png> Power Monitor</h4>"
|
||||
@@ -235,7 +233,7 @@ Code:
|
||||
if (44) //medical records //This thing only displays a single screen so it's hard to really get the sub-menu stuff working.
|
||||
menu = "<h4><img src=pda_medical.png> Medical Record List</h4>"
|
||||
for (var/datum/data/record/R in data_core.general)
|
||||
menu += "<a href='byond://?src=\ref[src];d_rec=\ref[R]'>[R.fields["id"]]: [R.fields["name"]]<br>"
|
||||
menu += "<a href='byond://?src=\ref[src];choice=Medical Records;target=\ref[R]'>[R.fields["id"]]: [R.fields["name"]]<br>"
|
||||
menu += "<br>"
|
||||
if(441)
|
||||
menu = "<h4><img src=pda_medical.png> Medical Record</h4>"
|
||||
@@ -277,7 +275,7 @@ Code:
|
||||
menu = "<h4><img src=pda_cuffs.png> Security Record List</h4>"
|
||||
|
||||
for (var/datum/data/record/R in data_core.general)
|
||||
menu += "<a href='byond://?src=\ref[src];d_rec=\ref[R]'>[R.fields["id"]]: [R.fields["name"]]<br>"
|
||||
menu += "<a href='byond://?src=\ref[src];choice=Security Records;target=\ref[R]'>[R.fields["id"]]: [R.fields["name"]]<br>"
|
||||
|
||||
menu += "<br>"
|
||||
if(451)
|
||||
@@ -499,70 +497,65 @@ Code:
|
||||
if (usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
return
|
||||
|
||||
if (href_list["d_rec"])
|
||||
switch(href_list["choice"])
|
||||
if("Medical Records")
|
||||
var/datum/data/record/R = locate(href_list["target"])
|
||||
var/datum/data/record/M = locate(href_list["target"])
|
||||
loc:mode = 441
|
||||
mode = 441
|
||||
if (data_core.general.Find(R))
|
||||
for (var/datum/data/record/E in data_core.medical)
|
||||
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
|
||||
M = E
|
||||
break
|
||||
active1 = R
|
||||
active2 = M
|
||||
|
||||
var/datum/data/record/R = locate(href_list["d_rec"])
|
||||
var/datum/data/record/M = locate(href_list["d_rec"])
|
||||
var/datum/data/record/S = locate(href_list["d_rec"])
|
||||
if("Security Records")
|
||||
var/datum/data/record/R = locate(href_list["target"])
|
||||
var/datum/data/record/S = locate(href_list["target"])
|
||||
loc:mode = 451
|
||||
mode = 451
|
||||
if (data_core.general.Find(R))
|
||||
for (var/datum/data/record/E in data_core.security)
|
||||
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
|
||||
S = E
|
||||
break
|
||||
active1 = R
|
||||
active3 = S
|
||||
|
||||
switch(mode)
|
||||
if(44)
|
||||
loc:mode = 441
|
||||
mode = 441
|
||||
if (data_core.general.Find(R))
|
||||
for (var/datum/data/record/E in data_core.medical)
|
||||
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
|
||||
M = E
|
||||
break
|
||||
active1 = R
|
||||
active2 = M
|
||||
active3 = S
|
||||
if(45)
|
||||
loc:mode = 451
|
||||
mode = 451
|
||||
if (data_core.general.Find(R))
|
||||
for (var/datum/data/record/E in data_core.security)
|
||||
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
|
||||
S = E
|
||||
break
|
||||
active1 = R
|
||||
active2 = M
|
||||
active3 = S
|
||||
if("Send Signal")
|
||||
for(var/obj/item/assembly/r_i_ptank/R in world) //Bomblist stuff
|
||||
if((R.part1.code == src/radio:code) && (R.part1.frequency == src.radio:frequency))
|
||||
bombers += "[key_name(usr)] has activated a radio bomb (Freq: [format_frequency(src.radio:frequency)], Code: [src.radio:code]). Temp = [R.part3.air_contents.temperature-T0C]."
|
||||
spawn( 0 )
|
||||
src.radio:send_signal("ACTIVATE")
|
||||
return
|
||||
|
||||
else if ((href_list["ssend"]) && (istype(src,/obj/item/weapon/cartridge/signal)))
|
||||
for(var/obj/item/assembly/r_i_ptank/R in world) //Bomblist stuff
|
||||
if((R.part1.code == src/radio:code) && (R.part1.frequency == src.radio:frequency))
|
||||
bombers += "[key_name(usr)] has activated a radio bomb (Freq: [format_frequency(src.radio:frequency)], Code: [src.radio:code]). Temp = [R.part3.air_contents.temperature-T0C]."
|
||||
spawn( 0 )
|
||||
src.radio:send_signal("ACTIVATE")
|
||||
return
|
||||
if("Signal Frequency")
|
||||
var/new_frequency = sanitize_frequency(src.radio:frequency + text2num(href_list["sfreq"]))
|
||||
src.radio:set_frequency(new_frequency)
|
||||
|
||||
else if ((href_list["sfreq"]) && (istype(src,/obj/item/weapon/cartridge/signal)))
|
||||
var/new_frequency = sanitize_frequency(src.radio:frequency + text2num(href_list["sfreq"]))
|
||||
src.radio:set_frequency(new_frequency)
|
||||
if("Signal Code")
|
||||
radio:code += text2num(href_list["scode"])
|
||||
radio:code = round(src.radio:code)
|
||||
radio:code = min(100, src.radio:code)
|
||||
radio:code = max(1, src.radio:code)
|
||||
|
||||
else if ((href_list["scode"]) && (istype(src,/obj/item/weapon/cartridge/signal)))
|
||||
radio:code += text2num(href_list["scode"])
|
||||
radio:code = round(src.radio:code)
|
||||
radio:code = min(100, src.radio:code)
|
||||
radio:code = max(1, src.radio:code)
|
||||
if("Status")
|
||||
switch(href_list["statdisp"])
|
||||
if("message")
|
||||
post_status("message", message1, message2)
|
||||
if("alert")
|
||||
post_status("alert", href_list["alert"])
|
||||
if("setmsg1")
|
||||
message1 = input("Line 1", "Enter Message Text", message1) as text|null
|
||||
src.updateSelfDialog()
|
||||
if("setmsg2")
|
||||
message2 = input("Line 2", "Enter Message Text", message2) as text|null
|
||||
src.updateSelfDialog()
|
||||
else
|
||||
post_status(href_list["statdisp"])
|
||||
|
||||
else if (href_list["statdisp"] && access_status_display)
|
||||
|
||||
switch(href_list["statdisp"])
|
||||
if("message")
|
||||
post_status("message", message1, message2)
|
||||
if("alert")
|
||||
post_status("alert", href_list["alert"])
|
||||
|
||||
if("setmsg1")
|
||||
message1 = input("Line 1", "Enter Message Text", message1) as text|null
|
||||
src.updateSelfDialog()
|
||||
if("setmsg2")
|
||||
message2 = input("Line 2", "Enter Message Text", message2) as text|null
|
||||
src.updateSelfDialog()
|
||||
else
|
||||
post_status(href_list["statdisp"])
|
||||
|
||||
src.generate_menu()
|
||||
src.print_to_host(menu)
|
||||
generate_menu()
|
||||
print_to_host(menu)
|
||||
|
||||
Reference in New Issue
Block a user