DayZ
1.24
Loading...
Searching...
No Matches
UniversalTemperatureSourceLambdaFireplace.c
Go to the documentation of this file.
1
class
UniversalTemperatureSourceLambdaFireplace
:
UniversalTemperatureSourceLambdaBaseImpl
2
{
3
int
m_FuelCount
;
4
int
m_SmallFireplaceTemperatureMax
;
5
int
m_NormalFireplaceTemperatureMax
;
6
float
m_Temperature
;
7
8
void
UniversalTemperatureSourceLambdaFireplace
()
9
{
10
m_FuelCount
= 0;
11
m_SmallFireplaceTemperatureMax
= 0;
12
m_NormalFireplaceTemperatureMax
= 0;
13
m_Temperature
= 0;
14
}
15
16
void
SetSmallFireplaceTemperatureMax
(
int
value
)
17
{
18
m_SmallFireplaceTemperatureMax
=
value
;
19
}
20
21
void
SetNormalFireplaceTemperatureMax
(
int
value
)
22
{
23
m_NormalFireplaceTemperatureMax
=
value
;
24
}
25
26
void
SetFuelCount
(
int
value
)
27
{
28
m_FuelCount
=
value
;
29
}
30
31
void
SetCurrentTemperature
(
float
temperature
)
32
{
33
//no fuel present, temperature should be low but there can be high temperature from previous fuel burning
34
if
(
m_FuelCount
== 0 ||
temperature
<=
m_SmallFireplaceTemperatureMax
)
35
{
36
temperature
=
Math
.
Clamp
(
temperature
, 0,
m_SmallFireplaceTemperatureMax
);
//small fire
37
}
38
else
39
{
40
temperature
=
Math
.
Clamp
(
temperature
, 0,
m_NormalFireplaceTemperatureMax
);
//normal fire
41
}
42
43
m_Temperature
=
temperature
;
44
}
45
46
override
void
Execute
(
UniversalTemperatureSourceSettings
pSettings
,
UniversalTemperatureSourceResult
resultValues
)
47
{
48
resultValues
.m_Temperature =
m_Temperature
;
49
//Debug.Log(string.Format("Execute: temperature: %1", resultValues.m_Temperature), "UTS Fireplace");
50
51
if
(
pSettings
.m_AffectStat)
52
{
54
pSettings
.m_Parent.SetTemperature(
m_Temperature
);
55
}
56
57
DryItemsInVicinity
(
pSettings
);
58
}
59
}
Math
Definition
EnMath.c:7
Param3
Definition
EntityAI.c:95
UniversalTemperatureSourceLambdaBaseImpl
Definition
UniversalTemperatureSourceLambdaBaseImpl.c:2
UniversalTemperatureSourceLambdaBaseImpl::DryItemsInVicinity
override void DryItemsInVicinity(UniversalTemperatureSourceSettings pSettings)
Definition
UniversalTemperatureSourceLambdaBaseImpl.c:3
UniversalTemperatureSourceLambdaFireplace
Definition
UniversalTemperatureSourceLambdaFireplace.c:2
UniversalTemperatureSourceLambdaFireplace::SetFuelCount
void SetFuelCount(int value)
Definition
UniversalTemperatureSourceLambdaFireplace.c:26
UniversalTemperatureSourceLambdaFireplace::m_NormalFireplaceTemperatureMax
int m_NormalFireplaceTemperatureMax
Definition
UniversalTemperatureSourceLambdaFireplace.c:5
UniversalTemperatureSourceLambdaFireplace::m_SmallFireplaceTemperatureMax
int m_SmallFireplaceTemperatureMax
Definition
UniversalTemperatureSourceLambdaFireplace.c:4
UniversalTemperatureSourceLambdaFireplace::m_Temperature
float m_Temperature
Definition
UniversalTemperatureSourceLambdaFireplace.c:6
UniversalTemperatureSourceLambdaFireplace::SetNormalFireplaceTemperatureMax
void SetNormalFireplaceTemperatureMax(int value)
Definition
UniversalTemperatureSourceLambdaFireplace.c:21
UniversalTemperatureSourceLambdaFireplace::Execute
override void Execute(UniversalTemperatureSourceSettings pSettings, UniversalTemperatureSourceResult resultValues)
Definition
UniversalTemperatureSourceLambdaFireplace.c:46
UniversalTemperatureSourceLambdaFireplace::m_FuelCount
int m_FuelCount
Definition
UniversalTemperatureSourceLambdaFireplace.c:3
UniversalTemperatureSourceLambdaFireplace::UniversalTemperatureSourceLambdaFireplace
void UniversalTemperatureSourceLambdaFireplace()
Definition
UniversalTemperatureSourceLambdaFireplace.c:8
UniversalTemperatureSourceLambdaFireplace::SetSmallFireplaceTemperatureMax
void SetSmallFireplaceTemperatureMax(int value)
Definition
UniversalTemperatureSourceLambdaFireplace.c:16
UniversalTemperatureSourceLambdaFireplace::SetCurrentTemperature
void SetCurrentTemperature(float temperature)
Definition
UniversalTemperatureSourceLambdaFireplace.c:31
UniversalTemperatureSourceSettings
Definition
UniversalTemperatureSource.c:2
Math::Clamp
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
scripts
4_World
Systems
UniversalTemperatureSource
UniversalTemperatureSourceLambdaFireplace.c
Generated by
1.10.0