DayZ
1.24
Loading...
Searching...
No Matches
ActionShaveTarget.c
Go to the documentation of this file.
1
class
ActionShaveTargetCB
:
ActionContinuousBaseCB
2
{
3
override
void
CreateActionComponent
()
4
{
5
m_ActionData
.
m_ActionComponent
=
new
CAContinuousTime
(
UATimeSpent
.
SHAVE
);
6
}
7
};
8
9
class
ActionShaveTarget
:
ActionContinuousBase
10
{
11
void
ActionShaveTarget
()
12
{
13
m_CallbackClass
=
ActionShaveTargetCB
;
14
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONFB_INTERACT;
15
m_FullBody
=
true
;
16
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_ERECT |
DayZPlayerConstants
.STANCEMASK_CROUCH;
17
m_SpecialtyWeight
=
UASoftSkillsWeight
.
PRECISE_LOW
;
18
m_Text
=
"#shave_target"
;
19
}
20
21
override
void
CreateConditionComponents
()
22
{
23
m_ConditionItem
=
new
CCINonRuined
;
24
m_ConditionTarget
=
new
CCTMan
(
UAMaxDistances
.
DEFAULT
);
25
}
26
27
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
)
28
{
29
PlayerBase
man
;
30
Class
.
CastTo
(
man
,
target
.GetObject());
31
32
if
(
man
.CanShave())
33
return
true
;
34
35
return
false
;
36
}
37
38
override
void
OnFinishProgressServer
(
ActionData
action_data
)
39
{
40
PlayerBase
man
;
41
if
(
action_data
.m_Target &&
Class
.
CastTo
(
man
,
action_data
.m_Target.GetObject()))
42
{
43
if
(
CanReceiveAction
(
action_data
.m_Target))
44
{
45
man
.ShavePlayer();
46
action_data
.m_Player.GetSoftSkillsManager().AddSpecialty(
m_SpecialtyWeight
);
47
}
48
}
49
}
50
};
m_FullBody
bool m_FullBody
Definition
ActionBase.c:52
m_Text
string m_Text
Definition
ActionBase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition
ActionBase.c:55
m_SpecialtyWeight
float m_SpecialtyWeight
Definition
ActionBase.c:68
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
ActionBase.c:56
CanReceiveAction
bool CanReceiveAction(ActionTarget target)
Definition
ActionBase.c:594
m_StanceMask
int m_StanceMask
Definition
ActionBase.c:53
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
AnimatedActionBase.c:3
ActionContinuousBaseCB
Definition
ActionContinuousBase.c:2
ActionContinuousBase
Definition
ActionContinuousBase.c:119
ActionData
Definition
ActionBase.c:21
ActionData::m_ActionComponent
ref CABase m_ActionComponent
Definition
ActionBase.c:30
ActionShaveTargetCB
Definition
ActionShaveTarget.c:2
ActionShaveTargetCB::CreateActionComponent
override void CreateActionComponent()
Definition
ActionShaveTarget.c:3
ActionShaveTarget
Definition
ActionShaveTarget.c:10
ActionShaveTarget::CreateConditionComponents
override void CreateConditionComponents()
Definition
ActionShaveTarget.c:21
ActionShaveTarget::OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition
ActionShaveTarget.c:38
ActionShaveTarget::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
ActionShaveTarget.c:27
ActionShaveTarget::ActionShaveTarget
void ActionShaveTarget()
Definition
ActionShaveTarget.c:11
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
AnimatedActionBase.c:122
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
AnimatedActionBase.c:124
CAContinuousTime
Definition
CAContinuousTime.c:2
CCINonRuined
Definition
CCINonRuined.c:2
CCTMan
Definition
CCTMan.c:2
Class
Super root of all classes in Enforce script.
Definition
EnScript.c:11
ItemBase
Definition
InventoryItem.c:697
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
UAMaxDistances
Definition
ActionConstants.c:105
UAMaxDistances::DEFAULT
const float DEFAULT
Definition
ActionConstants.c:107
UASoftSkillsWeight
Definition
ActionConstants.c:119
UASoftSkillsWeight::PRECISE_LOW
const float PRECISE_LOW
Definition
ActionConstants.c:123
UATimeSpent
Definition
ActionConstants.c:27
UATimeSpent::SHAVE
const float SHAVE
Definition
ActionConstants.c:56
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:597
Class::CastTo
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
scripts
4_World
Classes
UserActionsComponent
Actions
Continuous
ActionShaveTarget.c
Generated by
1.10.0