DayZ 1.24
Loading...
Searching...
No Matches
ActionDisinfectPlant Class Reference
Inheritance diagram for ActionDisinfectPlant:
[legend]
Collaboration diagram for ActionDisinfectPlant:
[legend]

Private Member Functions

void ActionDisinfectPlant ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 
override void OnFinishProgressClient (ActionData action_data)
 
- Private Member Functions inherited from ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

Private Attributes

PlantBase m_Plant
 

Detailed Description

Definition at line 9 of file ActionDisinfectPlant.c.

Constructor & Destructor Documentation

◆ ActionDisinfectPlant()

void ActionDisinfectPlant::ActionDisinfectPlant ( )
inlineprivate

Definition at line 13 of file ActionDisinfectPlant.c.

14 {
17
18 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_SPRAYPLANT;
19 //m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
20 m_FullBody = true;
21
22 m_Text = "#apply";
23 }
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
float m_SpecialtyWeight
Definition ActionBase.c:68
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References AnimatedActionBase::m_CallbackClass, AnimatedActionBase::m_CommandUID, m_FullBody, m_SpecialtyWeight, m_Text, and UASoftSkillsWeight::PRECISE_LOW.

Member Function Documentation

◆ ActionCondition()

override bool ActionDisinfectPlant::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

Definition at line 31 of file ActionDisinfectPlant.c.

32 {
34 if (Class.CastTo(garden_base, target.GetObject()))
35 {
36 Slot slot;
37
39 garden_base.GetActionComponentNameList(target.GetComponentIndex(), selections);
40 string selection;
41
42 for (int s = 0; s < selections.Count(); s++)
43 {
44 selection = selections[s];
45 slot = garden_base.GetSlotBySelection(selection);
46 if (slot)
47 break;
48 }
49
50 if (slot && slot.GetPlant())
51 {
52 m_Plant = PlantBase.Cast(slot.GetPlant());
53 if (m_Plant.IsGrowing() && m_Plant.NeedsSpraying())
54 {
55 if (m_Plant.GetPlantStateIndex() < 1)
56 return false;
57
58 if (item.GetQuantity() > 0)
59 return true;
60 }
61 }
62 }
63 return false;
64 /*PlantBase plant;
65 if ( Class.CastTo(plant, target.GetObject() ) && !item.IsDamageDestroyed() )
66 {
67 if ( plant.IsGrowing() && plant.NeedsSpraying() )
68 {
69 if ( item.GetQuantity() > 0 )
70 {
71 return true;
72 }
73 }
74 }
75
76 return false;*/
77 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo(), and m_Plant.

◆ CreateConditionComponents()

override void ActionDisinfectPlant::CreateConditionComponents ( )
inlineprivate

◆ OnFinishProgressClient()

override void ActionDisinfectPlant::OnFinishProgressClient ( ActionData action_data)
inlineprivate

Definition at line 87 of file ActionDisinfectPlant.c.

88 {
89 Object targetObject = action_data.m_Target.GetObject();
90 Param1<float> nacdata = Param1<float>.Cast(action_data.m_ActionComponent.GetACData());
91 if (nacdata)
92 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
93 }

References m_SpecialtyWeight.

◆ OnFinishProgressServer()

override void ActionDisinfectPlant::OnFinishProgressServer ( ActionData action_data)
inlineprivate

Definition at line 79 of file ActionDisinfectPlant.c.

80 {
81 Object targetObject = action_data.m_Target.GetObject();
82 Param1<float> nacdata = Param1<float>.Cast(action_data.m_ActionComponent.GetACData());
83 if (nacdata)
84 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
85 }

References m_SpecialtyWeight.

Member Data Documentation

◆ m_Plant

PlantBase ActionDisinfectPlant::m_Plant
private

Definition at line 11 of file ActionDisinfectPlant.c.

Referenced by ActionCondition().


The documentation for this class was generated from the following file: