pAI Stuff

pAI gets a better PDA that can actually receive messages from people. They can also instantly reply like everybody else now.
Got rid of old pAI messaging code.
pAI can toggle their receiver/signaller and their ringer.

AI Stuff

You can show the AI the notes on your PDA by holding it up to a camera.
When you show up a paper/pda to the camera the AI can now click on your name to go to you, if you're near a camera.
The AI's "track with camera" list was adjusted so that it is sorted by humans and then by other mobs. In short, the huge list of monkeys will be below the human master race.
Made the AI's PDA name look nicer.
When showing a piece of paper/your pda to a camera... people who are Unknown will not have a link; which would allow the AI to track them.

Radio/Telecomms Stuff

Made the" common server" and the "preset right receiver" listen for frequencies 144.1 to 148.9. This will allow people to use different frequencies to talk to eachother without bothering the common channel. It will also allow Revs and Cultists to work with each other; everything is still logged though so it still has risks.
Increased the maximum frequency limit for handheld radios and intercoms. It will give you the option to just use station bounced radios on a higher frequency so that anyone with a headset can't simply tune in.

All-In-One Grinder

Created an All-In-One Grinder that is suppose to replace the blender, juicer and reagent grinder altogether. Meaning any department that has a juicer, blender and grinder will instead get this. It will help people be more independent from Chemistry by recycling food and plants.
The All-In-One grinder can grind and juice. Grinding food that isn't part of a recipe will transfer the reagents of the food into the beaker. Juicing only works with certain foods.
I've updated the UI a bit, it will now tell you what's in the beaker and I made it look nicer.

Map

I removed all blenders and juicers on the station and replaced them with the All-In-One grinder!

Misc.

Added myself to the admin.txt list.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4053 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-07-12 20:07:09 +00:00
parent 47710d7f24
commit 8224fd408a
15 changed files with 676 additions and 287 deletions
+68 -86
View File
@@ -34,6 +34,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/mimeamt = 0 //How many silence left when infected with mime.exe
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/detonate = 1 // Can the PDA be blown up?
var/obj/item/device/uplink/pda/uplink = null
@@ -171,10 +172,16 @@ var/global/list/obj/item/device/pda/PDAs = list()
default_cartridge = /obj/item/weapon/cartridge/medical
icon_state = "pda-gene"
// Special AI PDA that cannot explode.
// Special AI/pAI PDAs that cannot explode.
/obj/item/device/pda/ai
icon_state = "NONE"
ttone = "data"
detonate = 0
/obj/item/device/pda/pai
icon_state = "NONE"
ttone = "data"
detonate = 0
/obj/item/device/pda/ai/attack_self(mob/user as mob)
if ((honkamt > 0) && (prob(60)))//For clown virus.
@@ -203,13 +210,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
cartridge = new default_cartridge(src)
/obj/item/device/pda/proc/can_use()
if(istype(src, /obj/item/device/pda/ai))
return 1
if(!ismob(loc))
return 0
var/mob/M = loc
if(!M.canmove && !isAI(M))
if(!M.canmove)
return 0
if((src in M.contents) || ( istype(loc, /turf) && in_range(src, M) ))
return 1
else
@@ -350,7 +359,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
for (var/obj/item/device/pda/P in sortList(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) && !istype(P, /obj/item/device/pda/ai))
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate) && P.detonate)
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>)"
@@ -724,95 +733,70 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/t = input(U, "Please enter message", name, null) as text
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
if (!t)
if (!t || !istype(P))
return
if (!in_range(src, U) && loc != U)
return
if(!istype(P)) return
if (isnull(P)||P.toff || toff)
return
if(istype(P, /obj/item/device/pda))
if (isnull(P)||P.toff || toff)
return
if (last_text && world.time < last_text + 5)
return
if (last_text && world.time < last_text + 5)
return
last_text = world.time
// check if telecomms I/O route 1459 is stable
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
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.
if(MS.active)
useMS = MS
break
if(useMS) // only send the message if it's stable
useMS.send_pda_message("[P.owner]","[owner]","[t]")
last_text = world.time
// check if telecomms I/O route 1459 is stable
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
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.
if(MS.active)
useMS = MS
break
if(useMS) // only send the message if it's stable
useMS.send_pda_message("[P.owner]","[owner]","[t]")
tnote += "<i><b>&rarr; To [P.owner]:</b></i><br>[t]<br>"
P.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a> ([ownjob]):</b></i><br>[t]<br>"
tnote += "<i><b>&rarr; To [P.owner]:</b></i><br>[t]<br>"
P.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a> ([ownjob]):</b></i><br>[t]<br>"
if (prob(15)) //Give the AI a chance of intercepting the message
var/who = src.owner
if(prob(50))
who = P:owner
for(var/mob/living/silicon/ai/ai in world)
// Allows other AIs to intercept the message but the AI won't intercept their own message.
if(ai.aiPDA != P && ai.aiPDA != src)
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
if (prob(15)) //Give the AI a chance of intercepting the message
var/who = src.owner
if(prob(50))
who = P:owner
for(var/mob/living/silicon/ai/ai in world)
// Allows other AIs to intercept the message but the AI won't intercept their own message.
if(ai.aiPDA != P && ai.aiPDA != src)
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
if (!P.silent)
playsound(P.loc, 'twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, P.loc))
if(!P.silent) O.show_message(text("\icon[P] *[P.ttone]*"))
//Search for holder of the PDA.
var/mob/living/L = null
if(P.loc && isliving(P.loc))
L = P.loc
//Maybe they are a pAI!
else if(istype(P, /obj/item/device/pda/pai) && P.loc)
//Search through the location's contents
for(var/obj/item/device/paicard/Pcard in P.loc)
//If there's a Pcard there then get the mind inside
if(Pcard.pai)
var/mob/living/silicon/pai/pai = Pcard.pai
//Is it the pAI that is receiving the message?
if(pai.pda && pai.pda == P)
L = pai
break
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>)"
if (!P.silent)
playsound(P.loc, 'twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, P.loc))
if(!P.silent) O.show_message(text("\icon[P] *[P.ttone]*"))
if( P.loc && isliving(P.loc) )
var/mob/living/L = P.loc
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>)"
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
P.overlays = null
P.overlays += image('pda.dmi', "pda-r")
else
U << "ERROR: Server isn't responding."
// pAI Message
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
P.overlays = null
P.overlays += image('pda.dmi', "pda-r")
else
U << "ERROR: Server isn't responding."
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
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.
if(MS.active)
useMS = MS
break
if(useMS) // only send the message if it's stable
useMS.send_pda_message("[P.owner]","[owner]","[t]")
tnote += "<i><b>&rarr; To [P]:</b></i><br>[t]<br>"
P.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[P];soft=pdamessage;target=\ref[src]'>[src]</a>:</b></i><br>[t]<br>"
if (prob(15)) //Give the AI a chance of intercepting the message
var/who = src
if(prob(50))
who = P
for (var/mob/living/silicon/ai/ai in world)
// Allows other AIs to intercept the message but the AI won't intercept their own message.
if(ai.aiPDA != P && ai.aiPDA != src)
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
if (!P.silent)
playsound(P.loc, 'twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, P.loc))
if(!P.silent) O.show_message(text("\icon[P] *[P.ttone]*"))
if( P.loc && isliving(P.loc) )
var/mob/living/L = P.loc
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>)"
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
else
U << "ERROR: Server isn't responding."
/obj/item/device/pda/verb/verb_remove_id()
set category = "Object"
@@ -1012,7 +996,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/proc/explode() //This needs tuning.
if(!src.detonate) return
var/turf/T = get_turf(src.loc)
if (ismob(loc))
@@ -1027,9 +1011,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
del(src)
return
/obj/item/device/pda/ai/explode()
return // No explosions for the AI pda!
/obj/item/device/pda/Del()
PDAs -= src
if (src.id)
@@ -1118,6 +1099,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
usr << "You can't do that because you are dead!"
return
if(!isnull(aiPDA))
//0
aiPDA.silent = !aiPDA.silent
usr << "<span class='notice'>PDA ringer toggled [(aiPDA.silent ? "Off" : "On")]!</span>"
else
+1
View File
@@ -14,6 +14,7 @@
var/translate_hive = 0
var/obj/item/device/encryptionkey/keyslot1 = null
var/obj/item/device/encryptionkey/keyslot2 = null
maxf = 1489
/obj/item/device/radio/headset/New()
..()
+6 -4
View File
@@ -24,6 +24,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
var/list/channels = list() //see communications.dm for full list. First channes is a "default" for :h
var/subspace_transmission = 0
var/syndie = 0//Holder to see if it's a syndicate encrpyed radio
var/maxf = 1499
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
flags = FPRINT | CONDUCT | TABLEPASS
slot_flags = SLOT_BELT
@@ -65,10 +66,11 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
if(freerange)
if(frequency < 1200 || frequency > 1600)
frequency = sanitize_frequency(frequency)
else if (frequency < 1441 || frequency > 1489)
frequency = sanitize_frequency(frequency, maxf)
// The max freq is higher than a regular headset to decrease the chance of people listening in, if you use the higher channels.
else if (frequency < 1441 || frequency > maxf)
world.log << "[src] ([type]) has a frequency of [frequency], sanitizing."
frequency = sanitize_frequency(frequency)
frequency = sanitize_frequency(frequency, maxf)
set_frequency(frequency)
@@ -181,7 +183,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
else if (href_list["freq"])
var/new_frequency = (frequency + text2num(href_list["freq"]))
if (!freerange || (frequency < 1200 || frequency > 1600))
new_frequency = sanitize_frequency(new_frequency)
new_frequency = sanitize_frequency(new_frequency, maxf)
set_frequency(new_frequency)
if (traitor_frequency && frequency == traitor_frequency)