mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00: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:
@@ -4,6 +4,7 @@
|
|||||||
// Once full (~1 atm), uses air resv to flush items into the pipes
|
// Once full (~1 atm), uses air resv to flush items into the pipes
|
||||||
// Automatically recharges air (unless off), will flush when ready if pre-set
|
// Automatically recharges air (unless off), will flush when ready if pre-set
|
||||||
// Can hold items and human size things, no other draggables
|
// Can hold items and human size things, no other draggables
|
||||||
|
// Toilets are a type of disposal bin for small objects only and work on magic. By magic, I mean torque rotation
|
||||||
|
|
||||||
/obj/machinery/disposal
|
/obj/machinery/disposal
|
||||||
name = "disposal unit"
|
name = "disposal unit"
|
||||||
@@ -59,7 +60,6 @@
|
|||||||
C.show_message("\red [GM.name] has been placed in the [src] by [user].", 3)
|
C.show_message("\red [GM.name] has been placed in the [src] by [user].", 3)
|
||||||
del(G)
|
del(G)
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
|
|
||||||
@@ -273,10 +273,6 @@
|
|||||||
// otherwise charge
|
// otherwise charge
|
||||||
use_power(500) // charging power usage
|
use_power(500) // charging power usage
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var/atom/L = loc // recharging from loc turf
|
var/atom/L = loc // recharging from loc turf
|
||||||
|
|
||||||
var/datum/gas_mixture/env = L.return_air()
|
var/datum/gas_mixture/env = L.return_air()
|
||||||
@@ -350,7 +346,92 @@
|
|||||||
H.vent_gas(loc)
|
H.vent_gas(loc)
|
||||||
del(H)
|
del(H)
|
||||||
|
|
||||||
|
//The toilet does not need to pressurized but can only handle small items.
|
||||||
|
//You can also choke people by dunking them into the toilet.
|
||||||
|
/obj/machinery/disposal/toilet
|
||||||
|
name = "toilet"
|
||||||
|
desc = "A torque rotation-based, waste disposal unit for small matter."
|
||||||
|
icon_state = "toilet"
|
||||||
|
density = 0//So you can stand on it.
|
||||||
|
mode = 2
|
||||||
|
|
||||||
|
attackby(var/obj/item/I, var/mob/user)
|
||||||
|
if( !(stat & BROKEN) )
|
||||||
|
if(istype(I, /obj/item/weapon/grab))
|
||||||
|
var/obj/item/weapon/grab/G = I
|
||||||
|
if(istype(G)) // handle grabbed mob
|
||||||
|
if(ismob(G.affecting))
|
||||||
|
var/mob/GM = G.affecting
|
||||||
|
for (var/mob/V in viewers(usr))
|
||||||
|
V.show_message("[user] dunks [GM.name] into the toilet!", 3)
|
||||||
|
if(do_after(user, 30))
|
||||||
|
if(G.state>1&&!GM.internal)
|
||||||
|
GM.oxyloss += 5
|
||||||
|
|
||||||
|
else if(I.w_class < 4)
|
||||||
|
user.drop_item()
|
||||||
|
I.loc = src
|
||||||
|
user << "You place \the [I] into the [src]."
|
||||||
|
for(var/mob/M in viewers(src))
|
||||||
|
if(M == user)
|
||||||
|
continue
|
||||||
|
M.show_message("[user.name] places \the [I] into the [src].", 3)
|
||||||
|
else
|
||||||
|
user << "\red That item cannot be placed into the toilet."
|
||||||
|
return
|
||||||
|
|
||||||
|
MouseDrop_T(mob/target, mob/user)
|
||||||
|
if (!istype(target) || target.buckled || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || istype(user, /mob/living/silicon/ai))
|
||||||
|
return//Damn that list is long
|
||||||
|
|
||||||
|
for (var/mob/V in viewers(usr))
|
||||||
|
if(target == user && !user.stat)
|
||||||
|
V.show_message("[user] sits on the toilet.", 3)
|
||||||
|
if(target != user && !user.restrained())
|
||||||
|
V.show_message("[user] places [target.name] on the toilet.", 3)
|
||||||
|
target.loc = loc
|
||||||
|
return
|
||||||
|
|
||||||
|
interact(mob/user)
|
||||||
|
add_fingerprint(user)
|
||||||
|
for (var/mob/V in viewers(user))
|
||||||
|
V.show_message("[user] eagerly drinks the toilet water!", 3)//Yum yum yum
|
||||||
|
return
|
||||||
|
|
||||||
|
update()
|
||||||
|
overlays = null
|
||||||
|
if( !(stat & BROKEN) )
|
||||||
|
if(flush)
|
||||||
|
overlays += image('disposal.dmi',src,"toilet-handle",,dir)
|
||||||
|
if( !(stat & NOPOWER) )
|
||||||
|
overlays += image('disposal.dmi',src,"toilet-ready",,dir)
|
||||||
|
else
|
||||||
|
icon_state = "toilet-broken"
|
||||||
|
mode = 0
|
||||||
|
flush = 0
|
||||||
|
return
|
||||||
|
|
||||||
|
process()
|
||||||
|
if( !((stat & BROKEN)||(stat & NOPOWER)) )// nothing can happen if broken or not powered.
|
||||||
|
updateDialog()
|
||||||
|
if(!flush&&contents.len)
|
||||||
|
flush++
|
||||||
|
flush()
|
||||||
|
use_power(100)// base power usage
|
||||||
|
update()
|
||||||
|
return
|
||||||
|
|
||||||
|
flush()
|
||||||
|
flick("toilet-flush", src)
|
||||||
|
var/obj/disposalholder/H = new()
|
||||||
|
H.init(src)
|
||||||
|
sleep(10)
|
||||||
|
playsound(src, 'disposalflush.ogg', 50, 0, 0)
|
||||||
|
sleep(30) // To prevent spam.
|
||||||
|
H.start(src)
|
||||||
|
flush--
|
||||||
|
update()
|
||||||
|
return
|
||||||
|
|
||||||
// virtual disposal object
|
// virtual disposal object
|
||||||
// travels through pipes in lieu of actual items
|
// travels through pipes in lieu of actual items
|
||||||
@@ -369,8 +450,8 @@
|
|||||||
|
|
||||||
// initialize a holder from the contents of a disposal unit
|
// initialize a holder from the contents of a disposal unit
|
||||||
proc/init(var/obj/machinery/disposal/D)
|
proc/init(var/obj/machinery/disposal/D)
|
||||||
gas = D.air_contents // transfer gas resv. into holder object
|
if(!istype(D, /obj/machinery/disposal/toilet))//So it does not drain gas from a toilet which does not function on it.
|
||||||
|
gas = D.air_contents// transfer gas resv. into holder object
|
||||||
|
|
||||||
// now everything inside the disposal gets put into the holder
|
// now everything inside the disposal gets put into the holder
|
||||||
// note AM since can contain mobs or objs
|
// note AM since can contain mobs or objs
|
||||||
@@ -388,8 +469,6 @@
|
|||||||
src.destinationTag = T.sortTag
|
src.destinationTag = T.sortTag
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// start the movement process
|
// start the movement process
|
||||||
// argument is the disposal unit the holder started in
|
// argument is the disposal unit the holder started in
|
||||||
proc/start(var/obj/machinery/disposal/D)
|
proc/start(var/obj/machinery/disposal/D)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/mob/living/carbon/alien/larva
|
/mob/living/carbon/alien/larva
|
||||||
name = "alien larva"
|
name = "alien larva"
|
||||||
icon_state = "larva"
|
icon_state = "larva"
|
||||||
//flags = 258.0
|
flags = 258.0
|
||||||
|
|
||||||
health = 25
|
health = 25
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
icon = 'monkey.dmi'
|
icon = 'monkey.dmi'
|
||||||
icon_state = "monkey1"
|
icon_state = "monkey1"
|
||||||
gender = NEUTER
|
gender = NEUTER
|
||||||
//flags = 258.0
|
flags = 258.0
|
||||||
|
|
||||||
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
|
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
|
||||||
|
|
||||||
|
|||||||
@@ -248,19 +248,6 @@
|
|||||||
dat += "<img src=sos_11.png> Smoke Bombs: [sbombs]<br>"
|
dat += "<img src=sos_11.png> Smoke Bombs: [sbombs]<br>"
|
||||||
dat += "<br>"
|
dat += "<br>"
|
||||||
|
|
||||||
/*
|
|
||||||
HOW TO USE OR ADAPT THIS CODE:
|
|
||||||
The menu structure should not need to be altered to add new entries. Simply place them after what is already there.
|
|
||||||
As an exception, if there are multiple-tiered windows, for instance, going into medical alerts and then to DNA testing or something,
|
|
||||||
those menus should be added below their parents but have a greater value. The second sub-menu of menu 2 would have the number 22.
|
|
||||||
Another sub-menu of menu 2 would be 23, then 24, and up to 29. If those menus have their own sub-menus a similar format follows.
|
|
||||||
Sub-menu 1 of sub-menu 2(of menu 2) would be 221. Sub-menu 5 of sub-menu 2(of menu 2) would be 225. Menu 0 is a special case (it's the menu hub); you are free to use menus 1-9 (sub menus can be 0-9)
|
|
||||||
to create your own data paths.
|
|
||||||
The Return button, when used, simply removes the final number and navigates to the menu prior. Menu 334, the fourth sub-menu of sub-menu
|
|
||||||
3, in menu 3, would navigate to sub menu 3 in menu 3. Or 33.
|
|
||||||
It is possible to go to a different menu/sub-menu from anywhere. When creating new menus don't forget to add them to Topic proc or else the game
|
|
||||||
will interpret you using the messenger function (the else clause in the switch).
|
|
||||||
Other buttons and functions should be named according to what they do.*/
|
|
||||||
switch(spideros)
|
switch(spideros)
|
||||||
if(0)
|
if(0)
|
||||||
/*
|
/*
|
||||||
@@ -335,13 +322,12 @@
|
|||||||
for (var/obj/item/device/pda/P in world)
|
for (var/obj/item/device/pda/P in world)
|
||||||
if (!P.owner||P.toff)
|
if (!P.owner||P.toff)
|
||||||
continue
|
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>"
|
||||||
dat += "</li>"
|
dat += "</li>"
|
||||||
count++
|
count++
|
||||||
dat += "</ul>"
|
dat += "</ul>"
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
dat += "None detected.<br>"
|
dat += "None detected.<br>"
|
||||||
//dat += "<a href='byond://?src=\ref[src];choice=31'> Send Virus</a>
|
|
||||||
if(32)
|
if(32)
|
||||||
dat += "<h4><img src=sos_1.png> Hidden Menu:</h4>"
|
dat += "<h4><img src=sos_1.png> Hidden Menu:</h4>"
|
||||||
dat += "Please input password: "
|
dat += "Please input password: "
|
||||||
@@ -385,30 +371,6 @@
|
|||||||
dat += "</ul>"
|
dat += "</ul>"
|
||||||
dat += "That is all you will need to know. The rest will come with practice and talent. Good luck!"
|
dat += "That is all you will need to know. The rest will come with practice and talent. Good luck!"
|
||||||
dat += "<h4>Master /N</h4>"
|
dat += "<h4>Master /N</h4>"
|
||||||
/*
|
|
||||||
//Sub-menu testing stuff.
|
|
||||||
dat += "<li><a href='byond://?src=\ref[src];choice=49'> To sub-menu 49</a></li>"
|
|
||||||
if(31)
|
|
||||||
dat += "<h4><img src=sos_12.png> Send Virus:</h4>"
|
|
||||||
dat += "<h4><img src=sos_6.png> Detected PDAs:</h4>"
|
|
||||||
dat += "<ul>"
|
|
||||||
var/count = 0
|
|
||||||
for (var/obj/item/device/pda/P in world)
|
|
||||||
if (!P.owner||P.toff)
|
|
||||||
continue
|
|
||||||
dat += "<li><a href='byond://?src=\ref[src];choice=\ref[P]'><i>[P]</i></a>"
|
|
||||||
dat += "</li>"
|
|
||||||
count++
|
|
||||||
dat += "</ul>"
|
|
||||||
if (count == 0)
|
|
||||||
dat += "None detected.<br>"
|
|
||||||
if(49)
|
|
||||||
dat += "<h4><img src=sos_6.png> Other Functions 49:</h4>"
|
|
||||||
dat += "<a href='byond://?src=\ref[src];choice=491'> To sub-menu 491</a>"
|
|
||||||
if(491)
|
|
||||||
dat += "<h4><img src=sos_6.png> Other Functions 491:</h4>"
|
|
||||||
dat += "<a href='byond://?src=\ref[src];choice=0'> To main menu</a>"
|
|
||||||
*/
|
|
||||||
dat += "</body></html>"
|
dat += "</body></html>"
|
||||||
|
|
||||||
U << browse(dat,"window=spideros;size=400x444;border=1;can_resize=0;can_close=0;can_minimize=0")
|
U << browse(dat,"window=spideros;size=400x444;border=1;can_resize=0;can_close=0;can_minimize=0")
|
||||||
@@ -493,13 +455,23 @@
|
|||||||
spideros=32
|
spideros=32
|
||||||
if("4")
|
if("4")
|
||||||
spideros=4
|
spideros=4
|
||||||
/*Sub-menu testing stuff.
|
if("Message")
|
||||||
if("31")
|
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||||
spideros=31
|
var/t = input(U, "Please enter untraceable message.") as text
|
||||||
if("49")
|
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||||
spideros=49
|
if(!t||U.stat||U.wear_suit!=src||!initialize)//Wow, another one of these. Man...
|
||||||
if("491")
|
return
|
||||||
spideros=491 */
|
if(isnull(P)||P.toff)//So it doesn't freak out if the object no-longer exists.
|
||||||
|
U << "\red Error: unable to deliver message."
|
||||||
|
spideros()
|
||||||
|
return
|
||||||
|
P.tnote += "<i><b>← From unknown source:</b></i><br>[t]<br>"
|
||||||
|
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("Unlock Kamikaze")
|
if("Unlock Kamikaze")
|
||||||
if(input(U)=="Divine Wind")
|
if(input(U)=="Divine Wind")
|
||||||
if( !(U.stat||U.wear_suit!=src||!initialize) )
|
if( !(U.stat||U.wear_suit!=src||!initialize) )
|
||||||
@@ -583,38 +555,6 @@
|
|||||||
reagents.trans_id_to(U, "nutriment", 5)
|
reagents.trans_id_to(U, "nutriment", 5)
|
||||||
U << "You feel a tiny prick and a sudden rush of substance in to your veins."
|
U << "You feel a tiny prick and a sudden rush of substance in to your veins."
|
||||||
|
|
||||||
else
|
|
||||||
/*Leaving this for the messenger because it's an awesome solution. For switch to work, the variable has to be static.
|
|
||||||
Not the case when P is a specific object. The downside, of course, is that there is only one slot.
|
|
||||||
The following switch moves data to the appropriate function based on what screen it was clicked on. For now only uses screen 3.
|
|
||||||
As an example, I added screen 31 to send the silence virus to people in the commented bits.
|
|
||||||
You can do the same with functions that require dynamic tracking.
|
|
||||||
*/
|
|
||||||
switch(spideros)
|
|
||||||
if(3)
|
|
||||||
var/obj/item/device/pda/P = locate(href_list["choice"])
|
|
||||||
var/t = input(U, "Please enter untraceable message.") as text
|
|
||||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
|
||||||
if(!t||U.stat||U.wear_suit!=src||!initialize)//Wow, another one of these. Man...
|
|
||||||
return
|
|
||||||
if(isnull(P)||P.toff)//So it doesn't freak out if the object no-longer exists.
|
|
||||||
U << "\red Error: unable to deliver message."
|
|
||||||
spideros()
|
|
||||||
return
|
|
||||||
P.tnote += "<i><b>← From unknown source:</b></i><br>[t]<br>"
|
|
||||||
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(31)
|
|
||||||
var/obj/item/device/pda/P = locate(href_list["choice"])
|
|
||||||
if (!P.toff)
|
|
||||||
U.show_message("\blue Virus sent!", 1)
|
|
||||||
P.silent = 1
|
|
||||||
P.ttone = "silence" */
|
|
||||||
|
|
||||||
spideros()//Refreshes the screen by calling it again (which replaces current screen with new screen).
|
spideros()//Refreshes the screen by calling it again (which replaces current screen with new screen).
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
var/ttone = "beep" //The ringtone!
|
var/ttone = "beep" //The ringtone!
|
||||||
var/honkamt = 0 //How many honks left when infected with honk.exe
|
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/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/cart = "" //A place to stick cartridge menu information
|
||||||
|
|
||||||
var/obj/item/weapon/integrated_uplink/uplink = null
|
var/obj/item/weapon/integrated_uplink/uplink = null
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
else
|
else
|
||||||
switch (mode)
|
switch (mode)
|
||||||
if (0)
|
if (0)
|
||||||
dat += "<h2>PERSONAL DATA ASSISTANT</h2>"
|
dat += "<h2>PERSONAL DATA ASSISTANT v.1.2</h2>"
|
||||||
dat += "Owner: [owner], [ownjob]<br>"
|
dat += "Owner: [owner], [ownjob]<br>"
|
||||||
dat += text("ID: <A href='?src=\ref[];choice=Authenticate'>[]</A><br>", src, (id ? "[id.registered], [id.assignment]" : "----------"))
|
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]"
|
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>"
|
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))
|
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))
|
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))
|
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>"
|
dat += "<h4><img src=pda_menu.png> Detected PDAs</h4>"
|
||||||
|
|
||||||
@@ -231,7 +229,13 @@
|
|||||||
if (!toff)
|
if (!toff)
|
||||||
for (var/obj/item/device/pda/P in world)
|
for (var/obj/item/device/pda/P in world)
|
||||||
if (!P.owner||P.toff||P == src) continue
|
if (!P.owner||P.toff||P == src) continue
|
||||||
dat += "<li><a href='byond://?src=\ref[src];choice=\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>"
|
dat += "</li>"
|
||||||
count++
|
count++
|
||||||
dat += "</ul>"
|
dat += "</ul>"
|
||||||
@@ -247,51 +251,6 @@
|
|||||||
dat += tnote
|
dat += tnote
|
||||||
dat += "<br>"
|
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)
|
if (3)
|
||||||
dat += "<h4><img src=pda_atmos.png> Atmospheric Readings</h4>"
|
dat += "<h4><img src=pda_atmos.png> Atmospheric Readings</h4>"
|
||||||
|
|
||||||
@@ -324,7 +283,7 @@
|
|||||||
dat += cart
|
dat += cart
|
||||||
|
|
||||||
dat += "</body></html>"
|
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)
|
onclose(user, "pda", src)
|
||||||
|
|
||||||
/obj/item/device/pda/Topic(href, href_list)
|
/obj/item/device/pda/Topic(href, href_list)
|
||||||
@@ -353,7 +312,7 @@
|
|||||||
mode = round(mode/10)
|
mode = round(mode/10)
|
||||||
if(mode==4)//Fix for cartridges. Redirects to hub.
|
if(mode==4)//Fix for cartridges. Redirects to hub.
|
||||||
mode = 0
|
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.mode = mode
|
||||||
cartridge.unlock()
|
cartridge.unlock()
|
||||||
if ("Authenticate")//Checks for ID
|
if ("Authenticate")//Checks for ID
|
||||||
@@ -395,12 +354,6 @@
|
|||||||
mode = 2
|
mode = 2
|
||||||
if("21")//Read messeges
|
if("21")//Read messeges
|
||||||
mode = 21
|
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
|
if("3")//Atmos scan
|
||||||
mode = 3
|
mode = 3
|
||||||
if("4")//Redirects to hub
|
if("4")//Redirects to hub
|
||||||
@@ -473,6 +426,70 @@
|
|||||||
else
|
else
|
||||||
U << browse(null, "window=pda")
|
U << browse(null, "window=pda")
|
||||||
return
|
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===================================
|
//SYNDICATE FUNCTIONS===================================
|
||||||
|
|
||||||
@@ -491,112 +508,46 @@
|
|||||||
uplink.active = 0
|
uplink.active = 0
|
||||||
note = uplink.orignote
|
note = uplink.orignote
|
||||||
updateUsrDialog()
|
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===================================
|
//LINK FUNCTIONS===================================
|
||||||
|
|
||||||
else//Else, redirects based on current menu
|
else//Cartridge menu linking
|
||||||
switch(mode)
|
mode = text2num(href_list["choice"])
|
||||||
if(0)//Cartridge menu linking
|
cartridge.mode = mode
|
||||||
mode = text2num(href_list["choice"])
|
cartridge.unlock()
|
||||||
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
|
|
||||||
|
|
||||||
//EXTRA FUNCTIONS===================================
|
//EXTRA FUNCTIONS===================================
|
||||||
|
|
||||||
@@ -610,7 +561,6 @@
|
|||||||
for (var/mob/M in viewers(1, loc))
|
for (var/mob/M in viewers(1, loc))
|
||||||
if (M.client && M.machine == src)
|
if (M.client && M.machine == src)
|
||||||
attack_self(M)
|
attack_self(M)
|
||||||
// attack_self(U)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
// access to status display signals
|
// access to status display signals
|
||||||
|
|||||||
@@ -124,10 +124,8 @@
|
|||||||
if (!istype(loc, /obj/item/device/pda))
|
if (!istype(loc, /obj/item/device/pda))
|
||||||
return
|
return
|
||||||
|
|
||||||
// loc:mode = "cart" //Switch right to the notes program
|
|
||||||
|
|
||||||
src.generate_menu()
|
src.generate_menu()
|
||||||
src.print_to_host(src.menu)
|
src.print_to_host(menu)
|
||||||
return
|
return
|
||||||
|
|
||||||
proc/print_to_host(var/text)
|
proc/print_to_host(var/text)
|
||||||
@@ -167,20 +165,20 @@
|
|||||||
menu = "<h4><img src=pda_signaler.png> Remote Signaling System</h4>"
|
menu = "<h4><img src=pda_signaler.png> Remote Signaling System</h4>"
|
||||||
|
|
||||||
menu += {"
|
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:
|
Frequency:
|
||||||
<a href='byond://?src=\ref[src];sfreq=-10'>-</a>
|
<a href='byond://?src=\ref[src];choice=Signal Frequency;sfreq=-10'>-</a>
|
||||||
<a href='byond://?src=\ref[src];sfreq=-2'>-</a>
|
<a href='byond://?src=\ref[src];choice=Signal Frequency;sfreq=-2'>-</a>
|
||||||
[format_frequency(src.radio:frequency)]
|
[format_frequency(src.radio:frequency)]
|
||||||
<a href='byond://?src=\ref[src];sfreq=2'>+</a>
|
<a href='byond://?src=\ref[src];choice=Signal Frequency;sfreq=2'>+</a>
|
||||||
<a href='byond://?src=\ref[src];sfreq=10'>+</a><br>
|
<a href='byond://?src=\ref[src];choice=Signal Frequency;sfreq=10'>+</a><br>
|
||||||
<br>
|
<br>
|
||||||
Code:
|
Code:
|
||||||
<a href='byond://?src=\ref[src];scode=-5'>-</a>
|
<a href='byond://?src=\ref[src];choice=Signal Code;scode=-5'>-</a>
|
||||||
<a href='byond://?src=\ref[src];scode=-1'>-</a>
|
<a href='byond://?src=\ref[src];choice=Signal Code;scode=-1'>-</a>
|
||||||
[src.radio:code]
|
[src.radio:code]
|
||||||
<a href='byond://?src=\ref[src];scode=1'>+</a>
|
<a href='byond://?src=\ref[src];choice=Signal Code;scode=1'>+</a>
|
||||||
<a href='byond://?src=\ref[src];scode=5'>+</a><br>"}
|
<a href='byond://?src=\ref[src];choice=Signal Code;scode=5'>+</a><br>"}
|
||||||
if (41) //crew manifest
|
if (41) //crew manifest
|
||||||
|
|
||||||
menu = "<h4><img src=pda_notes.png> Crew Manifest</h4>"
|
menu = "<h4><img src=pda_notes.png> Crew Manifest</h4>"
|
||||||
@@ -194,15 +192,15 @@ Code:
|
|||||||
if (42) //status displays
|
if (42) //status displays
|
||||||
menu = "<h4><img src=pda_status.png> Station Status Display Interlink</h4>"
|
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];choice=Status;statdisp=blank'>Clear</A> \]<BR>"
|
||||||
menu += "\[ <A HREF='?src=\ref[src];statdisp=shuttle'>Shuttle ETA</A> \]<BR>"
|
menu += "\[ <A HREF='?src=\ref[src];choice=Status;statdisp=shuttle'>Shuttle ETA</A> \]<BR>"
|
||||||
menu += "\[ <A HREF='?src=\ref[src];statdisp=message'>Message</A> \]"
|
menu += "\[ <A HREF='?src=\ref[src];choice=Status;statdisp=message'>Message</A> \]"
|
||||||
menu += "<ul><li> Line 1: <A HREF='?src=\ref[src];statdisp=setmsg1'>[ message1 ? message1 : "(none)"]</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];statdisp=setmsg2'>[ message2 ? message2 : "(none)"]</A></ul><br>"
|
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];statdisp=alert;alert=default'>None</A> |"
|
menu += "\[ Alert: <A HREF='?src=\ref[src];choice=Status;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];choice=Status;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];choice=Status;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=alert;alert=biohazard'>Biohazard</A> \]<BR>"
|
||||||
|
|
||||||
if (43) //Muskets' power monitor
|
if (43) //Muskets' power monitor
|
||||||
menu = "<h4><img src=pda_power.png> Power Monitor</h4>"
|
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.
|
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>"
|
menu = "<h4><img src=pda_medical.png> Medical Record List</h4>"
|
||||||
for (var/datum/data/record/R in data_core.general)
|
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>"
|
menu += "<br>"
|
||||||
if(441)
|
if(441)
|
||||||
menu = "<h4><img src=pda_medical.png> Medical Record</h4>"
|
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>"
|
menu = "<h4><img src=pda_cuffs.png> Security Record List</h4>"
|
||||||
|
|
||||||
for (var/datum/data/record/R in data_core.general)
|
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>"
|
menu += "<br>"
|
||||||
if(451)
|
if(451)
|
||||||
@@ -499,70 +497,65 @@ Code:
|
|||||||
if (usr.stat || usr.restrained() || !in_range(loc, usr))
|
if (usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||||
return
|
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"])
|
if("Security Records")
|
||||||
var/datum/data/record/M = locate(href_list["d_rec"])
|
var/datum/data/record/R = locate(href_list["target"])
|
||||||
var/datum/data/record/S = locate(href_list["d_rec"])
|
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("Send Signal")
|
||||||
if(44)
|
for(var/obj/item/assembly/r_i_ptank/R in world) //Bomblist stuff
|
||||||
loc:mode = 441
|
if((R.part1.code == src/radio:code) && (R.part1.frequency == src.radio:frequency))
|
||||||
mode = 441
|
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]."
|
||||||
if (data_core.general.Find(R))
|
spawn( 0 )
|
||||||
for (var/datum/data/record/E in data_core.medical)
|
src.radio:send_signal("ACTIVATE")
|
||||||
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
|
return
|
||||||
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
|
|
||||||
|
|
||||||
else if ((href_list["ssend"]) && (istype(src,/obj/item/weapon/cartridge/signal)))
|
if("Signal Frequency")
|
||||||
for(var/obj/item/assembly/r_i_ptank/R in world) //Bomblist stuff
|
var/new_frequency = sanitize_frequency(src.radio:frequency + text2num(href_list["sfreq"]))
|
||||||
if((R.part1.code == src/radio:code) && (R.part1.frequency == src.radio:frequency))
|
src.radio:set_frequency(new_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["sfreq"]) && (istype(src,/obj/item/weapon/cartridge/signal)))
|
if("Signal Code")
|
||||||
var/new_frequency = sanitize_frequency(src.radio:frequency + text2num(href_list["sfreq"]))
|
radio:code += text2num(href_list["scode"])
|
||||||
src.radio:set_frequency(new_frequency)
|
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)))
|
if("Status")
|
||||||
radio:code += text2num(href_list["scode"])
|
switch(href_list["statdisp"])
|
||||||
radio:code = round(src.radio:code)
|
if("message")
|
||||||
radio:code = min(100, src.radio:code)
|
post_status("message", message1, message2)
|
||||||
radio:code = max(1, src.radio:code)
|
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)
|
generate_menu()
|
||||||
|
print_to_host(menu)
|
||||||
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)
|
|
||||||
|
|||||||
@@ -133,6 +133,8 @@ I kind of like the right click only--the window version can get a little confusi
|
|||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||||
if(!v.welded)
|
if(!v.welded)
|
||||||
vent_found = v
|
vent_found = v
|
||||||
|
else
|
||||||
|
src << "\red That vent is welded."
|
||||||
if(vent_found)
|
if(vent_found)
|
||||||
var/list/vents = list()
|
var/list/vents = list()
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
||||||
|
|||||||
@@ -8,8 +8,11 @@
|
|||||||
if(powerc())
|
if(powerc())
|
||||||
var/vent_found = 0
|
var/vent_found = 0
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||||
vent_found = 1
|
if(!v.welded)
|
||||||
if(!vent_found)
|
vent_found = v
|
||||||
|
else
|
||||||
|
src << "\red That vent is welded."
|
||||||
|
if(vent_found)
|
||||||
var/list/vents = list()
|
var/list/vents = list()
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
||||||
if(temp_vent.loc == loc)
|
if(temp_vent.loc == loc)
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
14960
maps/tgstation.2.0.7.dmm
14960
maps/tgstation.2.0.7.dmm
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user