3 static const string PORT_MAGAZINE_WELL_OUT =
"MagazineWellOut";
5 private IEntity m_ownerEntity;
6 private BaseWeaponManagerComponent m_weaponManager;
9 override bool VisibleInPalette() {
return true;}
12 override void OnInit(AIAgent owner)
14 m_ownerEntity = owner.GetControlledEntity();
16 Debug.Error(
"Must be run on ai agent that has owner entity!");
20 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
25 return ENodeResult.FAIL;
26 m_weaponManager = BaseWeaponManagerComponent.Cast(m_ownerEntity.FindComponent(BaseWeaponManagerComponent));
28 return ENodeResult.FAIL;
32 return ENodeResult.FAIL;
34 SetVariableOut(PORT_MAGAZINE_WELL_OUT, GetWeaponMainMagazineWell(weapon));
35 return ENodeResult.SUCCESS;
39 protected static ref TStringArray s_aVarsOut = {
40 PORT_MAGAZINE_WELL_OUT
42 override TStringArray GetVariablesOut()
48 override string GetOnHoverDescription()
50 return "Returns MagazineWell of current weapon on Owner's controlled entity";
56 ref array<BaseMuzzleComponent> outMuzzles =
new array<BaseMuzzleComponent>;
57 weapon.GetMuzzlesList(outMuzzles);
58 if (!outMuzzles.IsEmpty())
59 return outMuzzles[0].GetMagazineWell().Type();