Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_IsUsingVariableSights.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
4 {
5  //------------------------------------------------------------------------------------------------
6  override bool IsAvailable(SCR_AvailableActionsConditionData data)
7  {
8  BaseWeaponComponent weapon = data.GetCurrentWeapon();
9  if (!weapon)
10  return false;
11 
12  BaseSightsComponent sights = weapon.GetSights();
13  if (!sights)
14  return false;
15 
16  SCR_BaseVariableSightsFOVInfo info = SCR_BaseVariableSightsFOVInfo.Cast(sights.GetFOVInfo());
17  if (!info)
18  return false;
19 
20  int count = info.GetCount();
21  return GetReturnResult(count > 1);
22  }
23 };
SCR_AvailableActionsConditionData
Definition: SCR_AvailableActionsConditionData.c:5
SCR_AvailableActionCondition
A single available action condition representation.
Definition: SCR_AvailableActionsCondition.c:3
SCR_IsUsingVariableSightsCondition
Definition: SCR_IsUsingVariableSights.c:3
BaseWeaponComponent
Definition: BaseWeaponComponent.c:12
SCR_BaseVariableSightsFOVInfo
Definition: SCR_BaseVariableSightsFOVInfo.c:1
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468