mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
TRAIT_UNKNOWN (#27471)
This commit is contained in:
@@ -88,6 +88,8 @@
|
||||
return ""
|
||||
|
||||
/mob/living/carbon/examine(mob/user)
|
||||
if(HAS_TRAIT(src, TRAIT_UNKNOWN))
|
||||
return list("<span class='notice'>You're struggling to make out any details...</span>")
|
||||
var/skipgloves = FALSE
|
||||
var/skipsuitstorage = FALSE
|
||||
var/skipjumpsuit = FALSE
|
||||
|
||||
@@ -284,6 +284,8 @@
|
||||
|
||||
// Get rank from ID, ID inside PDA, PDA, ID in wallet, etc.
|
||||
/mob/living/carbon/human/proc/get_authentification_rank(if_no_id = "No id", if_no_job = "No job")
|
||||
if(HAS_TRAIT(src, TRAIT_UNKNOWN))
|
||||
return if_no_id
|
||||
var/obj/item/card/id/id = wear_id?.GetID()
|
||||
if(istype(id))
|
||||
return id.rank || if_no_job
|
||||
@@ -292,6 +294,8 @@
|
||||
//gets assignment from ID, PDA, Wallet, etc.
|
||||
//This should not be relied on for authentication, because PDAs show their owner's job, even if an ID is not inserted
|
||||
/mob/living/carbon/human/proc/get_assignment(if_no_id = "No id", if_no_job = "No job")
|
||||
if(HAS_TRAIT(src, TRAIT_UNKNOWN))
|
||||
return if_no_id
|
||||
if(!wear_id)
|
||||
return if_no_id
|
||||
var/obj/item/card/id/id = wear_id.GetID()
|
||||
@@ -331,6 +335,8 @@
|
||||
|
||||
//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/get_visible_name(id_override = FALSE)
|
||||
if(HAS_TRAIT(src, TRAIT_UNKNOWN))
|
||||
return "Unknown"
|
||||
if(name_override)
|
||||
return name_override
|
||||
if(wear_mask && (wear_mask.flags_inv & HIDEFACE)) //Wearing a mask which hides our face, use id-name if possible
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/GetVoice()
|
||||
if(HAS_TRAIT(src, TRAIT_UNKNOWN))
|
||||
return "Unknown"
|
||||
|
||||
var/has_changer = HasVoiceChanger()
|
||||
|
||||
if(has_changer)
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_RESTRAINED), PROC_REF(on_restrained_trait_gain))
|
||||
RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_RESTRAINED), PROC_REF(on_restrained_trait_loss))
|
||||
|
||||
RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_UNKNOWN), PROC_REF(on_unknown_trait))
|
||||
RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_UNKNOWN), PROC_REF(on_unknown_trait))
|
||||
|
||||
|
||||
/// Called when [TRAIT_KNOCKEDOUT] is added to the mob.
|
||||
/mob/living/proc/on_knockedout_trait_gain(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
@@ -160,3 +164,11 @@
|
||||
REMOVE_TRAIT(src, TRAIT_KNOCKEDOUT, TRAIT_FAKEDEATH)
|
||||
remove_status_effect(STATUS_EFFECT_REVIVABLE)
|
||||
|
||||
/// Gaining or losing [TRAIT_UNKNOWN] updates our name and our sechud
|
||||
/mob/living/proc/on_unknown_trait(datum/source)
|
||||
SIGNAL_HANDLER // SIGNAL_ADDTRAIT(TRAIT_UNKNOWN), SIGNAL_REMOVETRAIT(TRAIT_UNKNOWN)
|
||||
addtimer(CALLBACK(src, PROC_REF(on_unknown_trait_part_2)), 0.1 SECONDS) // Remove signal is sent before the trait is removed, we need to wait a tick
|
||||
|
||||
/mob/living/proc/on_unknown_trait_part_2()
|
||||
name = get_visible_name()
|
||||
sec_hud_set_ID()
|
||||
|
||||
@@ -1189,3 +1189,5 @@
|
||||
/mob/living/proc/can_remote_apc_interface(obj/machinery/power/apc/ourapc)
|
||||
return FALSE
|
||||
|
||||
/mob/living/proc/sec_hud_set_ID()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user