mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 00:55:20 +01:00
Fully implements the ID Card design document (#56910)
Co-authored-by: Rohesie <rohesie@gmail.com>
This commit is contained in:
@@ -195,30 +195,32 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/worn = H.wear_id
|
||||
var/obj/item/card/id/id = null
|
||||
|
||||
if(worn)
|
||||
id = worn.GetID()
|
||||
if(id)
|
||||
id.icon_state = "gold"
|
||||
id.access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
|
||||
else
|
||||
id = new /obj/item/card/id/gold(H.loc)
|
||||
id.access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
|
||||
id.registered_name = H.real_name
|
||||
id.assignment = "Captain"
|
||||
id.update_label()
|
||||
if(id == worn)
|
||||
worn = null
|
||||
qdel(id)
|
||||
|
||||
if(worn)
|
||||
if(istype(worn, /obj/item/pda))
|
||||
var/obj/item/pda/PDA = worn
|
||||
PDA.id = id
|
||||
id.forceMove(PDA)
|
||||
else if(istype(worn, /obj/item/storage/wallet))
|
||||
var/obj/item/storage/wallet/W = worn
|
||||
W.front_id = id
|
||||
id.forceMove(W)
|
||||
W.update_appearance()
|
||||
else
|
||||
H.equip_to_slot(id,ITEM_SLOT_ID)
|
||||
id = new /obj/item/card/id/advanced/debug()
|
||||
|
||||
id.registered_name = H.real_name
|
||||
id.update_label()
|
||||
id.update_icon()
|
||||
|
||||
if(worn)
|
||||
if(istype(worn, /obj/item/pda))
|
||||
var/obj/item/pda/PDA = worn
|
||||
PDA.id = id
|
||||
id.forceMove(PDA)
|
||||
else if(istype(worn, /obj/item/storage/wallet))
|
||||
var/obj/item/storage/wallet/W = worn
|
||||
W.front_id = id
|
||||
id.forceMove(W)
|
||||
W.update_icon()
|
||||
else
|
||||
H.equip_to_slot(id,ITEM_SLOT_ID)
|
||||
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
Reference in New Issue
Block a user