mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
TRAIT_UNKNOWN (#27471)
This commit is contained in:
@@ -243,6 +243,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
#define TRAIT_EMP_RESIST "emp_resist" //The mob will take less damage from EMPs
|
||||
#define TRAIT_MINDFLAYER_NULLIFIED "flayer_nullified" //The mindflayer will not be able to activate their abilities, or drain swarms from people
|
||||
#define TRAIT_FLYING "flying"
|
||||
#define TRAIT_UNKNOWN "unknown" // The person with this trait always appears as 'unknown'.
|
||||
#define TRAIT_CRYO_DESPAWNING "cryo_despawning" // dont adminbus this please
|
||||
|
||||
//***** MIND TRAITS *****/
|
||||
|
||||
@@ -104,8 +104,8 @@ GLOBAL_LIST_INIT(traits_by_type, list(
|
||||
"TRAIT_NON_INFECTIOUS_ZOMBIE" = TRAIT_NON_INFECTIOUS_ZOMBIE,
|
||||
"TRAIT_CANNOT_PULL" = TRAIT_CANNOT_PULL,
|
||||
"TRAIT_BSG_IMMUNE" = TRAIT_BSG_IMMUNE,
|
||||
"TRAIT_FLYING" = TRAIT_FLYING
|
||||
|
||||
"TRAIT_FLYING" = TRAIT_FLYING,
|
||||
"TRAIT_UNKNOWN" = TRAIT_UNKNOWN
|
||||
),
|
||||
|
||||
/datum/mind = list(
|
||||
|
||||
@@ -222,10 +222,10 @@
|
||||
|
||||
//HOOKS
|
||||
|
||||
/mob/living/carbon/human/proc/sec_hud_set_ID()
|
||||
/mob/living/carbon/human/sec_hud_set_ID()
|
||||
var/image/holder = hud_list[ID_HUD]
|
||||
holder.icon_state = "hudunknown"
|
||||
if(wear_id)
|
||||
if(wear_id && ! HAS_TRAIT(src, TRAIT_UNKNOWN))
|
||||
holder.icon_state = "hud[ckey(wear_id.get_job_name())]"
|
||||
sec_hud_set_security_status()
|
||||
|
||||
|
||||
@@ -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