DayZ 1.24
Loading...
Searching...
No Matches
ActionWringClothes.c
Go to the documentation of this file.
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);
9 }
10};
11
13{
15 {
17 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_WRING;
18 m_FullBody = true;
19 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
21 m_Text = "#wring_clothes";
22 }
23
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 return true;
42 else
43 return false;
44 }
45
46 /*override void OnExecuteServer( ActionData action_data )
47 {
48 Param1<float> nacdata = Param1<float>.Cast( action_data.m_ActionComponent.GetACData() );
49 float delta = nacdata.param1;
50 action_data.m_MainItem.AddWet( -delta );
51 }*/
52
54 {
55 /*Param1<float> nacdata = Param1<float>.Cast( action_data.m_ActionComponent.GetACData() );
56 float delta = nacdata.param1;
57 action_data.m_MainItem.AddWet( -delta );*/
58 float wetness = action_data.m_MainItem.GetWet();
59 float wet_change;
60
67
68 //Print(wet_change);
69 action_data.m_MainItem.SetWet(wet_change);
70
71 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
72 }
73
74 /*override void OnEndServer( ActionData action_data )
75 {
76 if (action_data.m_MainItem && action_data.m_MainItem.GetWet() < GameConstants.STATE_DAMP)
77 {
78 action_data.m_MainItem.SetWet(Math.RandomFloat(GameConstants.STATE_DAMP,GameConstants.STATE_WET));
79 }
80 }*/
81};
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
int m_StanceMask
Definition ActionBase.c:53
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void CreateActionComponent()
const float QUANTITY_WRINGLED_PER_SECOND
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void CreateConditionComponents()
override void OnFinishProgressServer(ActionData action_data)
override bool HasTarget()
Definition EnMath.c:7
const float WRING
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
const float STATE_DAMP
Definition constants.c:784
const float STATE_SOAKING_WET
Definition constants.c:782
const float STATE_DRENCHED
Definition constants.c:781
const float STATE_WET
Definition constants.c:783
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].