Wallets and cards.

This commit is contained in:
Segrain
2013-10-21 05:10:33 +03:00
parent 188e68feb8
commit 6655ae9b11
2 changed files with 12 additions and 11 deletions

View File

@@ -468,21 +468,20 @@
//gets name from ID or PDA itself, ID inside PDA doesn't matter
//Useful when player is being seen by other mobs
/mob/living/carbon/human/proc/get_id_name(var/if_no_id = "Unknown")
var/obj/item/device/pda/pda = wear_id
var/obj/item/weapon/card/id/id = wear_id
if(istype(pda)) . = pda.owner
else if(istype(id)) . = id.registered_name
if(!.) . = if_no_id //to prevent null-names making the mob unclickable
. = if_no_id
if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/P = wear_id
return P.owner
if(wear_id)
var/obj/item/weapon/card/id/I = wear_id.GetID()
if(I)
return I.registered_name
return
//gets ID card object from special clothes slot or null.
/mob/living/carbon/human/proc/get_idcard()
var/obj/item/weapon/card/id/id = wear_id
var/obj/item/device/pda/pda = wear_id
if (istype(pda) && pda.id)
id = pda.id
if (istype(id))
return id
if(wear_id)
return wear_id.GetID()
//Added a safety check in case you want to shock a human mob directly through electrocute_act.
/mob/living/carbon/human/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/safety = 0)