DayZ
1.24
Loading...
Searching...
No Matches
VitaminBottle.c
Go to the documentation of this file.
1
class
VitaminBottle
:
Edible_Base
2
{
3
//Specify this item can only be combined but not split
4
override
void
InitItemVariables
()
5
{
6
super
.InitItemVariables();
7
8
can_this_be_combined
=
true
;
9
}
10
11
override
void
OnConsume
(
float
amount,
PlayerBase
consumer
)
12
{
13
if
(
consumer
.GetModifiersManager().IsModifierActive(
eModifiers
.MDF_IMMUNITYBOOST))
//effectively resets the timer
14
consumer
.GetModifiersManager().DeactivateModifier(
eModifiers
.MDF_IMMUNITYBOOST);
15
16
consumer
.GetModifiersManager().ActivateModifier(
eModifiers
.MDF_IMMUNITYBOOST);
17
}
18
19
override
void
SetActions
()
20
{
21
super
.SetActions();
22
23
AddAction
(ActionForceConsumeSingle);
24
AddAction
(
ActionEatPillFromBottle
);
25
}
26
}
27
AddAction
void AddAction(typename actionName)
Definition
AdvancedCommunication.c:212
can_this_be_combined
bool can_this_be_combined
Definition
ItemBase.c:4741
ActionEatPillFromBottle
Definition
ActionEatPillFromBottle.c:2
Edible_Base
Definition
Edible_Base.c:2
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
VitaminBottle
Definition
VitaminBottle.c:2
VitaminBottle::SetActions
override void SetActions()
Definition
VitaminBottle.c:19
VitaminBottle::OnConsume
override void OnConsume(float amount, PlayerBase consumer)
Definition
VitaminBottle.c:11
VitaminBottle::InitItemVariables
override void InitItemVariables()
Definition
VitaminBottle.c:4
eModifiers
eModifiers
Definition
eModifiers.c:2
scripts
4_World
Entities
ItemBase
Edible_Base
VitaminBottle.c
Generated by
1.10.0