Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_IdentityItemAttributeCollection.c
Go to the documentation of this file.
3{
4 //------------------------------------------------------------------------------------------------
5 //~ Hide if character is unconscious
6 override bool IsVisible(InventoryItemComponent inventoryItem)
7 {
8 //~ Is already not visible, or is not in a slot
9 if (!m_bVisible || !inventoryItem || !inventoryItem.GetParentSlot())
10 return m_bVisible;
11
12 //~ Either the item is not in the slot or the item is added when a character falls unconcious. In this case just show the item as normal
14 if (!identityManager || !identityManager.IsIdentityItemSlotEnabled() || identityManager.HasIdentityItemGenerationType(SCR_EIdentityItemGenerationType.ON_UNCONSCIOUS))
15 return m_bVisible;
16
17 ChimeraCharacter parentChar = ChimeraCharacter.Cast(inventoryItem.GetOwner().GetParent());
18 if (!parentChar)
19 return m_bVisible;
20
21 SCR_DamageManagerComponent damageManager = parentChar.GetDamageManager();
22 if (!damageManager || damageManager.GetState() == EDamageState.DESTROYED)
23 return m_bVisible;
24
25 CharacterControllerComponent controller = parentChar.GetCharacterController();
26 if (controller && controller.IsUnconscious())
27 return false;
28
29 return m_bVisible;
30 }
31}
32
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_EIdentityItemGenerationType
When will the identity item be generated on the character.
bool IsVisible()
proto external IEntity GetParent()
static SCR_IdentityManagerComponent GetInstance()
bool HasIdentityItemGenerationType(SCR_EIdentityItemGenerationType type)
EDamageState