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_DeployCollimatorAction.c
Go to the documentation of this file.
1
class
SCR_DeployCollimatorAction
:
SCR_AdjustCollimatorAction
2
{
3
[
Attribute
(
desc
:
"When true, this sight is stowed by default"
)]
4
protected
bool
m_bSightStowedOnStart
;
5
6
protected
bool
m_bSightIsUnstowed
;
7
8
//------------------------------------------------------------------------------------------------
9
override
void
Init
(
IEntity
pOwnerEntity,
GenericComponent
pManagerComponent)
10
{
11
m_bSightIsUnstowed
= !
m_bSightStowedOnStart
;
12
13
super.Init(pOwnerEntity, pManagerComponent);
14
}
15
16
//------------------------------------------------------------------------------------------------
19
override
protected
bool
OnSaveActionData
(ScriptBitWriter writer)
20
{
21
bool
saved = super.OnSaveActionData(writer);
22
if
(!
m_SightsComponent
)
23
return
saved;
24
25
m_bSightIsUnstowed
=
Math
.Round(
m_fTargetValue
);
26
SCR_HelicopterCollimatorSightComponent helicopterCollimator = SCR_HelicopterCollimatorSightComponent.Cast(
m_SightsComponent
);
27
if
(helicopterCollimator)
28
helicopterCollimator.OverrideSightState(
m_bSightIsUnstowed
);
29
30
return
saved;
31
}
32
33
//------------------------------------------------------------------------------------------------
37
override
protected
bool
OnLoadActionData
(
ScriptBitReader
reader)
38
{
39
bool
loaded = super.OnLoadActionData(reader);
40
if
(
m_bIsAdjustedByPlayer
)
41
return
loaded;
42
43
m_bSightIsUnstowed
=
Math
.Round(
m_fTargetValue
);
44
SCR_HelicopterCollimatorSightComponent helicopterCollimator = SCR_HelicopterCollimatorSightComponent.Cast(
m_SightsComponent
);
45
if
(helicopterCollimator)
46
helicopterCollimator.OverrideSightState(
m_bSightIsUnstowed
);
47
48
return
loaded;
49
}
50
51
//------------------------------------------------------------------------------------------------
52
override
bool
GetActionNameScript
(out
string
outName)
53
{
54
UIInfo
actionInfo =
GetUIInfo
();
55
if
(!actionInfo)
56
return
false
;
57
58
if
(
Math
.Round(GetCurrentValue()) == 0)
59
outName = actionInfo.GetName();
60
else
61
outName = actionInfo.GetDescription();
62
63
return
true
;
64
}
65
}
GetUIInfo
SCR_UIInfo GetUIInfo()
Definition
SCR_EditableEntityCampaignBuildingModeLabelSetting.c:27
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
GenericComponent
Definition
GenericComponent.c:13
IEntity
Definition
IEntity.c:13
Math
Definition
Math.c:13
SCR_AdjustCollimatorAction
Definition
SCR_AdjustCollimatorAction.c:2
SCR_AdjustCollimatorAction::m_SightsComponent
SCR_CollimatorSightsComponent m_SightsComponent
Definition
SCR_AdjustCollimatorAction.c:3
SCR_AdjustSignalAction::m_fTargetValue
float m_fTargetValue
Normalized current value.
Definition
SCR_AdjustSignalAction.c:48
SCR_AdjustSignalAction::m_bIsAdjustedByPlayer
bool m_bIsAdjustedByPlayer
Interacted with by main entity. Allows reading input actions.
Definition
SCR_AdjustSignalAction.c:51
SCR_DeployCollimatorAction
Definition
SCR_DeployCollimatorAction.c:2
SCR_DeployCollimatorAction::OnSaveActionData
bool OnSaveActionData(ScriptBitWriter writer)
Definition
SCR_DeployCollimatorAction.c:19
SCR_DeployCollimatorAction::OnLoadActionData
bool OnLoadActionData(ScriptBitReader reader)
Definition
SCR_DeployCollimatorAction.c:37
SCR_DeployCollimatorAction::Init
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
Definition
SCR_DeployCollimatorAction.c:9
SCR_DeployCollimatorAction::GetActionNameScript
override bool GetActionNameScript(out string outName)
Definition
SCR_DeployCollimatorAction.c:52
SCR_DeployCollimatorAction::m_bSightStowedOnStart
bool m_bSightStowedOnStart
Definition
SCR_DeployCollimatorAction.c:4
SCR_DeployCollimatorAction::m_bSightIsUnstowed
bool m_bSightIsUnstowed
Definition
SCR_DeployCollimatorAction.c:6
ScriptBitReader
Definition
EnNetwork.c:199
UIInfo
UIInfo - allows to define UI elements.
Definition
UIInfo.c:14
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
UserActions
SCR_DeployCollimatorAction.c
Generated by
1.17.0