Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
painkillertablets.c
Go to the documentation of this file.
1
class
PainkillerTablets
extends
Edible_Base
2
{
3
override
void
SetActions
()
4
{
5
super.SetActions();
6
7
AddAction
(
ActionForceConsumeSingle
);
8
AddAction
(
ActionEatTabletFromWrapper
);
9
}
10
11
override
void
OnConsume
(
float
amount,
PlayerBase
consumer)
12
{
13
if
(consumer.GetModifiersManager().IsModifierActive(
eModifiers
.MDF_PAINKILLERS))
// effectively resets the timer
14
consumer.GetModifiersManager().DeactivateModifier(
eModifiers
.MDF_PAINKILLERS,
false
);
15
16
consumer.GetModifiersManager().ActivateModifier(
eModifiers
.MDF_PAINKILLERS);
17
}
18
}
ActionEatTabletFromWrapper
Definition:
actioneattabletfromwrapper.c:1
ActionForceConsumeSingle
void ActionForceConsumeSingle()
Definition:
actionforceconsumesingle.c:13
PlayerBase
Definition:
playerbaseclient.c:1
AddAction
void AddAction(typename actionName)
Definition:
advancedcommunication.c:86
eModifiers
eModifiers
Definition:
emodifiers.c:1
SetActions
void SetActions()
Definition:
advancedcommunication.c:79
OnConsume
void OnConsume(float amount, PlayerBase consumer)
Edible_Base
Definition:
bearsteakmeat.c:1
DAYZ
scripts_v1.24.157551
scripts
world
entities
itembase
edible_base
painkillertablets.c
Generated by
1.8.17