/*
CONTAINS:
DATA CARD
ID CARD
FINGERPRINT CARD HOLDER
FINGERPRINT CARD
*/
// DATA CARDS
/obj/item/weapon/card/data/verb/label(t as text)
set name = "Label Disk"
set category = "Object"
set src in usr
if (t)
src.name = text("Data Disk- '[]'", t)
else
src.name = "Data Disk"
src.add_fingerprint(usr)
return
// ID CARDS
/obj/item/weapon/card/id/attack_self(mob/user as mob)
for(var/mob/O in viewers(user, null))
O.show_message(text("[] shows you: \icon[] []: assignment: []", user, src, src.name, src.assignment), 1)
src.add_fingerprint(user)
return
/obj/item/weapon/card/id/verb/read()
set name = "Read ID Card"
set category = "Object"
set src in usr
usr << text("\icon[] []: The current assignment on the card is [].", src, src.name, src.assignment)
return
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
if(!src.registered)
src.registered = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)
src.assignment = input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")
src.name = "[src.registered]'s ID Card ([src.assignment])"
user << "\blue You successfully forge the ID card."
else
..()
/obj/item/weapon/card/id/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W,/obj/item/weapon/photo))
if(!(PHOTO))
src.PHOTO = W
usr.before_take_item(W)
W.loc = src
//src.orient2hud(usr)
add_fingerprint(usr)
usr << "\blue You add the photo to the ID"
else
usr << "\blue There is already a photo on this ID"
//PHOTO.loc = locate(0,0,0)
/obj/item/weapon/card/id/verb/removePhoto()
set name = "Remove Photo From ID"
set category = "Object"
if(PHOTO)
contents -= PHOTO
PHOTO.loc = usr.loc
PHOTO.layer = 3
PHOTO = null
else
usr << "\blue There is no photo to remove"
// FINGERPRINT HOLDER
/obj/item/weapon/fcardholder/attack_self(mob/user as mob)
var/dat = "Clipboard
"
for(var/obj/item/weapon/f_card/P in src)
dat += text("[] Remove
", src, P, P.name, src, P)
user << browse(dat, "window=fcardholder")
onclose(user, "fcardholder")
return
/obj/item/weapon/fcardholder/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()))
return
if (usr.contents.Find(src))
usr.machine = src
if (href_list["remove"])
var/obj/item/P = locate(href_list["remove"])
if ((P && P.loc == src))
if ((usr.hand && !( usr.l_hand )))
usr.l_hand = P
P.loc = usr
P.layer = 20
usr.update_clothing()
else
if (!( usr.r_hand ))
usr.r_hand = P
P.loc = usr
P.layer = 20
usr.update_clothing()
src.add_fingerprint(usr)
P.add_fingerprint(usr)
src.update()
if (href_list["read"])
var/obj/item/weapon/f_card/P = locate(href_list["read"])
if ((P && P.loc == src))
if (!( istype(usr, /mob/living/carbon/human) ))
usr << browse(text("