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_DetonatorAction.c
Go to the documentation of this file.
1
class
SCR_RemoteDetonatorAction
:
SCR_ScriptedUserAction
2
{
3
SCR_DetonatorGadgetComponent m_DetonatorComp;
4
SCR_BaseDeployableInventoryItemComponent
m_DeployableInvItemComp;
5
6
//------------------------------------------------------------------------------------------------
7
override
void
Init
(
IEntity
pOwnerEntity,
GenericComponent
pManagerComponent)
8
{
9
m_DetonatorComp = SCR_DetonatorGadgetComponent.Cast(pOwnerEntity.
FindComponent
(SCR_DetonatorGadgetComponent));
10
m_DeployableInvItemComp =
SCR_BaseDeployableInventoryItemComponent
.Cast(pOwnerEntity.
FindComponent
(
SCR_BaseDeployableInventoryItemComponent
));
11
}
12
13
//------------------------------------------------------------------------------------------------
14
override
bool
CanBeShownScript(
IEntity
user)
15
{
16
if
(!m_DetonatorComp)
17
return
false
;
18
19
ChimeraCharacter
character
=
ChimeraCharacter
.Cast(user);
20
if
(!
character
)
21
return
false
;
22
23
CharacterControllerComponent characterControllerComp =
character
.GetCharacterController();
24
if
(!characterControllerComp)
25
return
false
;
26
27
if
(!characterControllerComp.GetInspect())
28
if
(!m_DeployableInvItemComp || !m_DeployableInvItemComp.IsDeployed())
29
return
false
;
30
31
return
true
;
32
}
33
34
//------------------------------------------------------------------------------------------------
35
override
bool
CanBePerformedScript(
IEntity
user)
36
{
37
if
(!m_DetonatorComp)
38
return
false
;
39
40
if
(!m_DetonatorComp.GetNumberOfConnectedCharges())
41
{
42
UIInfo
actionInfo =
GetUIInfo
();
43
if
(actionInfo)
44
SetCannotPerformReason
(actionInfo.GetDescription());
45
46
return
false
;
47
}
48
49
return
true
;
50
}
51
52
//------------------------------------------------------------------------------------------------
53
override
bool
GetActionNameScript(out
string
outName)
54
{
55
UIInfo
actionInfo =
GetUIInfo
();
56
if
(!actionInfo)
57
return
false
;
58
59
outName = actionInfo.GetName();
60
61
return
true
;
62
}
63
64
//------------------------------------------------------------------------------------------------
65
override
bool
HasLocalEffectOnlyScript
()
66
{
67
return
false
;
68
}
69
70
//------------------------------------------------------------------------------------------------
71
override
bool
CanBroadcastScript
()
72
{
73
return
true
;
74
}
75
}
Init
override void Init()
Definition
CharacterCameraHandlerComponent.c:40
CanBroadcastScript
override bool CanBroadcastScript()
Definition
SCR_LoiterUserAction.c:129
HasLocalEffectOnlyScript
override bool HasLocalEffectOnlyScript()
Definition
SCR_LoiterUserAction.c:117
BaseUserAction::SetCannotPerformReason
void SetCannotPerformReason(string reason)
Definition
BaseUserAction.c:21
BaseUserAction::GetUIInfo
proto external UIInfo GetUIInfo()
Returns the UIInfo set for this user action or null if none.
ChimeraCharacter
Definition
ChimeraCharacter.c:13
GenericComponent
Definition
GenericComponent.c:13
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
SCR_BaseDeployableInventoryItemComponent
Base class which all deployable inventory items inherit from.
Definition
SCR_BaseDeployableInventoryItemComponent.c:39
SCR_RemoteDetonatorAction
Definition
SCR_DetonatorAction.c:2
SCR_ScriptedUserAction
A scripted action class having optional logic to check if vehicle is valid.
Definition
SCR_ScriptedUserAction.c:6
SCR_ScriptedUserAction::character
ChimeraCharacter character
Definition
SCR_ScriptedUserAction.c:35
UIInfo
UIInfo - allows to define UI elements.
Definition
UIInfo.c:14
scripts
Game
UserActions
SCR_DetonatorAction.c
Generated by
1.17.0