diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 3560d4e37f..674e746c28 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -66,7 +66,19 @@ var/global/list/obj/item/device/pda/PDAs = list() /obj/item/device/pda/examine(mob/user) if(..(user, 1)) - user << "The time [stationtime2text()] is displayed in the corner of the screen." + to_chat(user, "The time [stationtime2text()] is displayed in the corner of the screen.") + + +/obj/item/device/pda/AltClick() + if(issilicon(usr)) + return + + if ( can_use(usr) ) + if(id) + remove_id() + else + to_chat(usr, "This PDA does not have an ID in it.") + /obj/item/device/pda/medical default_cartridge = /obj/item/weapon/cartridge/medical @@ -247,7 +259,7 @@ var/global/list/obj/item/device/pda/PDAs = list() set name = "Send Message" set src in usr if(usr.stat == 2) - usr << "You can't send PDA messages because you are dead!" + to_chat(usr, "You can't send PDA messages because you are dead!") return var/list/plist = available_pdas() if (plist) @@ -262,28 +274,27 @@ var/global/list/obj/item/device/pda/PDAs = list() set name = "Toggle Sender/Receiver" set src in usr if(usr.stat == 2) - usr << "You can't do that because you are dead!" + to_chat(usr, "You can't send PDA messages because you are dead!") return toff = !toff - usr << "PDA sender/receiver toggled [(toff ? "Off" : "On")]!" + to_chat(usr, "PDA sender/receiver toggled [(toff ? "Off" : "On")]!") /obj/item/device/pda/ai/verb/cmd_toggle_pda_silent() set category = "AI IM" set name = "Toggle Ringer" set src in usr if(usr.stat == 2) - usr << "You can't do that because you are dead!" + to_chat(usr, "You can't send PDA messages because you are dead!") return message_silent=!message_silent - usr << "PDA ringer toggled [(message_silent ? "Off" : "On")]!" - + to_chat(usr, "PDA ringer toggled [(message_silent ? "Off" : "On")]!") /obj/item/device/pda/ai/verb/cmd_show_message_log() set category = "AI IM" set name = "Show Message Log" set src in usr if(usr.stat == 2) - usr << "You can't do that because you are dead!" + to_chat(usr, "You can't send PDA messages because you are dead!") return var/HTML = "AI PDA Message Log" for(var/index in tnote) @@ -809,7 +820,7 @@ var/global/list/obj/item/device/pda/PDAs = list() if (in_range(src, U) && loc == U) if (t) if(src.hidden_uplink && hidden_uplink.check_trigger(U, lowertext(t), lowertext(lock_code))) - U << "The PDA softly beeps." + to_chat(U, "The PDA softly beeps.") ui.close() else t = sanitize(t, 20) @@ -856,7 +867,7 @@ var/global/list/obj/item/device/pda/PDAs = list() U.show_message("Virus sent!", 1) P.honkamt = (rand(15,20)) else - U << "PDA not found." + to_chat(U, "PDA not found.") else ui.close() return 0 @@ -872,7 +883,7 @@ var/global/list/obj/item/device/pda/PDAs = list() P.ttone = "silence" P.newstone = "silence" else - U << "PDA not found." + to_chat(U, "PDA not found.") else ui.close() return 0 @@ -928,9 +939,10 @@ var/global/list/obj/item/device/pda/PDAs = list() message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge and succeeded.", 1) detonate_act(P) else - U << "No charges left." + to_chat(U, "No charges left.") + else - U << "PDA not found." + to_chat(U, "PDA not found.") else U.unset_machine() ui.close() @@ -1048,7 +1060,7 @@ var/global/list/obj/item/device/pda/PDAs = list() if (ismob(loc)) var/mob/M = loc M.put_in_hands(id) - usr << "You remove the ID from the [name]." + to_chat(usr, "You remove the ID from the [name].") else id.loc = get_turf(src) id = null @@ -1080,11 +1092,11 @@ var/global/list/obj/item/device/pda/PDAs = list() if(reception.message_server && (reception.telecomms_reception & TELECOMMS_RECEPTION_SENDER)) // only send the message if it's stable if(reception.telecomms_reception & TELECOMMS_RECEPTION_RECEIVER == 0) // Does our recipient have a broadcaster on their level? - U << "ERROR: Cannot reach recipient." + to_chat(U, "ERROR: Cannot reach recipient.") return var/send_result = reception.message_server.send_pda_message("[P.owner]","[owner]","[t]") if (send_result) - U << "ERROR: Messaging server rejected your message. Reason: contains '[send_result]'." + to_chat(U, "ERROR: Messaging server rejected your message. Reason: contains '[send_result]'.") return tnote.Add(list(list("sent" = 1, "owner" = "[P.owner]", "job" = "[P.ownjob]", "message" = "[t]", "target" = "\ref[P]"))) @@ -1113,7 +1125,7 @@ var/global/list/obj/item/device/pda/PDAs = list() P.new_message_from_pda(src, t) nanomanager.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message else - U << "ERROR: Messaging server is not responding." + to_chat(U, "ERROR: Messaging server is not responding.") /obj/item/device/pda/proc/new_info(var/beep_silent, var/message_tone, var/reception_message) if (!beep_silent) @@ -1176,9 +1188,9 @@ var/global/list/obj/item/device/pda/PDAs = list() if(can_use(usr)) mode = 0 nanomanager.update_uis(src) - usr << "You press the reset button on \the [src]." + to_chat(usr, "You press the reset button on \the [src].") else - usr << "You cannot do this while restrained." + to_chat(usr, "You cannot do this while restrained.") /obj/item/device/pda/verb/verb_remove_id() set category = "Object" @@ -1192,9 +1204,9 @@ var/global/list/obj/item/device/pda/PDAs = list() if(id) remove_id() else - usr << "This PDA does not have an ID in it." + to_chat(usr, "This PDA does not have an ID in it.") else - usr << "You cannot do this while restrained." + to_chat(usr, "You cannot do this while restrained.") /obj/item/device/pda/verb/verb_remove_pen() @@ -1212,13 +1224,13 @@ var/global/list/obj/item/device/pda/PDAs = list() var/mob/M = loc if(M.get_active_hand() == null) M.put_in_hands(O) - usr << "You remove \the [O] from \the [src]." + to_chat(usr, "You remove \the [O] from \the [src].") return O.loc = get_turf(src) else - usr << "This PDA does not have a pen in it." + to_chat(usr, "This PDA does not have a pen in it.") else - usr << "You cannot do this while restrained." + to_chat(usr, "You cannot do this while restrained.") /obj/item/device/pda/verb/verb_remove_cartridge() set category = "Object" @@ -1241,9 +1253,9 @@ var/global/list/obj/item/device/pda/PDAs = list() if (cartridge.radio) cartridge.radio.hostpda = null cartridge = null - usr << "You remove \the [cartridge] from the [name]." + to_chat(usr, "You remove \the [cartridge] from the [name].") else - usr << "You cannot do this while restrained." + to_chat(usr, "You cannot do this while restrained.") /obj/item/device/pda/proc/id_check(mob/user as mob, choice as num)//To check for IDs; 1 for in-pda use, 2 for out of pda use. if(choice == 1) @@ -1273,7 +1285,7 @@ var/global/list/obj/item/device/pda/PDAs = list() cartridge = C user.drop_item() cartridge.loc = src - user << "You insert [cartridge] into [src]." + to_chat(usr, "You insert [cartridge] into [src].") nanomanager.update_uis(src) // update all UIs attached to src if(cartridge.radio) cartridge.radio.hostpda = src @@ -1281,19 +1293,19 @@ var/global/list/obj/item/device/pda/PDAs = list() else if(istype(C, /obj/item/weapon/card/id)) var/obj/item/weapon/card/id/idcard = C if(!idcard.registered_name) - user << "\The [src] rejects the ID." + to_chat(user, "\The [src] rejects the ID.") return if(!owner) owner = idcard.registered_name ownjob = idcard.assignment ownrank = idcard.rank name = "PDA-[owner] ([ownjob])" - user << "Card scanned." + to_chat(user, "Card scanned.") else //Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand. if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) ) if(id_check(user, 2)) - user << "You put the ID into \the [src]'s slot." + to_chat(user, "You put the ID into \the [src]'s slot.") updateSelfDialog()//Update self dialog on success. return //Return in case of failed check or when successful. updateSelfDialog()//For the non-input related code. @@ -1301,16 +1313,16 @@ var/global/list/obj/item/device/pda/PDAs = list() user.drop_item() C.loc = src pai = C - user << "You slot \the [C] into [src]." + to_chat(user, "You slot \the [C] into \the [src].") nanomanager.update_uis(src) // update all UIs attached to src else if(istype(C, /obj/item/weapon/pen)) var/obj/item/weapon/pen/O = locate() in src if(O) - user << "There is already a pen in \the [src]." + to_chat(user, "There is already a pen in \the [src].") else user.drop_item() C.loc = src - user << "You slide \the [C] into \the [src]." + to_chat(user, "You slot \the [C] into \the [src].") return /obj/item/device/pda/attack(mob/living/C as mob, mob/living/user as mob) @@ -1346,18 +1358,18 @@ var/global/list/obj/item/device/pda/PDAs = list() if(2) if (!istype(C:dna, /datum/dna)) - user << "No fingerprints found on [C]" + to_chat(user, "No fingerprints found on [C]") else - user << text("\The [C]'s Fingerprints: [md5(C:dna.uni_identity)]") + to_chat(user, text("\The [C]'s Fingerprints: [md5(C:dna.uni_identity)]")) if ( !(C:blood_DNA) ) - user << "No blood found on [C]" + to_chat(user, "No blood found on [C]") if(C:blood_DNA) qdel(C:blood_DNA) else - user << "Blood found on [C]. Analysing..." + to_chat(user, "Blood found on [C]. Analysing...") spawn(15) for(var/blood in C:blood_DNA) - user << "Blood type: [C:blood_DNA[blood]]\nDNA: [blood]" + to_chat(user, "Blood type: [C:blood_DNA[blood]]\nDNA: [blood]") if(4) for (var/mob/O in viewers(C, null)) @@ -1379,13 +1391,13 @@ var/global/list/obj/item/device/pda/PDAs = list() if(!isnull(A.reagents)) if(A.reagents.reagent_list.len > 0) var/reagents_length = A.reagents.reagent_list.len - user << "[reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found." + to_chat(user, "[reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found.") for (var/re in A.reagents.reagent_list) - user << " [re]" + to_chat(user," [re]") else - user << "No active chemical agents found in [A]." + to_chat(user,"No active chemical agents found in [A].") else - user << "No significant chemical agents found in [A]." + to_chat(user,"No significantchemical agents found in [A].") if(5) analyze_gases(A, user) @@ -1437,8 +1449,7 @@ var/global/list/obj/item/device/pda/PDAs = list() // feature to the PDA, which would better convey the availability of the feature, but this will work for now. // Inform the user - user << "Paper scanned and OCRed to notekeeper." //concept of scanning paper copyright brainoblivion 2009 - + to_chat(user,"Paper scanned and OCRed to notekeeper.") //concept of scanning paper copyright brainoblivion 2009 /obj/item/device/pda/proc/explode() //This needs tuning. //Sure did. @@ -1469,7 +1480,7 @@ var/global/list/obj/item/device/pda/PDAs = list() var/list/namecounts = list() if (toff) - usr << "Turn on your receiver in order to send messages." + to_chat(usr, "Turn on your receiver in order to send messages.") return for (var/obj/item/device/pda/P in PDAs) diff --git a/html/changelogs/LorenLuke - PDA Altclick.yml b/html/changelogs/LorenLuke - PDA Altclick.yml new file mode 100644 index 0000000000..8e8b142b6a --- /dev/null +++ b/html/changelogs/LorenLuke - PDA Altclick.yml @@ -0,0 +1,36 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: LorenLuke + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Allows removal of PDA ID with alt-click."