9 [
Attribute(defvalue:
"1",
desc:
"Unequip items in hand before doing emote?")]
10 protected bool m_bUnequipItems;
12 [
Attribute(uiwidget: UIWidgets.SearchComboBox,
desc:
"Available stances. All stances allowed if empty", enums: ParamEnumArray.FromEnum(
ECharacterStance))]
13 protected ref array<ref ECharacterStance> m_aAllowedStances;
15 protected ResourceName m_sHint =
"{3D2B20A0A9C3248A}Configs/Hints/GeneralHints.conf";
18 override bool Execute(IEntity cursorTarget, IEntity target, vector targetPosition,
int playerID,
bool isClient)
24 IEntity playerControlledEntity =
GetGame().GetPlayerController().GetControlledEntity();
25 if (!playerControlledEntity)
29 if (!characterController)
36 if (characterController.IsLoitering())
38 characterController.StopLoitering(
false);
42 if (m_bUnequipItems && (gadgetManager.GetHeldGadget() || characterController.GetWeaponManagerComponent().GetCurrentWeapon()))
44 if (characterController.IsGadgetInHands())
45 characterController.RemoveGadgetFromHand();
47 characterController.SelectWeapon(
null);
50 GetGame().GetCallqueue().CallLater(StartLoiter, 1500,
false);
59 override bool CanBePerformed()
61 IEntity playerControlledEntity =
GetGame().GetPlayerController().GetControlledEntity();
63 if (!playerControlledEntity)
67 if (!characterComponent)
70 if (m_aAllowedStances.IsEmpty())
73 return (m_aAllowedStances.Contains(characterComponent.GetStance()));
79 IEntity playerControlledEntity =
GetGame().GetPlayerController().GetControlledEntity();
80 if (!playerControlledEntity)
84 if (!characterController)
87 vector emptyVector[4];
88 characterController.StartLoitering(m_eLoiterType,
false,
true,
false, emptyVector);
90 Resource holder = BaseContainerTools.LoadContainer(m_sHint);
91 if (!holder.IsValid())
95 BaseContainer container = holder.GetResource().ToBaseContainer();
97 SCR_HintManagerComponent.ShowHint(hintStorage.GetHintByType(
EHint.EMOTES_INTRO));