Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionwatergardenslot.c
Go to the documentation of this file.
1
class
ActionWaterGardenSlotCB
:
ActionContinuousBaseCB
2
{
3
private
const
float
QUANTITY_USED_PER_SEC
= 150;
4
5
override
void
CreateActionComponent
()
6
{
7
m_ActionData
.m_ActionComponent =
new
CAContinuousWaterSlot
(
QUANTITY_USED_PER_SEC
);
8
}
9
};
10
11
class
ActionWaterGardenSlot
:
ActionContinuousBase
12
{
13
void
ActionWaterGardenSlot
()
14
{
15
m_CallbackClass
=
ActionWaterGardenSlotCB
;
16
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONFB_EMPTY_VESSEL;
17
m_FullBody
=
true
;
18
m_SpecialtyWeight
= UASoftSkillsWeight.ROUGH_LOW;
19
m_Text
=
"#water_slot"
;
20
}
21
22
override
void
CreateConditionComponents
()
23
{
24
m_ConditionTarget
=
new
CCTDummy
;
25
m_ConditionItem
=
new
CCINonRuined
;
26
}
27
28
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item)
29
{
30
if
(item.GetQuantity() == 0)
31
return
false
;
32
33
// Get the liquid
34
int
liquidType = item.GetLiquidType();
35
if
(liquidType !=
LIQUID_WATER
)
36
{
37
return
false
;
// Forbid watering of plants with gasoline and other fluids
38
}
39
40
if
(item.GetIsFrozen())
41
{
42
return
false
;
43
}
44
45
Object
targetObject = target.GetObject();
46
if
(targetObject && targetObject.IsInherited(
GardenBase
))
47
{
48
GardenBase
gardenBase =
GardenBase
.Cast(targetObject);
49
array<string>
selections =
new
array<string>
;
50
targetObject.GetActionComponentNameList(target.GetComponentIndex(), selections);
51
52
Slot slot;
53
for
(
int
s = 0; s < selections.Count(); s++)
54
{
55
string
selection = selections[s];
56
slot = gardenBase.GetSlotBySelection(selection);
57
if
(slot)
58
break
;
59
}
60
61
if
( slot && !slot.GetPlant() && slot.GetWateredState() == eWateredState.DRY )
62
{
63
return
true
;
64
}
65
else
66
{
67
return
false
;
68
}
69
}
70
71
return
false
;
72
}
73
};
ActionTarget
class ActionTargets ActionTarget
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
animatedactionbase.c:3
ActionBase::m_FullBody
bool m_FullBody
Definition
actionbase.c:67
ActionBase::m_Text
string m_Text
Definition
actionbase.c:64
ActionBase::m_ConditionItem
ref CCIBase m_ConditionItem
Definition
actionbase.c:70
ActionBase::m_SpecialtyWeight
float m_SpecialtyWeight
Definition
actionbase.c:83
ActionBase::m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
actionbase.c:71
ActionContinuousBaseCB
Definition
actioncontinuousbase.c:2
ActionContinuousBase::ActionContinuousBase
void ActionContinuousBase()
Definition
actioncontinuousbase.c:124
ActionWaterGardenSlotCB
Definition
actionwatergardenslot.c:2
ActionWaterGardenSlotCB::QUANTITY_USED_PER_SEC
const float QUANTITY_USED_PER_SEC
Definition
actionwatergardenslot.c:3
ActionWaterGardenSlotCB::CreateActionComponent
override void CreateActionComponent()
Definition
actionwatergardenslot.c:5
ActionWaterGardenSlot::ActionWaterGardenSlot
void ActionWaterGardenSlot()
Definition
actionwatergardenslot.c:13
ActionWaterGardenSlot::CreateConditionComponents
override void CreateConditionComponents()
Definition
actionwatergardenslot.c:22
ActionWaterGardenSlot::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionwatergardenslot.c:28
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
animatedactionbase.c:143
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
animatedactionbase.c:145
CAContinuousWaterSlot
Definition
cacontinuouswaterslot.c:2
CCINonRuined
Definition
ccinonruined.c:2
CCTDummy
Definition
cctdummy.c:2
GardenBase
Definition
gardenplot.c:2
ItemBase
Definition
inventoryitem.c:742
Object
Definition
objecttyped.c:2
PlayerBase
Definition
playerbaseclient.c:2
array
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition
isboxcollidinggeometryproxyclasses.c:28
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
LIQUID_WATER
const int LIQUID_WATER
Definition
constants.c:544
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
continuous
actionwatergardenslot.c
Generated by
1.17.0