Wallets now show proper jobs on Sechuds and Comms (#20089)

* Wallet time

* sirryan review

* whoops

* revert get_id_card change

* Farie review
This commit is contained in:
Contrabang
2023-01-18 22:52:09 -05:00
committed by GitHub
parent ea7bff0779
commit 276bf58f49
8 changed files with 122 additions and 146 deletions

View File

@@ -189,6 +189,11 @@ GLOBAL_LIST_EMPTY(PDAs)
id = null
playsound(src, 'sound/machines/terminal_eject.ogg', 50, TRUE)
if(ishuman(loc))
var/mob/living/carbon/human/wearing_human = loc
if(wearing_human.wear_id == src)
wearing_human.sec_hud_set_ID()
/obj/item/pda/verb/verb_remove_id()
set category = "Object"
set name = "Remove id"
@@ -246,7 +251,11 @@ GLOBAL_LIST_EMPTY(PDAs)
id = I
user.put_in_hands(old_id)
playsound(src, 'sound/machines/pda_button1.ogg', 50, TRUE)
return
if(ishuman(loc))
var/mob/living/carbon/human/wearing_human = loc
if(wearing_human.wear_id == src)
wearing_human.sec_hud_set_ID()
/obj/item/pda/attackby(obj/item/C, mob/user, params)
..()
@@ -394,3 +403,13 @@ GLOBAL_LIST_EMPTY(PDAs)
var/datum/data/pda/utility/flashlight/FL = find_program(/datum/data/pda/utility/flashlight)
if(FL && FL.fon)
FL.start()
/obj/item/pda/get_ID_assignment(if_no_id = "No id")
. = ..()
if(. == if_no_id) // We dont have an ID in us, check our cached job
return ownjob
/obj/item/pda/get_ID_rank(if_no_id = "No id")
. = ..()
if(. == if_no_id) // Ditto but rank
return ownrank