Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
heatpack.c
Go to the documentation of this file.
1
class
Heatpack
:
ItemBase
2
{
3
override
bool
CanHaveTemperature()
4
{
5
return
true
;
6
}
7
8
override
void
OnWorkStart()
9
{
10
if
(
GetGame
().IsServer())
11
{
12
SetTemperature
(60);
13
}
14
}
15
16
override
void
OnWork(
float
consumed_energy )
17
{
18
if
(
GetGame
().IsServer())
19
{
20
SetTemperature
(60);
21
}
22
}
23
24
override
void
OnWorkStop()
25
{
26
if
(
GetGame
().IsServer())
27
{
28
SetHealth(0);
29
}
30
}
31
32
override
void
SetActions()
33
{
34
super.SetActions();
35
36
AddAction
(
ActionTurnOnHeatpack
);
37
}
38
};
ItemBase
Definition:
inventoryitem.c:730
GetGame
proto native CGame GetGame()
Heatpack
Definition:
heatpack.c:1
AddAction
void AddAction(typename actionName)
Definition:
advancedcommunication.c:86
SetTemperature
override void SetTemperature(float value, bool allow_client=false)
Definition:
itembase.c:3499
ActionTurnOnHeatpack
Definition:
actionturnonheatpack.c:1
DAYZ
scripts_v1.24.157551
scripts
world
entities
itembase
heatpack.c
Generated by
1.8.17