From 1b4d6517c7f4365ae744b93df8b69aae5762c68e Mon Sep 17 00:00:00 2001 From: "n3ophyt3@gmail.com" Date: Sun, 12 Dec 2010 04:37:39 +0000 Subject: [PATCH] You can now stick IDs in PDAs. If you look at your PDA window, there should be an option to stick an ID in, like with some computers. While carrying an ID, a PDA can be used for almost everything an ID can. While ID scanners can read cards through a PDA, it is difficult to shove a PDA into the ID slot on some computers. It is possible I missed some functions, but I was quite thorough in my sweep through the code. In the event of PDA destruction, any inserted ID is ejected unharmed. It is now possible to stick PDAs in your jumpsuit's ID slot. Since PDAs are named, you can disguise yourself as someone else using one. Beepsky/ED-209 can see through a PDA disguise if you stick your real ID in for access. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@592 316c924e-a436-60f5-8080-3fe189b3f50e --- code/WorkInProgress/cloning.dm | 4 +-- code/game/jobs/access.dm | 7 +++- code/game/jobs/jobprocs.dm | 12 ++++--- code/game/machinery/alarm.dm | 2 +- code/game/machinery/bots/cleanbot.dm | 2 +- code/game/machinery/bots/ed209bot.dm | 14 ++++++-- code/game/machinery/bots/floorbot.dm | 2 +- code/game/machinery/bots/medbot.dm | 2 +- code/game/machinery/bots/secbot.dm | 14 ++++++-- .../game/machinery/computer/communications.dm | 3 ++ code/game/machinery/computer/robot.dm | 3 ++ code/game/machinery/computer/shuttle.dm | 6 ++-- .../machinery/doors/airlock_electronics.dm | 9 +++-- code/game/machinery/navbeacon.dm | 2 +- code/game/machinery/singularity.dm | 4 +-- code/game/mecha/mecha.dm | 2 +- code/game/objects/closets/secure/personal.dm | 5 ++- code/game/objects/devices/PDA.dm | 33 ++++++++++++++++++- code/game/objects/radio/radio.dm | 8 ++++- code/game/supplyshuttle.dm | 6 ++++ code/modules/admin/admin.dm | 6 +++- code/modules/admin/verbs/debug.dm | 8 +++-- .../mob/living/carbon/human/examine.dm | 6 +++- code/modules/mob/living/carbon/human/human.dm | 33 +++++++++++++++---- .../mob/living/carbon/human/whisper.dm | 8 +++-- code/modules/mob/living/say.dm | 8 +++-- .../modules/mob/living/silicon/robot/robot.dm | 2 +- code/modules/mob/say.dm | 8 +++-- code/modules/power/apc.dm | 2 +- 29 files changed, 174 insertions(+), 47 deletions(-) diff --git a/code/WorkInProgress/cloning.dm b/code/WorkInProgress/cloning.dm index 2f6327d4ff..56de52dbb5 100644 --- a/code/WorkInProgress/cloning.dm +++ b/code/WorkInProgress/cloning.dm @@ -226,7 +226,7 @@ else if (src.menu == 4) var/obj/item/weapon/card/id/C = usr.equipped() - if (istype(C)) + if (istype(C)||istype(C, /obj/item/device/pda)) if(src.check_access(C)) src.records.Remove(src.active_record) del(src.active_record) @@ -568,7 +568,7 @@ //Let's unlock this early I guess. Might be too early, needs tweaking. /obj/machinery/clonepod/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/card/id)) + if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) if (!src.check_access(W)) user << "\red Access Denied." return diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index df3d93f365..51f9c789da 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -74,11 +74,16 @@ else if(istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/alien/humanoid)) var/mob/living/carbon/george = M //they can only hold things :( - if(george.equipped() && istype(george.equipped(), /obj/item/weapon/card/id) && src.check_access(george.equipped())) + if(george.equipped() && (istype(george.equipped(), /obj/item/weapon/card/id) || istype(george.equipped(), /obj/item/device/pda)) && src.check_access(george.equipped())) return 1 return 0 /obj/proc/check_access(obj/item/weapon/card/id/I) + + if (istype(I, /obj/item/device/pda)) + var/obj/item/device/pda/pda = I + I = pda.id + if(!src.req_access) //no requirements return 1 if(!istype(src.req_access, /list)) //something's very wrong diff --git a/code/game/jobs/jobprocs.dm b/code/game/jobs/jobprocs.dm index 0900da1a7c..0212ac5aee 100644 --- a/code/game/jobs/jobprocs.dm +++ b/code/game/jobs/jobprocs.dm @@ -607,11 +607,15 @@ //src.equip_if_possible(new /obj/item/device/radio/signaler(src), slot_belt) src.equip_if_possible(new /obj/item/device/pda(src), slot_belt) if (istype(src.belt, /obj/item/device/pda)) - src.belt:owner = src.real_name - src.belt.name = "PDA-[src.real_name]" + var/obj/item/device/pda/pda = src.belt + pda.owner = src.real_name + pda.ownjob = src.wear_id.assignment + pda.name = "PDA-[src.real_name]" if (istype(src.r_store, /obj/item/device/pda)) //damned mime PDAs not starting in belt slot - src.r_store:owner = src.real_name - src.r_store.name = "PDA-[src.real_name]" + var/obj/item/device/pda/pda = src.r_store + pda.owner = src.real_name + pda.ownjob = src.wear_id.assignment + pda.name = "PDA-[src.real_name]" /client/proc/mimewall() set category = "Mime" diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 1bb893fd1a..b8735585d6 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -268,7 +268,7 @@ O.show_message(text("\red [] has []activated []!", user, (stat&BROKEN) ? "de" : "re", src), 1) return - else if (istype(W, /obj/item/weapon/card/id))// trying to unlock the interface with an ID card + else if (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card if(stat & (NOPOWER|BROKEN)) user << "It does nothing" else diff --git a/code/game/machinery/bots/cleanbot.dm b/code/game/machinery/bots/cleanbot.dm index 3f109e6ff3..8b150b8b5c 100644 --- a/code/game/machinery/bots/cleanbot.dm +++ b/code/game/machinery/bots/cleanbot.dm @@ -101,7 +101,7 @@ text("[src.oddbutton ? "Yes" : "No" src.path = new() /obj/machinery/bot/cleanbot/attackby(obj/item/weapon/W, mob/user as mob) - if (istype(W, /obj/item/weapon/card/id)) + if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) if(src.allowed(usr)) src.locked = !src.locked user << "You [ src.locked ? "lock" : "unlock"] the [src] behaviour controls." diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm index 4e78a55c77..9157585dfc 100644 --- a/code/game/machinery/bots/ed209bot.dm +++ b/code/game/machinery/bots/ed209bot.dm @@ -172,7 +172,7 @@ Auto Patrol: []"}, src.on = 1 src.icon_state = "ed209[src.on]" mode = SECBOT_IDLE - else if (istype(W, /obj/item/weapon/card/id)) + else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) if (src.allowed(user)) src.locked = !src.locked user << "Controls are now [src.locked ? "locked." : "unlocked."]" @@ -649,8 +649,16 @@ Auto Patrol: []"}, if (src.check_records) for (var/datum/data/record/E in data_core.general) var/perpname = perp.name - if (perp:wear_id && perp:wear_id.registered) - perpname = perp.wear_id.registered + if (perp:wear_id) + var/obj/item/weapon/card/id/id = perp:wear_id + if(istype(perp:wear_id, /obj/item/device/pda)) + var/obj/item/device/pda/pda = perp:wear_id + id = pda.id + if (id) + perpname = id.registered + else + var/obj/item/device/pda/pda = perp:wear_id + perpname = pda.owner if (E.fields["name"] == perpname) for (var/datum/data/record/R in data_core.security) if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) diff --git a/code/game/machinery/bots/floorbot.dm b/code/game/machinery/bots/floorbot.dm index aeb6798ab3..ea63dd196e 100644 --- a/code/game/machinery/bots/floorbot.dm +++ b/code/game/machinery/bots/floorbot.dm @@ -91,7 +91,7 @@ del(T) user << "\red You load [loaded] tiles into the floorbot. He now contains [src.amount] tiles!" src.updateicon() - if(istype(W, /obj/item/weapon/card/id)) + if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) if(src.allowed(usr)) src.locked = !src.locked user << "You [src.locked ? "lock" : "unlock"] the [src] behaviour controls." diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm index 68baa1c6b2..bca6f5a1e1 100644 --- a/code/game/machinery/bots/medbot.dm +++ b/code/game/machinery/bots/medbot.dm @@ -182,7 +182,7 @@ src.on = 1 src.icon_state = "medibot[src.on]" - else if (istype(W, /obj/item/weapon/card/id)) + else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) if (src.allowed(user)) src.locked = !src.locked user << "Controls are now [src.locked ? "locked." : "unlocked."]" diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm index 8b64e611b7..27500919c1 100644 --- a/code/game/machinery/bots/secbot.dm +++ b/code/game/machinery/bots/secbot.dm @@ -172,7 +172,7 @@ Auto Patrol: []"}, src.on = 1 src.icon_state = "secbot[src.on]" mode = SECBOT_IDLE - else if (istype(W, /obj/item/weapon/card/id)) + else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) if (src.allowed(user)) src.locked = !src.locked user << "Controls are now [src.locked ? "locked." : "unlocked."]" @@ -621,8 +621,16 @@ Auto Patrol: []"}, if (src.check_records) for (var/datum/data/record/E in data_core.general) var/perpname = perp.name - if (perp:wear_id && perp:wear_id.registered) - perpname = perp.wear_id.registered + if (perp:wear_id) + var/obj/item/weapon/card/id/id = perp:wear_id + if(istype(perp:wear_id, /obj/item/device/pda)) + var/obj/item/device/pda/pda = perp:wear_id + id = pda.id + if (id) + perpname = id.registered + else + var/obj/item/device/pda/pda = perp:wear_id + perpname = pda.owner if (E.fields["name"] == perpname) for (var/datum/data/record/R in data_core.security) if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index a8961d5014..3dfc70eeed 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -19,6 +19,9 @@ if("login") var/mob/M = usr var/obj/item/weapon/card/id/I = M.equipped() + if (istype(I, /obj/item/device/pda)) + var/obj/item/device/pda/pda = I + I = pda.id if (I && istype(I)) if(src.check_access(I)) authenticated = 1 diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 5fb80ae545..abb2958e0f 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -137,6 +137,9 @@ else if (href_list["eject2"]) var/obj/item/weapon/card/id/I = usr.equipped() + if (istype(I, /obj/item/device/pda)) + var/obj/item/device/pda/pda = I + I = pda.id if (istype(I)) if(src.check_access(I)) if (!status) diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm index c7eb4bc5e8..0b9e94cb36 100644 --- a/code/game/machinery/computer/shuttle.dm +++ b/code/game/machinery/computer/shuttle.dm @@ -5,8 +5,10 @@ return - if (istype(W, /obj/item/weapon/card/id)) - + if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) + if (istype(W, /obj/item/device/pda)) + var/obj/item/device/pda/pda = W + W = pda.id if (!W:access) //no access user << "The access level of [W:registered]\'s card is not high enough. " return diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index 0b5271f497..9f122de37f 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -63,9 +63,12 @@ return if (href_list["login"]) - var/obj/item/I - if (istype(usr.l_hand, /obj/item/weapon/card/id)) I = usr.l_hand - if (istype(usr.r_hand, /obj/item/weapon/card/id)) I = usr.r_hand + var/obj/item/I = usr.equipped() + if (istype(I, /obj/item/device/pda)) + var/obj/item/device/pda/pda = I + I = pda.id +// if (istype(usr.l_hand, /obj/item/weapon/card/id)) I = usr.l_hand +// if (istype(usr.r_hand, /obj/item/weapon/card/id)) I = usr.r_hand if (I && src.check_access(I)) src.locked = 0 src.last_configurator = I:registered diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index b694823af3..91813b6ee8 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -111,7 +111,7 @@ updateicon() - else if (istype(I, /obj/item/weapon/card/id)) + else if (istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda)) if(open) if (src.allowed(user)) src.locked = !src.locked diff --git a/code/game/machinery/singularity.dm b/code/game/machinery/singularity.dm index 9e6d1f03b5..03a25628c0 100644 --- a/code/game/machinery/singularity.dm +++ b/code/game/machinery/singularity.dm @@ -674,7 +674,7 @@ However people seem to like it for some reason. user << "You cut the emitter free from the floor." return - if(istype(W, /obj/item/weapon/card/id)) + if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) if (src.allowed(user)) src.locked = !src.locked user << "Controls are now [src.locked ? "locked." : "unlocked."]" @@ -1218,7 +1218,7 @@ However people seem to like it for some reason. user << "You cut the field generator free from the floor." return - if(istype(W, /obj/item/weapon/card/id)) + if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) if (src.allowed(user)) src.locked = !src.locked user << "Controls are now [src.locked ? "locked." : "unlocked."]" diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 0c1368c5df..8b96586425 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -497,7 +497,7 @@ /obj/mecha/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/card/id)) + if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) if(src.internals_access_allowed(usr)) if(state==0) state = 1 diff --git a/code/game/objects/closets/secure/personal.dm b/code/game/objects/closets/secure/personal.dm index 6a7592ea33..4863143bd5 100644 --- a/code/game/objects/closets/secure/personal.dm +++ b/code/game/objects/closets/secure/personal.dm @@ -16,7 +16,10 @@ src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet user.drop_item() if (W) W.loc = src.loc - else if (istype(W, /obj/item/weapon/card/id)) + else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) + if(istype(W, /obj/item/device/pda)) + var/obj/item/device/pda/pda = W + W = pda.id if(src.broken) user << "\red It appears to be broken." return diff --git a/code/game/objects/devices/PDA.dm b/code/game/objects/devices/PDA.dm index 0f3b2721dd..573398a25a 100644 --- a/code/game/objects/devices/PDA.dm +++ b/code/game/objects/devices/PDA.dm @@ -34,6 +34,8 @@ var/obj/item/weapon/integrated_uplink/uplink = null var/message1 // used for status_displays var/message2 + var/obj/item/weapon/card/id/id = null //Making it possible to slot an ID card into the PDA so it can function as both. + var/ownjob = null //related to above /obj/item/device/pda/medical default_cartridge = /obj/item/weapon/cartridge/medical @@ -494,7 +496,9 @@ switch (src.mode) if (0) dat += "

PERSONAL DATA ASSISTANT

" - dat += "Owner: [src.owner]

" + dat += "Owner: [src.owner], [src.ownjob]
" + dat += text("ID:
[]", src, (src.id ? "[src.id.registered], [src.id.assignment]" : "----------")) + dat += "

" dat += "

General Functions

" dat += "