Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actiondisinfectplantbit.c
Go to the documentation of this file.
1
// TO DO: Remove this script!
2
3
class
ActionDisinfectPlantBitCB
:
ActionSingleUseBaseCB
4
{
5
override
void
CreateActionComponent
()
6
{
7
m_ActionData
.m_ActionComponent =
new
CASingleUseQuantity
(
UAQuantityConsumed
.
GARDEN_DISINFECT_PLANT
);
8
}
9
};
10
11
12
class
ActionDisinfectPlantBit
:
ActionSingleUseBase
13
{
14
void
ActionDisinfectPlantBit
()
15
{
16
m_CallbackClass
=
ActionDisinfectPlantBitCB
;
17
m_SpecialtyWeight
= UASoftSkillsWeight.PRECISE_LOW;
18
m_Text
=
"#apply"
;
19
}
20
21
override
void
CreateConditionComponents
()
22
{
23
m_ConditionItem
=
new
CCINonRuined
;
24
m_ConditionTarget
=
new
CCTNonRuined
(
UAMaxDistances
.
DEFAULT
);
25
}
26
27
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
28
{
29
Object
targetObject = target.GetObject();
30
31
if
( targetObject != NULL && targetObject.IsInherited(
PlantBase
) && !item.IsDamageDestroyed() )
32
{
33
PlantBase
plant =
PlantBase
.Cast( targetObject );
34
35
if
(plant.IsSprayable())
36
{
37
if
( item.GetQuantity() > 0 )
38
{
39
return
true
;
40
}
41
}
42
}
43
44
return
false
;
45
}
46
47
override
void
OnExecuteServer
(
ActionData
action_data )
48
{
49
Object
targetObject = action_data.m_Target.GetObject();
50
51
if
( targetObject != NULL && targetObject.IsInherited(
PlantBase
) )
52
{
53
54
PlantBase
plant =
PlantBase
.Cast( targetObject );
55
Param1<float> nacdata = Param1<float>.Cast( action_data.m_ActionComponent.GetACData() );
56
SendMessageToClient
(action_data.m_Player, plant.StopInfestation( nacdata.param1 ));
57
}
58
}
59
};
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionTarget
class ActionTargets ActionTarget
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
animatedactionbase.c:3
ActionBase::m_Text
string m_Text
Definition
actionbase.c:64
ActionBase::SendMessageToClient
void SendMessageToClient(Object reciever, string message)
Definition
actionbase.c:1154
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
ActionDisinfectPlantBitCB
Definition
actiondisinfectplantbit.c:4
ActionDisinfectPlantBitCB::CreateActionComponent
override void CreateActionComponent()
Definition
actiondisinfectplantbit.c:5
ActionDisinfectPlantBit::ActionDisinfectPlantBit
void ActionDisinfectPlantBit()
Definition
actiondisinfectplantbit.c:14
ActionDisinfectPlantBit::OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition
actiondisinfectplantbit.c:47
ActionDisinfectPlantBit::CreateConditionComponents
override void CreateConditionComponents()
Definition
actiondisinfectplantbit.c:21
ActionDisinfectPlantBit::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actiondisinfectplantbit.c:27
ActionSingleUseBaseCB
Definition
actionsingleusebase.c:2
ActionSingleUseBase::ActionSingleUseBase
void ActionSingleUseBase()
Definition
actionsingleusebase.c:31
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
animatedactionbase.c:145
CASingleUseQuantity
Definition
casingleusequantity.c:2
CCINonRuined
Definition
ccinonruined.c:2
CCTNonRuined
Definition
cctnonruined.c:2
ItemBase
Definition
inventoryitem.c:742
Object
Definition
objecttyped.c:2
PlayerBase
Definition
playerbaseclient.c:2
UAMaxDistances
Definition
actionconstants.c:110
UAMaxDistances::DEFAULT
const float DEFAULT
Definition
actionconstants.c:112
UAQuantityConsumed
Definition
actionconstants.c:4
UAQuantityConsumed::GARDEN_DISINFECT_PLANT
const float GARDEN_DISINFECT_PLANT
Definition
actionconstants.c:22
PlantBase
void PlantBase()
Definition
plantbase.c:54
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
singleuse
actiondisinfectplantbit.c
Generated by
1.17.0