5 private BaseWeaponManagerComponent m_WpnManager =
null;
7 private SCR_InventoryStorageManagerComponent m_Inventory;
10 override void OnInit(AIAgent owner)
16 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
18 IEntity contr = owner.GetControlledEntity();
19 if (m_Controlled != contr)
24 m_WpnManager = BaseWeaponManagerComponent.Cast(m_Controlled.FindComponent(BaseWeaponManagerComponent));
26 m_Inventory = SCR_InventoryStorageManagerComponent.Cast(m_Controlled.FindComponent(SCR_InventoryStorageManagerComponent));
30 if (!m_Controlled || !m_WpnManager || !
m_Controller || !m_Inventory)
31 return NodeError(
this, owner,
"Missing components.");
35 return ENodeResult.FAIL;
36 IEntity weaponEntity = slot.GetWeaponEntity();
38 return ENodeResult.FAIL;
41 return ENodeResult.FAIL;
44 return ENodeResult.FAIL;
45 bool removed = m_Inventory.TryRemoveItemFromStorage(weaponEntity, parentSlot.GetStorage());
47 return ENodeResult.SUCCESS;
49 return ENodeResult.FAIL;
53 override bool VisibleInPalette()