Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
thermometer.c
Go to the documentation of this file.
1
class
Thermometer
extends
ItemBase
2
{
3
float
GetTemperatureValue(
PlayerBase
player)
4
{
5
float
value;
6
if
(player && player.IsSyncedModifierActive(
eModifierSyncIDs
.MODIFIER_SYNC_FEVER))
7
{
8
value =
Math
.RandomFloatInclusive(
PlayerConstants
.HIGH_TEMPERATURE_L,
PlayerConstants
.HIGH_TEMPERATURE_H);
9
}
10
else
11
{
12
value =
Math
.RandomFloatInclusive(
PlayerConstants
.NORMAL_TEMPERATURE_L,
PlayerConstants
.NORMAL_TEMPERATURE_H);
13
}
14
value =
Math
.Round(value * 10) / 10;
15
return
value;
16
}
17
18
override
void
SetActions
()
19
{
20
super.SetActions();
21
22
AddAction
(
ActionMeasureTemperatureTarget
);
23
AddAction
(
ActionMeasureTemperatureSelf
);
24
}
25
}
ItemBase
Definition:
inventoryitem.c:730
ActionMeasureTemperatureSelf
Definition:
actionmeasuretemperatureself.c:9
PlayerBase
Definition:
playerbaseclient.c:1
PlayerConstants
Definition:
playerconstants.c:1
AddAction
void AddAction(typename actionName)
Definition:
advancedcommunication.c:86
SetActions
void SetActions()
Definition:
advancedcommunication.c:79
ActionMeasureTemperatureTarget
Definition:
actionmeasuretemperaturetarget.c:9
eModifierSyncIDs
eModifierSyncIDs
Definition:
modifiersmanager.c:2
Math
Definition:
enmath.c:6
DAYZ
scripts_v1.24.157551
scripts
world
entities
itembase
thermometer.c
Generated by
1.8.17