Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_WeaponChangeSwitchOpticsCondition.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_WeaponChangeSwitchOpticsCondition
:
SCR_AvailableActionCondition
3
{
4
//------------------------------------------------------------------------------------------------
6
override
bool
IsAvailable(notnull
SCR_AvailableActionsConditionData
data
)
7
{
8
IEntity
controlledEntity =
SCR_PlayerController
.
GetLocalControlledEntity
();
9
if
(!controlledEntity)
10
return
null;
11
12
ChimeraCharacter
character =
ChimeraCharacter
.Cast(controlledEntity);
13
if
(!character)
14
return
null;
15
16
BaseWeaponManagerComponent weaponManager = character.GetCharacterController().GetWeaponManagerComponent();
17
if
(!weaponManager)
18
return
null;
19
20
BaseWeaponComponent
currentSights = weaponManager.GetCurrentWeapon();
21
if
(!currentSights)
22
return
null;
23
24
bool
canSwitchOptics;
25
26
if
(currentSights.FindAvailableSights() == 0)
27
canSwitchOptics = currentSights.CanSetSights(1);
28
else
if
(currentSights.FindAvailableSights() == 1)
29
canSwitchOptics = currentSights.CanSetSights(0);
30
31
return
canSwitchOptics;
32
}
33
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
data
Get all prefabs that have the spawner data
Definition
SCR_EntityCatalogManagerComponent.c:320
BaseWeaponComponent
Definition
BaseWeaponComponent.c:13
ChimeraCharacter
Definition
ChimeraCharacter.c:13
IEntity
Definition
IEntity.c:13
SCR_AvailableActionCondition
A single available action condition representation.
Definition
SCR_AvailableActionCondition.c:4
SCR_AvailableActionsConditionData
Definition
SCR_AvailableActionsConditionData.c:6
SCR_PlayerController
Definition
SCR_PlayerController.c:31
SCR_PlayerController::GetLocalControlledEntity
static IEntity GetLocalControlledEntity()
Definition
SCR_PlayerController.c:495
SCR_WeaponChangeSwitchOpticsCondition
Definition
SCR_WeaponChangeSwitchOpticsCondition.c:3
scripts
Game
UI
HUD
AvailableActions
Conditions
Game
Weapon
SCR_WeaponChangeSwitchOpticsCondition.c
Generated by
1.17.0