Dayz Explorer
1.28.160049
Loading...
Searching...
No Matches
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
}
AddAction
void AddAction(typename actionName)
Definition
advancedcommunication.c:220
SetActions
void SetActions()
Definition
advancedcommunication.c:213
ActionMeasureTemperatureSelf
Definition
actionmeasuretemperatureself.c:10
ActionMeasureTemperatureTarget
Definition
actionmeasuretemperaturetarget.c:10
ItemBase
Definition
inventoryitem.c:731
Math
Definition
enmath.c:7
PlayerBase
Definition
playerbaseclient.c:2
PlayerConstants
Definition
playerconstants.c:2
eModifierSyncIDs
eModifierSyncIDs
Definition
modifiersmanager.c:3
Daten
4_world
entities
itembase
thermometer.c
Generated by
1.12.0