Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionwringclothes.c
Go to the documentation of this file.
1
class
ActionWringClothesCB
:
ActionContinuousBaseCB
2
{
3
protected
const
float
QUANTITY_WRINGLED_PER_SECOND
= 0.02;
4
5
override
void
CreateActionComponent
()
6
{
7
//m_ActionData.m_ActionComponent = new CAContinuousWringClothes(QUANTITY_WRINGLED_PER_SECOND, UATimeSpent.WASH_HANDS);
8
m_ActionData
.m_ActionComponent =
new
CAContinuousRepeat
(
UATimeSpent
.
WRING
);
9
}
10
};
11
12
class
ActionWringClothes
:
ActionContinuousBase
13
{
14
void
ActionWringClothes
()
15
{
16
m_CallbackClass
=
ActionWringClothesCB
;
17
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONFB_WRING;
18
m_FullBody
=
true
;
19
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_CROUCH;
20
m_SpecialtyWeight
= UASoftSkillsWeight.ROUGH_LOW;
21
m_Text
=
"#wring_clothes"
;
22
}
23
24
override
void
CreateConditionComponents
()
25
{
26
m_ConditionItem
=
new
CCINonRuined
;
27
m_ConditionTarget
=
new
CCTSelf
;
28
}
29
30
override
bool
HasTarget
()
31
{
32
return
false
;
33
}
34
35
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
36
{
37
if
(player.IsInWater())
return
false
;
38
40
if
( item && item.GetWet() >=
GameConstants
.
STATE_WET
)
41
{
42
return
true
;
43
}
44
else
45
{
46
return
false
;
47
}
48
}
49
50
/*override void OnExecuteServer( ActionData action_data )
51
{
52
Param1<float> nacdata = Param1<float>.Cast( action_data.m_ActionComponent.GetACData() );
53
float delta = nacdata.param1;
54
action_data.m_MainItem.AddWet( -delta );
55
}*/
56
57
override
void
OnFinishProgressServer
(
ActionData
action_data )
58
{
59
/*Param1<float> nacdata = Param1<float>.Cast( action_data.m_ActionComponent.GetACData() );
60
float delta = nacdata.param1;
61
action_data.m_MainItem.AddWet( -delta );*/
62
float
wetness = action_data.m_MainItem.GetWet();
63
float
wet_change;
64
65
if
(wetness >=
GameConstants
.
STATE_DRENCHED
)
66
{
67
wet_change =
Math
.
RandomFloat
(
GameConstants
.
STATE_SOAKING_WET
,
GameConstants
.
STATE_DRENCHED
);
68
}
69
else
if
(wetness >=
GameConstants
.
STATE_SOAKING_WET
)
70
{
71
wet_change =
Math
.
RandomFloat
(
GameConstants
.
STATE_WET
,
GameConstants
.
STATE_SOAKING_WET
);
72
}
73
else
if
(wetness >=
GameConstants
.
STATE_WET
)
74
{
75
wet_change =
Math
.
RandomFloat
(
GameConstants
.
STATE_DAMP
,
GameConstants
.
STATE_WET
);
76
}
77
78
//Print(wet_change);
79
action_data.m_MainItem.SetWet(wet_change);
80
}
81
82
/*override void OnEndServer( ActionData action_data )
83
{
84
if (action_data.m_MainItem && action_data.m_MainItem.GetWet() < GameConstants.STATE_DAMP)
85
{
86
action_data.m_MainItem.SetWet(Math.RandomFloat(GameConstants.STATE_DAMP,GameConstants.STATE_WET));
87
}
88
}*/
89
};
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionTarget
class ActionTargets ActionTarget
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
animatedactionbase.c:3
ActionBase::m_FullBody
bool m_FullBody
Definition
actionbase.c:67
ActionBase::m_Text
string m_Text
Definition
actionbase.c:64
ActionBase::m_ConditionItem
ref CCIBase m_ConditionItem
Definition
actionbase.c:70
ActionBase::m_SpecialtyWeight
float m_SpecialtyWeight
Definition
actionbase.c:83
ActionBase::m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
actionbase.c:71
ActionBase::m_StanceMask
int m_StanceMask
Definition
actionbase.c:68
ActionContinuousBaseCB
Definition
actioncontinuousbase.c:2
ActionContinuousBase::ActionContinuousBase
void ActionContinuousBase()
Definition
actioncontinuousbase.c:124
ActionWringClothesCB
Definition
actionwringclothes.c:2
ActionWringClothesCB::QUANTITY_WRINGLED_PER_SECOND
const float QUANTITY_WRINGLED_PER_SECOND
Definition
actionwringclothes.c:3
ActionWringClothesCB::CreateActionComponent
override void CreateActionComponent()
Definition
actionwringclothes.c:5
ActionWringClothes::OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition
actionwringclothes.c:57
ActionWringClothes::CreateConditionComponents
override void CreateConditionComponents()
Definition
actionwringclothes.c:24
ActionWringClothes::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionwringclothes.c:35
ActionWringClothes::ActionWringClothes
void ActionWringClothes()
Definition
actionwringclothes.c:14
ActionWringClothes::HasTarget
override bool HasTarget()
Definition
actionwringclothes.c:30
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
animatedactionbase.c:143
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
animatedactionbase.c:145
CAContinuousRepeat
Definition
cacontinuousrepeat.c:2
CCINonRuined
Definition
ccinonruined.c:2
CCTSelf
Definition
cctself.c:2
GameConstants
Definition
constants.c:664
ItemBase
Definition
inventoryitem.c:742
Math
Definition
enmath.c:7
PlayerBase
Definition
playerbaseclient.c:2
UATimeSpent
Definition
actionconstants.c:28
UATimeSpent::WRING
const float WRING
Definition
actionconstants.c:88
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
GameConstants::STATE_SOAKING_WET
const float STATE_SOAKING_WET
Definition
constants.c:876
GameConstants::STATE_WET
const float STATE_WET
Definition
constants.c:877
GameConstants::STATE_DRENCHED
const float STATE_DRENCHED
Definition
constants.c:875
GameConstants::STATE_DAMP
const float STATE_DAMP
Definition
constants.c:878
Math::RandomFloat
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
continuous
actionwringclothes.c
Generated by
1.17.0