Dayz Explorer 1.28.160049
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);
8 m_ActionData.m_ActionComponent = new CAContinuousRepeat(UATimeSpent.WRING);
9 }
10};
11
13{
15 {
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 {
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 m_ActionData
float m_SpecialtyWeight
Definition actionbase.c:77
int m_StanceMask
Definition actionbase.c:62
string m_Text
Definition actionbase.c:58
ref CCIBase m_ConditionItem
Definition actionbase.c:64
bool m_FullBody
Definition actionbase.c:61
ref CCTBase m_ConditionTarget
Definition actionbase.c:65
override void CreateActionComponent()
const float QUANTITY_WRINGLED_PER_SECOND
Definition enmath.c:7
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602