The ID Code Cleanup and Fixening (tm)

This commit is contained in:
kevinz000
2019-11-16 01:17:23 -07:00
committed by Dip
parent c59c9e88ae
commit c7db7cb2be
27 changed files with 467 additions and 364 deletions
@@ -584,7 +584,7 @@
return threatcount
//Check for ID
var/obj/item/card/id/idcard = get_idcard()
var/obj/item/card/id/idcard = get_idcard(FALSE)
if( (judgement_criteria & JUDGE_IDCHECK) && !idcard && name=="Unknown")
threatcount += 4
@@ -11,8 +11,8 @@
//gets assignment from ID or ID inside PDA or PDA itself
//Useful when player do something with computers
/mob/living/carbon/human/proc/get_assignment(if_no_id = "No id", if_no_job = "No job")
var/obj/item/card/id/id = get_idcard()
/mob/living/carbon/human/proc/get_assignment(if_no_id = "No id", if_no_job = "No job", hand_first = TRUE)
var/obj/item/card/id/id = get_idcard(hand_first)
if(id)
. = id.assignment
else
@@ -27,7 +27,7 @@
//gets name from ID or ID inside PDA or PDA itself
//Useful when player do something with computers
/mob/living/carbon/human/proc/get_authentification_name(if_no_id = "Unknown")
var/obj/item/card/id/id = get_idcard()
var/obj/item/card/id/id = get_idcard(FALSE)
if(id)
return id.registered_name
var/obj/item/pda/pda = wear_id
@@ -86,10 +86,15 @@
return
//gets ID card object from special clothes slot or null.
/mob/living/carbon/human/get_idcard()
if(wear_id)
return wear_id.GetID()
/mob/living/carbon/human/get_idcard(hand_first = TRUE)
. = ..()
if(. && hand_first)
return
//Check inventory slots
var/obj/item/card/id/id_card = wear_id?.GetID()
if(!id_card)
id_card = belt?.GetID()
return id_card || .
/mob/living/carbon/human/IsAdvancedToolUser()
if(HAS_TRAIT(src, TRAIT_MONKEYLIKE))
@@ -462,8 +462,8 @@
return
sync_lighting_plane_alpha()
/mob/living/simple_animal/get_idcard()
return access_card
/mob/living/simple_animal/get_idcard(hand_first = TRUE)
return ..() || access_card
/mob/living/simple_animal/OpenCraftingMenu()
if(dextrous)
-4
View File
@@ -942,10 +942,6 @@
/mob/proc/can_hold_items()
return FALSE
/mob/proc/get_idcard()
return
/mob/vv_get_dropdown()
. = ..()
. += "---"
+14
View File
@@ -506,3 +506,17 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
. = BLOOD_COLOR_BUG
//add more stuff to the switch if you have more blood colors for different types
// the defines are in _DEFINES/misc.dm
//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()
if(!.) //If so, then check the inactive hand
held_item = get_inactive_held_item()
. = held_item?.GetID()
/mob/proc/get_id_in_hand()
var/obj/item/held_item = get_active_held_item()
if(!held_item)
return
return held_item.GetID()