DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ Heating()

void Heating ( )
protected

См. определение в файле FireplaceBase.c строка 1799

1800 {
1801 float temperature;
1802 float temperatureModifier = 0;
1803
1804 if (IsOpen() && !IsOven())
1806
1807 //check burning conditions
1809 {
1810 StopFire(FireplaceFireState.EXTINGUISHED_FIRE);
1811 return;
1812 }
1813 else
1814 {
1815 if (m_FireConsumables.Count() == 0)
1816 {
1817 StopFire();
1818 return;
1819 }
1820 }
1821
1822 //spend actual fire consumable
1824 SpendFireConsumable(amount);
1825
1826 //set wetness and alter temperature modifier (which will lower temperature increase because of soaking)
1827 float rain = GetGame().GetWeather().GetRain().GetActual();
1828 float combinedWindAndSnowfall = MiscGameplayFunctions.GetCombinedSnowfallWindValue();
1829
1830 if ((rain >= RAIN_EFFECT_LIMIT || combinedWindAndSnowfall >= SNOWFALL_EFFECT_LIMIT) && !IsRoofAbove() && IsOpen() && !IsOven())
1831 {
1832 if (rain > combinedWindAndSnowfall)
1833 {
1835 temperatureModifier = PARAM_TEMPERATURE_DECREASE * rain;
1836 }
1837 else
1838 {
1839 AddWetnessToFireplace(SNOWFALL_WETNESS_INCREASE * combinedWindAndSnowfall);
1840 temperatureModifier = PARAM_TEMPERATURE_DECREASE * combinedWindAndSnowfall;
1841 }
1842 }
1843 //subtract wetness when heating and not raining above
1844 else
1845 {
1847 }
1848
1849 if (m_SurfaceUnderWetnessModifier > 0.0)
1850 AddWetnessToFireplace(m_SurfaceUnderWetnessModifier * WET_SURFACE_INCREMENT);
1851
1852 // FLAT temperature increase
1853 temperature = GetTemperature() + (PARAM_TEMPERATURE_INCREASE * TIMER_HEATING_UPDATE_INTERVAL) - temperatureModifier;
1854 temperature = Math.Clamp(temperature, g_Game.GetMission().GetWorldData().GetBaseEnvTemperatureAtObject(this), m_UTSLFireplace.m_NormalFireplaceTemperatureMax);
1855 SetTemperatureDirect(temperature); //direct heating (non-systematic approach), freezing, overheating, and other stuff inside 'SetTemperatureEx' are therefore UNHANDLED here!
1856 m_UTSLFireplace.SetFuelCount(GetFuelCount()); //legacy reasons
1857 m_UTSLFireplace.SetCurrentTemperature(temperature); //legacy reasons
1859
1860 //get newly changed temperature
1861 temperature = GetTemperature();
1862
1863 //check fire state
1864 if (GetFireState() != FireplaceFireState.EXTINGUISHING_FIRE)
1865 {
1867 }
1868
1869 //damage cargo items
1871
1872 //manage cooking equipment (this applies only for case of cooking pot on a tripod)
1874 {
1876 }
1877
1878 float cookingItemTemperature;
1879 int i;
1880 // manage cooking on direct cooking slots
1882 {
1883 for (i = 0; i < DIRECT_COOKING_SLOT_COUNT; i++)
1884 {
1885 if (m_DirectCookingSlots[i])
1886 {
1887 cookingItemTemperature = m_DirectCookingSlots[i].GetTemperature();
1888 CookOnDirectSlot(m_DirectCookingSlots[i], cookingItemTemperature, temperature);
1889 }
1890 }
1891 }
1892
1893 // manage smoking slots
1894 if (SmokingSlotsInUse())
1895 {
1896 for (i = 0; i < SMOKING_SLOT_COUNT; i++)
1897 {
1898 if (m_SmokingSlots[i])
1899 {
1900 SmokeOnSmokingSlot(m_SmokingSlots[i], cookingItemTemperature, temperature);
1901 }
1902 }
1903 }
1904
1905 //Make noise for AI, only at night
1906 if (GetGame().GetWorld().IsNight() && m_CanNoise)
1907 {
1909 if (noise && m_NoisePar)
1910 {
1912 }
1913 m_CanNoise = false;
1914 }
1915 else
1916 m_CanNoise = true;
1917
1918 Synchronize();
1919 }
ref NoiseParams m_NoisePar
Определения ActionOpenDoors.c:94
DayZGame g_Game
Определения DayZGame.c:3868
float GetFuelBurnRateMP()
Определения FireplaceBase.c:1694
override bool IsOpen()
Определения FireplaceBase.c:2396
ref UniversalTemperatureSourceSettings m_UTSSettings
Определения FireplaceBase.c:220
bool SmokingSlotsInUse()
Определения FireplaceBase.c:621
const float WET_SURFACE_INCREMENT
Определения FireplaceBase.c:224
bool DirectCookingSlotsInUse()
Определения FireplaceBase.c:609
const int DIRECT_COOKING_SLOT_COUNT
direct cooking slots
Определения FireplaceBase.c:76
const int TIMER_HEATING_UPDATE_INTERVAL
timer constants
Определения FireplaceBase.c:73
const float PARAM_TEMPERATURE_DECREASE
how much will temperature increase when fireplace is burning (degree Celsius per second)
Определения FireplaceBase.c:46
const float PARAM_TEMPERATURE_INCREASE
minimum fireplace temperature under which the fireplace is inactive (degree Celsius)
Определения FireplaceBase.c:45
const float PARAM_FIRE_CONSUM_RATE_AMOUNT
value for calculating wetness loss during cooling process
Определения FireplaceBase.c:53
bool m_CanNoise
Определения FireplaceBase.c:216
bool HasCookingStand()
Определения FireplaceBase.c:2476
void StopFire(FireplaceFireState fire_state=FireplaceFireState.END_FIRE)
Определения FireplaceBase.c:1925
void BurnItemsInFireplace()
Определения FireplaceBase.c:2167
void CookOnDirectSlot(ItemBase slot_item, float temp_equip, float temp_ext)
Определения FireplaceBase.c:2144
void CookWithEquipment()
Определения FireplaceBase.c:2128
void SpendFireConsumable(float amount)
Определения FireplaceBase.c:1468
const float SNOWFALL_EFFECT_LIMIT
rain level that triggers fireplace to start soaking
Определения FireplaceBase.c:87
void RefreshFireState()
Определения FireplaceBase.c:1052
const int SMOKING_SLOT_COUNT
Определения FireplaceBase.c:77
void SmokeOnSmokingSlot(ItemBase slot_item, float temp_equip, float temp_ext)
Определения FireplaceBase.c:2152
const float SNOWFALL_WETNESS_INCREASE
value for calculating of wetness that fireplace gain when raining
Определения FireplaceBase.c:89
ItemBase m_DirectCookingSlots[DIRECT_COOKING_SLOT_COUNT]
Определения FireplaceBase.c:101
void Synchronize()
Определения FireplaceBase.c:484
int GetFireState()
Определения FireplaceBase.c:1705
const float PARAM_BURN_WET_THRESHOLD
maximum rain value when the fireplace can be ignited
Определения FireplaceBase.c:50
ref UniversalTemperatureSourceLambdaFireplace m_UTSLFireplace
Определения FireplaceBase.c:221
ref UniversalTemperatureSource m_UTSource
Определения FireplaceBase.c:219
ref map< ItemBase, ref FireConsumable > m_FireConsumables
Определения FireplaceBase.c:143
FireplaceFireState
Определения FireplaceBase.c:2
bool IsOven()
Определения FireplaceBase.c:1643
ItemBase m_CookingEquipment
Определения FireplaceBase.c:100
ItemBase m_SmokingSlots[SMOKING_SLOT_COUNT]
Определения FireplaceBase.c:102
int GetFuelCount()
Returns count of all fuel type items (define in 'm_FuelTypes') attached to fireplace.
Определения FireplaceBase.c:1537
const float PARAM_WET_HEATING_DECREASE_COEF
maximum wetness value when the fireplace is able to burn
Определения FireplaceBase.c:51
const float RAIN_WETNESS_INCREASE
snowfall level that triggers fireplace to start soaking
Определения FireplaceBase.c:88
const float RAIN_EFFECT_LIMIT
Определения FireplaceBase.c:86
void AddWetnessToFireplace(float amount)
Определения FireplaceBase.c:2298
override void CheckForRoofLimited(float timeTresholdMS=3000)
Roof check for entity, limited by time (anti-spam solution)
Определения ItemBase.c:8729
override float GetWet()
Определения ItemBase.c:8374
proto native NoiseSystem GetNoiseSystem()
proto native Weather GetWeather()
Returns weather controller object.
Определения EnMath.c:7
static float GetNoiseReduction(Weather weather)
Определения SensesAIEvaluate.c:18
proto void AddNoisePos(EntityAI source_entity, vector pos, NoiseParams noise_params, float external_strenght_multiplier=1.0)
Определения Noise.c:2
proto native Rain GetRain()
Returns a rain phenomenon object.
proto native float GetActual()
proto native CGame GetGame()
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'.
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9

Перекрестные ссылки NoiseSystem::AddNoisePos(), AddWetnessToFireplace(), BurnItemsInFireplace(), CheckForRoofLimited(), Math::Clamp(), CookOnDirectSlot(), CookWithEquipment(), DIRECT_COOKING_SLOT_COUNT, DirectCookingSlotsInUse(), g_Game, WeatherPhenomenon::GetActual(), GetFireState(), GetFuelBurnRateMP(), GetFuelCount(), GetGame(), NoiseAIEvaluate::GetNoiseReduction(), CGame::GetNoiseSystem(), GetPosition, Weather::GetRain(), CGame::GetWeather(), GetWet(), HasCookingStand(), FireplaceBase::IsOpen(), IsOven(), m_CanNoise, m_CookingEquipment, m_DirectCookingSlots, m_FireConsumables, m_NoisePar, m_SmokingSlots, m_UTSLFireplace, m_UTSource, m_UTSSettings, PARAM_BURN_WET_THRESHOLD, PARAM_FIRE_CONSUM_RATE_AMOUNT, PARAM_TEMPERATURE_DECREASE, PARAM_TEMPERATURE_INCREASE, PARAM_WET_HEATING_DECREASE_COEF, RAIN_EFFECT_LIMIT, RAIN_WETNESS_INCREASE, RefreshFireState(), SmokeOnSmokingSlot(), SMOKING_SLOT_COUNT, SmokingSlotsInUse(), SNOWFALL_EFFECT_LIMIT, SNOWFALL_WETNESS_INCREASE, SpendFireConsumable(), StopFire(), Synchronize(), TIMER_HEATING_UPDATE_INTERVAL и WET_SURFACE_INCREMENT.