mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Makes 'Plastic Surgery' names include held ID Cards (#14168)
* Update plastic_surgery.dm * Fix Thanks to AA for basically writing the code for me. * Added 'get_id_from_hands' proc * Changed held ID check to use said proc * ID cards on patients body are now also shown Probably overthinking it as usual. Also added a couple of comments. * Tweaks
This commit is contained in:
@@ -542,6 +542,41 @@
|
||||
if(istype(id))
|
||||
return id
|
||||
|
||||
//Gets ID card object from hands only
|
||||
/mob/living/carbon/human/proc/get_id_from_hands()
|
||||
var/obj/item/card/id/ID
|
||||
var/obj/item/pda/PDA
|
||||
var/obj/item/storage/wallet/W
|
||||
var/active_hand = get_active_hand()
|
||||
var/inactive_hand = get_inactive_hand()
|
||||
|
||||
//ID
|
||||
if(istype(active_hand, /obj/item/card/id) || istype(inactive_hand, /obj/item/card/id))
|
||||
if(istype(active_hand, ID))
|
||||
ID = active_hand
|
||||
else
|
||||
ID = inactive_hand
|
||||
|
||||
//PDA
|
||||
else if(istype(active_hand, /obj/item/pda) || istype(inactive_hand, /obj/item/pda))
|
||||
if(istype(active_hand, PDA))
|
||||
PDA = active_hand
|
||||
else
|
||||
PDA = inactive_hand
|
||||
if(PDA.id)
|
||||
ID = PDA.id
|
||||
|
||||
//Wallet
|
||||
else if(istype(active_hand, /obj/item/storage/wallet) || istype(inactive_hand, /obj/item/storage/wallet))
|
||||
if(istype(active_hand, W))
|
||||
W = active_hand
|
||||
else
|
||||
W = inactive_hand
|
||||
if(W.front_id)
|
||||
ID = W.front_id
|
||||
|
||||
return ID
|
||||
|
||||
/mob/living/carbon/human/update_sight()
|
||||
if(!client)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user