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

◆ Heating()

void Heating ( )
protected

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

1808 {
1809 float temperature;
1810 float temperatureModifier = 0;
1811
1812 if (IsOpen() && !IsOven())
1814
1815 //check burning conditions
1817 {
1818 StopFire(FireplaceFireState.EXTINGUISHED_FIRE);
1819 return;
1820 }
1821 else
1822 {
1823 if (m_FireConsumables.Count() == 0)
1824 {
1825 StopFire();
1826 return;
1827 }
1828 }
1829
1830 //spend actual fire consumable
1832 SpendFireConsumable(amount);
1833
1834 //set wetness and alter temperature modifier (which will lower temperature increase because of soaking)
1835 float rain = GetGame().GetWeather().GetRain().GetActual();
1836 float combinedWindAndSnowfall = MiscGameplayFunctions.GetCombinedSnowfallWindValue();
1837
1838 if ((rain >= RAIN_EFFECT_LIMIT || combinedWindAndSnowfall >= SNOWFALL_EFFECT_LIMIT) && !IsRoofAbove() && IsOpen() && !IsOven())
1839 {
1840 if (rain > combinedWindAndSnowfall)
1841 {
1843 temperatureModifier = PARAM_TEMPERATURE_DECREASE * rain;
1844 }
1845 else
1846 {
1847 AddWetnessToFireplace(SNOWFALL_WETNESS_INCREASE * combinedWindAndSnowfall);
1848 temperatureModifier = PARAM_TEMPERATURE_DECREASE * combinedWindAndSnowfall;
1849 }
1850 }
1851 //subtract wetness when heating and not raining above
1852 else
1853 {
1855 }
1856
1857 if (m_SurfaceUnderWetnessModifier > 0.0)
1858 AddWetnessToFireplace(m_SurfaceUnderWetnessModifier * WET_SURFACE_INCREMENT);
1859
1860 // FLAT temperature increase
1861 temperature = GetTemperature() + (PARAM_TEMPERATURE_INCREASE * TIMER_HEATING_UPDATE_INTERVAL) - temperatureModifier;
1862 temperature = Math.Clamp(temperature, g_Game.GetMission().GetWorldData().GetBaseEnvTemperatureAtObject(this), m_UTSLFireplace.m_NormalFireplaceTemperatureMax);
1863 SetTemperatureDirect(temperature); //direct heating (non-systematic approach), freezing, overheating, and other stuff inside 'SetTemperatureEx' are therefore UNHANDLED here!
1864 m_UTSLFireplace.SetFuelCount(GetFuelCount()); //legacy reasons
1865 m_UTSLFireplace.SetCurrentTemperature(temperature); //legacy reasons
1867
1868 //get newly changed temperature
1869 temperature = GetTemperature();
1870
1871 //check fire state
1872 if (GetFireState() != FireplaceFireState.EXTINGUISHING_FIRE)
1873 {
1875 }
1876
1877 //damage cargo items
1879
1880 //manage cooking equipment (this applies only for case of cooking pot on a tripod)
1882 {
1884 }
1885
1886 float cookingItemTemperature;
1887 int i;
1888 // manage cooking on direct cooking slots
1890 {
1891 for (i = 0; i < DIRECT_COOKING_SLOT_COUNT; i++)
1892 {
1893 if (m_DirectCookingSlots[i])
1894 {
1895 cookingItemTemperature = m_DirectCookingSlots[i].GetTemperature();
1896 CookOnDirectSlot(m_DirectCookingSlots[i], cookingItemTemperature, temperature);
1897 }
1898 }
1899 }
1900
1901 // manage smoking slots
1902 if (SmokingSlotsInUse())
1903 {
1904 for (i = 0; i < SMOKING_SLOT_COUNT; i++)
1905 {
1906 if (m_SmokingSlots[i])
1907 {
1908 SmokeOnSmokingSlot(m_SmokingSlots[i], cookingItemTemperature, temperature);
1909 }
1910 }
1911 }
1912
1913 //Make noise for AI, only at night
1914 if (GetGame().GetWorld().IsNight() && m_CanNoise)
1915 {
1917 if (noise && m_NoisePar)
1918 {
1920 }
1921 m_CanNoise = false;
1922 }
1923 else
1924 m_CanNoise = true;
1925
1926 Synchronize();
1927 }
ref NoiseParams m_NoisePar
Определения ActionOpenDoors.c:94
DayZGame g_Game
Определения DayZGame.c:3868
float GetTemperature()
Определения Environment.c:497
float GetFuelBurnRateMP()
Определения FireplaceBase.c:1702
override bool IsOpen()
Определения FireplaceBase.c:2403
ref UniversalTemperatureSourceSettings m_UTSSettings
Определения FireplaceBase.c:220
bool SmokingSlotsInUse()
Определения FireplaceBase.c:623
const float WET_SURFACE_INCREMENT
Определения FireplaceBase.c:224
bool DirectCookingSlotsInUse()
Определения FireplaceBase.c:611
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:2483
void StopFire(FireplaceFireState fire_state=FireplaceFireState.END_FIRE)
Определения FireplaceBase.c:1933
void BurnItemsInFireplace()
Определения FireplaceBase.c:2174
void CookOnDirectSlot(ItemBase slot_item, float temp_equip, float temp_ext)
Определения FireplaceBase.c:2151
void CookWithEquipment()
Определения FireplaceBase.c:2135
void SpendFireConsumable(float amount)
Определения FireplaceBase.c:1470
const float SNOWFALL_EFFECT_LIMIT
rain level that triggers fireplace to start soaking
Определения FireplaceBase.c:87
void RefreshFireState()
Определения FireplaceBase.c:1054
const int SMOKING_SLOT_COUNT
Определения FireplaceBase.c:77
void SmokeOnSmokingSlot(ItemBase slot_item, float temp_equip, float temp_ext)
Определения FireplaceBase.c:2159
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:486
int GetFireState()
Определения FireplaceBase.c:1713
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:1651
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:1539
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:2305
override void CheckForRoofLimited(float timeTresholdMS=3000)
Roof check for entity, limited by time (anti-spam solution)
Определения ItemBase.c:8871
override float GetWet()
Определения ItemBase.c:8516
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(), GetTemperature(), 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.