3 [
Attribute(
"#AR-UserAction_LoadCasualty_NoSpace",
desc:
"Text shown when character can not be loaded as there is no space in the vehicle", uiwidget: UIWidgets.LocaleEditBox)]
6 protected CharacterControllerComponent m_CharacterController;
7 protected FactionAffiliationComponent m_FactionAffiliation;
16 protected override void DelayedInit(IEntity owner)
21 super.DelayedInit(owner);
23 ChimeraCharacter character = ChimeraCharacter.Cast(owner);
28 m_FactionAffiliation = FactionAffiliationComponent.Cast(owner.FindComponent(FactionAffiliationComponent));
36 return m_sInvalidNoSpace;
38 return super.GetInvalidPerformReasonString(reasonInvalid);
42 override bool CanBeShownScript(IEntity user)
47 if (m_FactionAffiliation)
49 FactionAffiliationComponent userFactionAffiliation = FactionAffiliationComponent.Cast(user.FindComponent(FactionAffiliationComponent));
50 if (userFactionAffiliation)
53 Faction ownerFaction = m_FactionAffiliation.GetAffiliatedFaction();
54 if (ownerFaction && ownerFaction.IsFactionEnemy(userFactionAffiliation.GetAffiliatedFaction()))
59 return super.CanBeShownScript(user);