- Added a 'remove ID' verb to PDAs which attempts to remove the ID from a PDA. If your active hand is empty it puts it there, otherwise it puts it on the floor under you

- Added this to the changelog.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3531 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz@gmail.com
2012-04-30 01:07:07 +00:00
parent d484c5adab
commit e3c8258c8c
2 changed files with 40 additions and 49 deletions
+29 -12
View File
@@ -197,8 +197,8 @@
if (0)
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 += text("<A href='?src=\ref[];choice=UpdateInfo'>[]</A><br>", src, (id ? "Update PDA Info" : ""))
dat += text("ID: <A href='?src=\ref[src];choice=Authenticate'>[id ? "[id.registered], [id.assignment]" : "----------"]")
dat += text("<A href='?src=\ref[src];choice=UpdateInfo'>[id ? "Update PDA Info" : ""]</A><br>")
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]"
@@ -687,19 +687,36 @@
U << browse(null, "window=pda")
return
/obj/item/device/pda/proc/remove_id()
if (id)
if (istype(loc, /mob))
var/mob/M = loc
if(M.equipped() == null)
M.put_in_hand(id)
id = null
usr << "\blue You remove the ID from the [name]."
return
id.loc = get_turf(src)
id = null
/obj/item/device/pda/verb/verb_remove_id()
set category = "Object"
set name = "Remove id"
set src in usr
if ( !(usr.stat || usr.restrained()) )
if(id)
remove_id()
else
usr << "\blue This PDA does not have an ID in it."
else
usr << "\blue 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)
if (id)
if (istype(loc, /mob))
var/obj/item/W = loc:equipped()
var/emptyHand = (W == null)
if(emptyHand)
id.DblClick()
if(!istype(id.loc, /obj/item/device/pda))
id = null
else
id.loc = loc
id = null
remove_id()
else
var/obj/item/I = user.equipped()
if (istype(I, /obj/item/weapon/card/id))