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_ArmExplosiveChargeWithTimedFuzeAction.c
Go to the documentation of this file.
1
class
SCR_ArmExplosiveChargeWithTimedFuzeAction
:
SCR_ExplosiveChargeAction
2
{
3
//------------------------------------------------------------------------------------------------
4
override
bool
CanBeShownScript(
IEntity
user)
5
{
6
if
(!super.CanBeShownScript(user))
7
return
false
;
8
9
if
(
m_ChargeComp
.GetUsedFuzeType() !=
SCR_EFuzeType
.NONE)
10
if
(
m_ChargeComp
.GetUsedFuzeType() ==
SCR_EFuzeType
.TIMED)
11
return
false
;
12
13
return
true
;
14
}
15
16
//------------------------------------------------------------------------------------------------
17
override
bool
CanBePerformedScript(
IEntity
user)
18
{
19
if
(!super.CanBePerformedScript(user))
20
return
false
;
21
22
if
(
m_ChargeComp
.GetUsedFuzeType() !=
SCR_EFuzeType
.NONE)
23
{
24
SetCannotPerformReason
(
m_sDifferentFuzeInUseText
);
25
return
false
;
26
}
27
28
return
true
;
29
}
30
31
//------------------------------------------------------------------------------------------------
32
override
void
PerformAction
(
IEntity
pOwnerEntity,
IEntity
pUserEntity)
33
{
34
if
(!pUserEntity || !
m_ChargeComp
)
35
return
;
36
37
super.
PerformAction
(pOwnerEntity, pUserEntity);
38
}
39
40
//------------------------------------------------------------------------------------------------
41
override
void
ProcesFinished(
IEntity
item,
bool
successful,
ItemUseParameters
animParams)
42
{
43
super.ProcesFinished(item, successful, animParams);
44
if
(!successful)
45
return
;
46
47
if
(!
m_ChargeComp
)
48
return
;
49
50
m_ChargeComp
.ArmWithTimedFuze();
51
if
(
m_ChargeComp
.GetTrigger())
52
m_ChargeComp
.GetTrigger().SetUser(
m_ActionUser
);
53
}
54
}
SCR_EFuzeType
SCR_EFuzeType
Enum with all types of fuzes.
Definition
SCR_EFuzeType.c:3
BaseUserAction::SetCannotPerformReason
void SetCannotPerformReason(string reason)
Definition
BaseUserAction.c:21
IEntity
Definition
IEntity.c:13
ItemUseParameters
Definition
ItemUseParameters.c:16
SCR_ArmExplosiveChargeWithTimedFuzeAction
Definition
SCR_ArmExplosiveChargeWithTimedFuzeAction.c:2
SCR_ExplosiveChargeAction
Definition
SCR_ExplosiveChargeAction.c:2
SCR_ExplosiveChargeAction::m_ActionUser
ChimeraCharacter m_ActionUser
Definition
SCR_ExplosiveChargeAction.c:10
SCR_ExplosiveChargeAction::PerformAction
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
Definition
SCR_ExplosiveChargeAction.c:54
SCR_ExplosiveChargeAction::m_sDifferentFuzeInUseText
LocalizedString m_sDifferentFuzeInUseText
Definition
SCR_ExplosiveChargeAction.c:7
SCR_ExplosiveChargeAction::m_ChargeComp
SCR_ExplosiveChargeComponent m_ChargeComp
Definition
SCR_ExplosiveChargeAction.c:9
PerformAction
@ PerformAction
Definition
EUserActionEvent.c:15
scripts
Game
UserActions
SCR_ArmExplosiveChargeWithTimedFuzeAction.c
Generated by
1.17.0