Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionfertilizeslot.c
Go to the documentation of this file.
1
class
ActionFertilizeSlotCB
:
ActionContinuousBaseCB
2
{
3
private
const
float
QUANTITY_USED_PER_SEC
= 150;
4
5
override
void
CreateActionComponent
()
6
{
7
m_ActionData
.m_ActionComponent =
new
CAContinuousFertilizeGardenSlot
(
QUANTITY_USED_PER_SEC
);
8
}
9
};
10
11
class
ActionFertilizeSlot
:
ActionContinuousBase
12
{
13
void
ActionFertilizeSlot
()
14
{
15
m_CallbackClass
=
ActionFertilizeSlotCB
;
16
m_SpecialtyWeight
= UASoftSkillsWeight.ROUGH_MEDIUM;
17
18
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONFB_INTERACT;
19
m_FullBody
=
true
;
20
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_CROUCH;
21
m_Text
=
"#fertilize_slot"
;
22
}
23
24
override
void
CreateConditionComponents
()
25
{
26
m_ConditionTarget
=
new
CCTDummy
;
27
m_ConditionItem
=
new
CCINonRuined
;
28
}
29
30
31
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
32
{
33
if
(item.GetQuantity() == 0)
34
return
false
;
35
36
Object
targetObject = target.GetObject();
37
if
(targetObject.IsInherited(
GardenBase
))
38
{
39
GardenBase
gardenBase =
GardenBase
.Cast(targetObject);
40
Slot slot;
41
42
array<string>
selections =
new
array<string>
;
43
gardenBase.GetActionComponentNameList(target.GetComponentIndex(), selections);
44
45
foreach
(
string
selection: selections)
46
{
47
slot = gardenBase.GetSlotBySelection(selection);
48
if
(slot)
49
break
;
50
}
51
52
if
(slot)
53
{
54
if
(slot.GetPlant())
55
return
false
;
56
57
if
(slot.GetFertilityState() ==
eFertlityState
.NONE)
58
return
true
;
59
}
60
}
61
62
return
false
;
63
}
64
65
override
void
OnFinishProgressServer
(
ActionData
action_data )
66
{
67
// The functionality is in the Execute event of this user action's component.
68
}
69
};
ActionData
ActionBase ActionData
Definition
actionbase.c:30
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
ActionBase::m_StanceMask
int m_StanceMask
Definition
actionbase.c:68
ActionContinuousBaseCB
Definition
actioncontinuousbase.c:2
ActionContinuousBase::ActionContinuousBase
void ActionContinuousBase()
Definition
actioncontinuousbase.c:124
ActionFertilizeSlotCB
Definition
actionfertilizeslot.c:2
ActionFertilizeSlotCB::QUANTITY_USED_PER_SEC
const float QUANTITY_USED_PER_SEC
Definition
actionfertilizeslot.c:3
ActionFertilizeSlotCB::CreateActionComponent
override void CreateActionComponent()
Definition
actionfertilizeslot.c:5
ActionFertilizeSlot::OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition
actionfertilizeslot.c:65
ActionFertilizeSlot::ActionFertilizeSlot
void ActionFertilizeSlot()
Definition
actionfertilizeslot.c:13
ActionFertilizeSlot::CreateConditionComponents
override void CreateConditionComponents()
Definition
actionfertilizeslot.c:24
ActionFertilizeSlot::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionfertilizeslot.c:31
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
animatedactionbase.c:143
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
animatedactionbase.c:145
CAContinuousFertilizeGardenSlot
Definition
cacontinuousfertilizegardenslot.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
eFertlityState
eFertlityState
Definition
slot.c:2
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
continuous
actionfertilizeslot.c
Generated by
1.17.0