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

Private Member Functions

void ActionWaterGardenSlot ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
- 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)
 

Detailed Description

Definition at line 11 of file ActionWaterGardenSlot.c.

Constructor & Destructor Documentation

◆ ActionWaterGardenSlot()

void ActionWaterGardenSlot::ActionWaterGardenSlot ( )
inlineprivate

Member Function Documentation

◆ ActionCondition()

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

Definition at line 28 of file ActionWaterGardenSlot.c.

29 {
30 Object targetObject = target.GetObject();
31
32 if (item.GetQuantity() == 0)
33 return false;
34
35 // Get the liquid
36 int liquid_type = item.GetLiquidType();
37
39 {
40 return false; // Forbid watering of plants with gasoline and other fluids
41 }
42
43 if (targetObject.IsInherited(GardenBase))
44 {
46
47 Slot slot;
48
50 targetObject.GetActionComponentNameList(target.GetComponentIndex(), selections);
51
52 for (int s = 0; s < selections.Count(); s++)
53 {
54 string selection = selections[s];
55 slot = garden_base.GetSlotBySelection(selection);
56 if (slot)
57 break;
58 }
59
60 if (slot && !slot.GetPlant() && slot.CanBeWatered() && slot.GetWateredState() == 0)
61 return true;
62 else
63 return false;
64 }
65
66 return false;
67 }
const int LIQUID_WATER
Definition constants.c:504

References LIQUID_WATER.

◆ CreateConditionComponents()

override void ActionWaterGardenSlot::CreateConditionComponents ( )
inlineprivate

Definition at line 22 of file ActionWaterGardenSlot.c.

23 {
26 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.


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