DayZ 1.24
Loading...
Searching...
No Matches
VitaminBottle.c
Go to the documentation of this file.
2{
3 //Specify this item can only be combined but not split
4 override void InitItemVariables()
5 {
6 super.InitItemVariables();
7
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);
25 }
26}
27
void AddAction(typename actionName)
bool can_this_be_combined
Definition ItemBase.c:4741
override void SetActions()
override void OnConsume(float amount, PlayerBase consumer)
override void InitItemVariables()
eModifiers
Definition eModifiers.c:2