1971 {
1972 float temperature = GetTemperature();
1973 float temperatureModifier = 0;
1974
1977
1978
1980 {
1982 return;
1983 }
1984
1985
1986 float target = 10;
1987
1988 if (temperature > target)
1989 {
1990
1992 float combinedWindAndSnowfall = MiscGameplayFunctions.GetCombinedSnowfallWindValue();
1993
1995 {
1996 if (rain > combinedWindAndSnowfall)
1997 {
2000 }
2001 else
2002 {
2005 }
2006 }
2007 else
2008 {
2010 }
2011
2012
2013 float wetness =
GetWet();
2015
2016
2017 target =
g_Game.GetMission().GetWorldData().GetBaseEnvTemperatureAtObject(
this);
2018
2019 float flatWetTarget = GetTemperature() - temperatureModifier;
2020 flatWetTarget =
Math.
Clamp(flatWetTarget,target,GetTemperatureMax());
2021 SetTemperatureDirect(flatWetTarget);
2022
2027
2028
2029 temperature = GetTemperature();
2030
2031
2033
2034
2036 {
2038
2040 {
2041
2043 }
2044 }
2045
2046 float cookingItemTemperature;
2047 int i;
2048
2049
2051 {
2053 {
2056 }
2057 }
2058
2059
2061 {
2063 {
2066 }
2067 }
2068 }
2069 else
2070 {
2072 }
2073 }
ref UniversalTemperatureSourceSettings m_UTSSettings
bool DirectCookingSlotsInUse()
const int DIRECT_COOKING_SLOT_COUNT
direct cooking slots
const int TIMER_HEATING_UPDATE_INTERVAL
timer constants
const int TIMER_COOLING_UPDATE_INTERVAL
update interval duration of heating process (seconds)
const float PARAM_TEMPERATURE_DECREASE
how much will temperature increase when fireplace is burning (degree Celsius per second)
void BurnItemsInFireplace()
void CookOnDirectSlot(ItemBase slot_item, float temp_equip, float temp_ext)
const float SNOWFALL_EFFECT_LIMIT
rain level that triggers fireplace to start soaking
const float PARAM_WET_COOLING_DECREASE_COEF
value for calculating wetness loss during heating process
const int SMOKING_SLOT_COUNT
void SmokeOnSmokingSlot(ItemBase slot_item, float temp_equip, float temp_ext)
const float SNOWFALL_WETNESS_INCREASE
value for calculating of wetness that fireplace gain when raining
ItemBase m_DirectCookingSlots[DIRECT_COOKING_SLOT_COUNT]
ref UniversalTemperatureSourceLambdaFireplace m_UTSLFireplace
ref UniversalTemperatureSource m_UTSource
ItemBase m_CookingEquipment
ItemBase m_SmokingSlots[SMOKING_SLOT_COUNT]
int GetFuelCount()
Returns count of all fuel type items (define in 'm_FuelTypes') attached to fireplace.
const float RAIN_WETNESS_INCREASE
snowfall level that triggers fireplace to start soaking
const float PARAM_COOKING_TEMP_THRESHOLD
cooking
const float RAIN_EFFECT_LIMIT
void AddWetnessToFireplace(float amount)
override void CheckForRoofLimited(float timeTresholdMS=3000)
Roof check for entity, limited by time (anti-spam solution)
proto native Weather GetWeather()
Returns weather controller object.
proto native Rain GetRain()
Returns a rain phenomenon object.
proto native float GetActual()
proto native CGame GetGame()
const float TEMP_COEF_FIREPLACE_COOLING
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'.