DayZ
1.30
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
ActionWetClothingInHandsBase.c
См. документацию.
1
class
ActionWetClothingInHandsBaseCB
:
ActionContinuousBaseCB
2
{
3
float
m_WetGainPerStep
;
4
5
override
void
CreateActionComponent
()
6
{
7
float
wetMax = 1.0;
8
float
remaining = 1.0;
9
ItemBase
clothing =
ItemBase
.Cast(
m_ActionData
.m_MainItem);
10
if
(clothing)
11
{
12
wetMax = clothing.GetWetMax();
13
remaining = wetMax - clothing.GetWet();
14
}
15
16
float
stepTime =
Math
.
Clamp
(wetMax * 0.2, 0.1, remaining) *
UATimeSpent
.
WRING
;
17
m_WetGainPerStep
= stepTime /
UATimeSpent
.
WRING
;
18
m_ActionData
.m_ActionComponent =
new
CAContinuousRepeat
(stepTime);
19
}
20
}
21
22
class
ActionWetClothingInHandsBase
:
ActionContinuousBase
23
{
24
void
ActionWetClothingInHandsBase
()
25
{
26
m_CommandUID =
DayZPlayerConstants
.CMD_ACTIONFB_WASHFACEPOND;
27
m_FullBody
=
true
;
28
m_Text
=
"#STR_Wet_Clothing"
;
29
}
30
31
override
typename
GetInputType
()
32
{
33
return
ContinuousInteractActionInput
;
34
}
35
36
override
void
OnFinishProgressServer
(
ActionData
action_data)
37
{
38
ActionWetClothingInHandsBaseCB
cb =
ActionWetClothingInHandsBaseCB
.Cast(action_data.
m_Callback
);
39
if
(!cb)
return
;
40
41
ItemBase
clothing = action_data.
m_MainItem
;
42
if
(!clothing)
return
;
43
44
clothing.SetWet(
Math
.
Clamp
(clothing.GetWet() + cb.
m_WetGainPerStep
, 0.0, clothing.GetWetMax()));
45
action_data.
m_Player
.GetThermalBiasHandler().Add(-
PlayerConstants
.
THERMAL_BIAS_WASH_HEAD_DECREMENT
* cb.
m_WetGainPerStep
);
46
}
47
48
override
void
OnEndServer
(
ActionData
action_data)
49
{
50
ActionWetClothingInHandsBaseCB
cb =
ActionWetClothingInHandsBaseCB
.Cast(action_data.
m_Callback
);
51
if
(!cb)
return
;
52
53
float
partial = cb.
m_WetGainPerStep
* action_data.
m_ActionComponent
.
GetProgress
();
54
if
(partial <= 0)
return
;
55
56
ItemBase
clothing = action_data.
m_MainItem
;
57
if
(!clothing)
return
;
58
59
clothing.SetWet(
Math
.
Clamp
(clothing.GetWet() + partial, 0.0, clothing.GetWetMax()));
60
action_data.
m_Player
.GetThermalBiasHandler().Add(-
PlayerConstants
.
THERMAL_BIAS_WASH_HEAD_DECREMENT
* partial);
61
}
62
63
override
bool
IsLockTargetOnUse
()
64
{
65
return
false
;
66
}
67
}
OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Определения
ActionActivateTrap.c:131
m_FullBody
bool m_FullBody
Определения
ActionBase.c:60
m_Text
string m_Text
Определения
ActionBase.c:57
OnEndServer
void OnEndServer(ActionData action_data)
Определения
ActionBase.c:1409
IsLockTargetOnUse
bool IsLockTargetOnUse()
Определения
ActionBase.c:102
GetInputType
GetInputType()
Определения
ActionBase.c:230
ActionWetClothingInHandsBase
ActionWetClothingInHandsBaseCB ActionContinuousBaseCB ActionWetClothingInHandsBase()
Определения
ActionWetClothingInHandsBase.c:24
ActionBaseCB::m_ActionData
ActionData m_ActionData
Определения
AnimatedActionBase.c:3
ActionContinuousBaseCB
Определения
ActionContinuousBase.c:2
ActionContinuousBase
Определения
ActionContinuousBase.c:121
ActionData::m_Player
PlayerBase m_Player
Определения
ActionBase.c:40
ActionData::m_Callback
ActionBaseCB m_Callback
Определения
ActionBase.c:36
ActionData::m_ActionComponent
ref CABase m_ActionComponent
Определения
ActionBase.c:37
ActionData::m_MainItem
ItemBase m_MainItem
Определения
ActionBase.c:35
ActionData
Определения
ActionBase.c:22
ActionWetClothingInHandsBaseCB::m_WetGainPerStep
float m_WetGainPerStep
Определения
ActionWetClothingInHandsBase.c:3
ActionWetClothingInHandsBaseCB::CreateActionComponent
override void CreateActionComponent()
Определения
ActionWetClothingInHandsBase.c:5
ActionWetClothingInHandsBaseCB
Определения
ActionWetClothingInHandsBase.c:2
CABase::GetProgress
float GetProgress()
Определения
CABase.c:62
CAContinuousRepeat
Определения
CAContinuousRepeat.c:2
ContinuousInteractActionInput
Определения
ActionInput.c:546
ItemBase
Определения
4_World/DayZ/Entities/Core/Inherited/InventoryItem.c:878
Math
Определения
EnMath.c:7
PlayerConstants::THERMAL_BIAS_WASH_HEAD_DECREMENT
static const float THERMAL_BIAS_WASH_HEAD_DECREMENT
Определения
PlayerConstants.c:203
PlayerConstants
Определения
PlayerConstants.c:2
UATimeSpent::WRING
const float WRING
Определения
ActionConstants.c:89
UATimeSpent
Определения
ActionConstants.c:28
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Определения
dayzplayer.c:602
Math::Clamp
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
Ishodniki
scripts
4_World
DayZ
Classes
UserActionsComponent
Actions
Continuous
ActionWetClothingInHandsBase.c
Создано системой
1.13.2