1997 {
1998 float temperature = GetTemperature();
1999 float temperatureModifier = 0;
2000
2003
2004
2006 {
2008 return;
2009 }
2010
2011 float target =
Math.
Max(
g_Game.GetMission().GetWorldData().GetBaseEnvTemperatureAtObject(
this),10);
2012
2013 if (temperature > target)
2014 {
2015
2016 float rain =
g_Game.GetWeather().GetRain().GetActual();
2017 float combinedWindAndSnowfall = MiscGameplayFunctions.GetCombinedSnowfallWindValue();
2018
2020 {
2021 if (rain > combinedWindAndSnowfall)
2022 {
2025 }
2026 else
2027 {
2030 }
2031 }
2032 else
2033 {
2035 }
2036
2037
2038 float wetness =
GetWet();
2040
2041
2042 target =
g_Game.GetMission().GetWorldData().GetBaseEnvTemperatureAtObject(
this);
2043
2044 float flatWetTarget = GetTemperature() - temperatureModifier;
2045 flatWetTarget =
Math.
Clamp(flatWetTarget,target,GetTemperatureMax());
2046 SetTemperatureDirect(flatWetTarget);
2047
2052
2053
2054 temperature = GetTemperature();
2055
2056
2058
2059
2061 {
2063
2065 {
2066
2068 }
2069 }
2070
2071 float cookingItemTemperature;
2072 int i;
2073
2074
2076 {
2078 {
2081 }
2082 }
2083
2084
2086 {
2088 {
2091 }
2092 }
2093 }
2094 else
2095 {
2097 }
2098 }
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)
const float TEMP_COEF_FIREPLACE_COOLING
static proto float Max(float x, float y)
Returns bigger of two given values.
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'.