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

◆ Heating()

void Heating ( )
protected

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

1810 {
1811 float temperature;
1812 float temperatureModifier = 0;
1813
1814 if (IsOpen() && !IsOven())
1816
1817 //check burning conditions
1819 {
1820 StopFire(FireplaceFireState.EXTINGUISHED_FIRE);
1821 return;
1822 }
1823 else
1824 {
1825 if (m_FireConsumables.Count() == 0)
1826 {
1827 StopFire();
1828 return;
1829 }
1830 }
1831
1832 //spend actual fire consumable
1834 SpendFireConsumable(amount);
1835
1836 //set wetness and alter temperature modifier (which will lower temperature increase because of soaking)
1837 float rain = g_Game.GetWeather().GetRain().GetActual();
1838 float combinedWindAndSnowfall = MiscGameplayFunctions.GetCombinedSnowfallWindValue();
1839
1840 if ((rain >= RAIN_EFFECT_LIMIT || combinedWindAndSnowfall >= SNOWFALL_EFFECT_LIMIT) && !IsRoofAbove() && IsOpen() && !IsOven())
1841 {
1842 if (rain > combinedWindAndSnowfall)
1843 {
1845 temperatureModifier = PARAM_TEMPERATURE_DECREASE * rain;
1846 }
1847 else
1848 {
1849 AddWetnessToFireplace(SNOWFALL_WETNESS_INCREASE * combinedWindAndSnowfall);
1850 temperatureModifier = PARAM_TEMPERATURE_DECREASE * combinedWindAndSnowfall;
1851 }
1852 }
1853 //subtract wetness when heating and not raining above
1854 else
1855 {
1857 }
1858
1859 if (m_SurfaceUnderWetnessModifier > 0.0)
1860 AddWetnessToFireplace(m_SurfaceUnderWetnessModifier * WET_SURFACE_INCREMENT);
1861
1862 // FLAT temperature increase
1863 temperature = GetTemperature() + (PARAM_TEMPERATURE_INCREASE * TIMER_HEATING_UPDATE_INTERVAL) - temperatureModifier;
1864 temperature = Math.Clamp(temperature, g_Game.GetMission().GetWorldData().GetBaseEnvTemperatureAtObject(this), m_UTSLFireplace.m_NormalFireplaceTemperatureMax);
1865 SetTemperatureDirect(temperature); //direct heating (non-systematic approach), freezing, overheating, and other stuff inside 'SetTemperatureEx' are therefore UNHANDLED here!
1866 m_UTSLFireplace.SetFuelCount(GetFuelCount()); //legacy reasons
1867 m_UTSLFireplace.SetCurrentTemperature(temperature); //legacy reasons
1869
1870 //get newly changed temperature
1871 temperature = GetTemperature();
1872
1873 //check fire state
1874 if (GetFireState() != FireplaceFireState.EXTINGUISHING_FIRE)
1875 {
1877 }
1878
1879 //damage cargo items
1881
1882 //manage cooking equipment (this applies only for case of cooking pot on a tripod)
1884 {
1886 }
1887
1888 float cookingItemTemperature;
1889 int i;
1890 // manage cooking on direct cooking slots
1892 {
1893 for (i = 0; i < DIRECT_COOKING_SLOT_COUNT; i++)
1894 {
1895 if (m_DirectCookingSlots[i])
1896 {
1897 cookingItemTemperature = m_DirectCookingSlots[i].GetTemperature();
1898 CookOnDirectSlot(m_DirectCookingSlots[i], cookingItemTemperature, temperature);
1899 }
1900 }
1901 }
1902
1903 // manage smoking slots
1904 if (SmokingSlotsInUse())
1905 {
1906 for (i = 0; i < SMOKING_SLOT_COUNT; i++)
1907 {
1908 if (m_SmokingSlots[i])
1909 {
1910 SmokeOnSmokingSlot(m_SmokingSlots[i], cookingItemTemperature, temperature);
1911 }
1912 }
1913 }
1914
1915 //Make noise for AI, only at night
1916 if (g_Game.GetWorld().IsNight() && m_CanNoise)
1917 {
1918 NoiseSystem noise = g_Game.GetNoiseSystem();
1919 if (noise && m_NoisePar)
1920 {
1922 }
1923 m_CanNoise = false;
1924 }
1925 else
1926 m_CanNoise = true;
1927
1928 Synchronize();
1929 }
ref NoiseParams m_NoisePar
Определения ActionOpenDoors.c:94
DayZGame g_Game
Определения DayZGame.c:3942
float GetTemperature()
Определения Environment.c:500
float GetFuelBurnRateMP()
Определения FireplaceBase.c:1704
override bool IsOpen()
Определения FireplaceBase.c:2405
ref UniversalTemperatureSourceSettings m_UTSSettings
Определения FireplaceBase.c:221
bool SmokingSlotsInUse()
Определения FireplaceBase.c:625
const float WET_SURFACE_INCREMENT
Определения FireplaceBase.c:225
bool DirectCookingSlotsInUse()
Определения FireplaceBase.c:613
const int DIRECT_COOKING_SLOT_COUNT
direct cooking slots
Определения FireplaceBase.c:77
const int TIMER_HEATING_UPDATE_INTERVAL
timer constants
Определения FireplaceBase.c:74
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:217
bool HasCookingStand()
Определения FireplaceBase.c:2485
void StopFire(FireplaceFireState fire_state=FireplaceFireState.END_FIRE)
Определения FireplaceBase.c:1935
void BurnItemsInFireplace()
Определения FireplaceBase.c:2176
void CookOnDirectSlot(ItemBase slot_item, float temp_equip, float temp_ext)
Определения FireplaceBase.c:2153
void CookWithEquipment()
Определения FireplaceBase.c:2137
void SpendFireConsumable(float amount)
Определения FireplaceBase.c:1472
const float SNOWFALL_EFFECT_LIMIT
rain level that triggers fireplace to start soaking
Определения FireplaceBase.c:88
void RefreshFireState()
Определения FireplaceBase.c:1056
const int SMOKING_SLOT_COUNT
Определения FireplaceBase.c:78
void SmokeOnSmokingSlot(ItemBase slot_item, float temp_equip, float temp_ext)
Определения FireplaceBase.c:2161
const float SNOWFALL_WETNESS_INCREASE
value for calculating of wetness that fireplace gain when raining
Определения FireplaceBase.c:90
ItemBase m_DirectCookingSlots[DIRECT_COOKING_SLOT_COUNT]
Определения FireplaceBase.c:102
void Synchronize()
Определения FireplaceBase.c:488
int GetFireState()
Определения FireplaceBase.c:1715
const float PARAM_BURN_WET_THRESHOLD
maximum rain value when the fireplace can be ignited
Определения FireplaceBase.c:50
ref UniversalTemperatureSourceLambdaFireplace m_UTSLFireplace
Определения FireplaceBase.c:222
ref UniversalTemperatureSource m_UTSource
Определения FireplaceBase.c:220
ref map< ItemBase, ref FireConsumable > m_FireConsumables
Определения FireplaceBase.c:144
FireplaceFireState
Определения FireplaceBase.c:2
bool IsOven()
Определения FireplaceBase.c:1653
ItemBase m_CookingEquipment
Определения FireplaceBase.c:101
ItemBase m_SmokingSlots[SMOKING_SLOT_COUNT]
Определения FireplaceBase.c:103
int GetFuelCount()
Returns count of all fuel type items (define in 'm_FuelTypes') attached to fireplace.
Определения FireplaceBase.c:1541
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:89
const float RAIN_EFFECT_LIMIT
Определения FireplaceBase.c:87
void AddWetnessToFireplace(float amount)
Определения FireplaceBase.c:2307
override void CheckForRoofLimited(float timeTresholdMS=3000)
Roof check for entity, limited by time (anti-spam solution)
Определения ItemBase.c:8971
override float GetWet()
Определения ItemBase.c:8621
Определения 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
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'.
vector GetPosition()
Get the world position of the Effect.
Определения Effect.c:473

Перекрестные ссылки NoiseSystem::AddNoisePos(), AddWetnessToFireplace(), BurnItemsInFireplace(), CheckForRoofLimited(), Math::Clamp(), CookOnDirectSlot(), CookWithEquipment(), DIRECT_COOKING_SLOT_COUNT, DirectCookingSlotsInUse(), g_Game, GetFireState(), GetFuelBurnRateMP(), GetFuelCount(), NoiseAIEvaluate::GetNoiseReduction(), GetPosition(), GetTemperature(), 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.