fixing a get_idcard runtime. The betrayal of the ?.

This commit is contained in:
Ghommie
2019-11-21 09:23:05 +01:00
parent 64433ec8ab
commit bfeece4c6e

View File

@@ -522,10 +522,10 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
//gets ID card object from special clothes slot or null.
/mob/proc/get_idcard(hand_first = TRUE)
var/obj/item/held_item = get_active_held_item()
. = held_item?.GetID()
. = held_item ? held_item.GetID() : null
if(!.) //If so, then check the inactive hand
held_item = get_inactive_held_item()
. = held_item?.GetID()
. = held_item ? held_item.GetID() : null
/mob/proc/get_id_in_hand()
var/obj/item/held_item = get_active_held_item()