Handheld IDs are valid for authentication (#40456)

cl XDTM
tweak: Holding an ID in your hands uses it instead of your worn ID for authentication purposes.
tweak: If you don't have an ID in your id slot, the belt slot will be checked as well.
/cl

Fixes #40437

Makes sense if you want to use a specific access card without playing pocket tetris. The get_idcard has an argument for prioritizing worn id over held id, for stuff like identification.
This commit is contained in:
XDTM
2018-10-03 09:58:37 +13:00
committed by oranges
parent 7d05db3cdd
commit 6f21758521
15 changed files with 47 additions and 37 deletions
@@ -97,14 +97,9 @@
card_slot = computer.all_components[MC_CARD]
D = card_slot.GetID()
var/mob/living/carbon/human/h = user
var/obj/item/card/id/I = h.get_idcard()
var/obj/item/card/id/C = h.get_active_held_item()
if(C)
C = C.GetID()
if(!(C && istype(C)))
C = null
var/obj/item/card/id/I = h.get_idcard(TRUE)
if(!I && !C && !D)
if(!I && !D)
if(loud)
to_chat(user, "<span class='danger'>\The [computer] flashes an \"RFID Error - Unable to scan ID\" warning.</span>")
return 0
@@ -112,9 +107,6 @@
if(I)
if(access_to_check in I.GetAccess())
return 1
else if(C)
if(access_to_check in C.GetAccess())
return 1
else if(D)
if(access_to_check in D.GetAccess())
return 1