mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-08-23 20:56:20 +01:00
cleaned up some ID-related procs
get_authentication_rank, get_assignment, and get_authentication_name cleaned up and standardized to use GetID(). All three now also display information based on what the PDA has when the PDA is visible, rather than the card inside. (Subject to change) BUGFIX - NEEDS TESTING - DO NOT MERGE
This commit is contained in:
@@ -484,50 +484,35 @@
|
||||
|
||||
// Get rank from ID, ID inside PDA, PDA, ID in wallet, etc.
|
||||
/mob/living/carbon/human/proc/get_authentification_rank(var/if_no_id = "No id", var/if_no_job = "No job")
|
||||
var/obj/item/device/pda/pda = wear_id
|
||||
if (istype(pda))
|
||||
if (pda.id)
|
||||
return pda.id.rank
|
||||
else
|
||||
return pda.ownrank
|
||||
if(wear_id istype obj/item/device/pda)
|
||||
return pda.ownrank
|
||||
var/obj/item/weapon/card/id/id = GetID()
|
||||
if(id)
|
||||
return id.rank ? id.rank : if_no_job
|
||||
else
|
||||
var/obj/item/weapon/card/id/id = get_idcard()
|
||||
if(id)
|
||||
return id.rank ? id.rank : if_no_job
|
||||
else
|
||||
return if_no_id
|
||||
return if_no_id
|
||||
|
||||
//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(var/if_no_id = "No id", var/if_no_job = "No job")
|
||||
var/obj/item/device/pda/pda = wear_id
|
||||
if (istype(pda))
|
||||
if (pda.id)
|
||||
return pda.id.assignment
|
||||
else
|
||||
return pda.ownjob
|
||||
if(wear_id istype obj/item/device/pda)
|
||||
return pda.ownjob
|
||||
var/obj/item/weapon/card/id/id = GetID()
|
||||
if(id)
|
||||
return id.assignment ? id.assignment : if_no_job
|
||||
else
|
||||
var/obj/item/weapon/card/id/id = get_idcard()
|
||||
if(id)
|
||||
return id.assignment ? id.assignment : if_no_job
|
||||
else
|
||||
return if_no_id
|
||||
return if_no_id
|
||||
|
||||
//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(var/if_no_id = "Unknown")
|
||||
var/obj/item/device/pda/pda = wear_id
|
||||
if (istype(pda))
|
||||
if (pda.id)
|
||||
return pda.id.registered_name
|
||||
else
|
||||
return pda.owner
|
||||
if(wear_id istype obj/item/device/pda)
|
||||
return pda.owner
|
||||
var/obj/item/weapon/card/id/id = GetID()
|
||||
if(id)
|
||||
return id.registered_name
|
||||
else
|
||||
var/obj/item/weapon/card/id/id = get_idcard()
|
||||
if(id)
|
||||
return id.registered_name
|
||||
else
|
||||
return if_no_id
|
||||
return if_no_id
|
||||
|
||||
//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere
|
||||
/mob/living/carbon/human/proc/get_visible_name()
|
||||
@@ -1649,4 +1634,4 @@
|
||||
var/datum/organ/internal/eyes = internal_organs_by_name["eyes"]
|
||||
if(eyes && istype(eyes) && !eyes.status & ORGAN_CUT_AWAY)
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user