Merge pull request #9900 from Ghommie/Ghommie-cit388

fixing a get_idcard runtime. or The betrayal of the ?. operator
This commit is contained in:
Putnam3145
2019-11-22 15:41:52 -08:00
committed by GitHub
+2 -2
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()