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

◆ StopCooling()

void StopCooling ( )
protected

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

2076 {
2077 //stop all fire visuals
2079 SetObjectMaterial(0, MATERIAL_FIREPLACE_NOGLOW);
2080
2081 //Stop cooling
2082 m_CoolingTimer.Stop();
2083 m_CoolingTimer = NULL;
2084
2085 //destroy area damage
2087
2088 //remove cookware audio visuals
2089 ItemBase cookware;
2090 if (Class.CastTo(cookware,GetCookingEquipment()) && (cookware.IsCookware() || cookware.IsLiquidContainer())) //also stops boiling effects on bottles
2091 cookware.RemoveAudioVisualsOnClient();
2092
2094 {
2095 for (int i = 0; i < DIRECT_COOKING_SLOT_COUNT; i++)
2096 {
2097 if (m_DirectCookingSlots[i])
2098 {
2099 if (Class.CastTo(cookware,m_DirectCookingSlots[i]) && (cookware.IsCookware() || cookware.IsLiquidContainer())) //also stops boiling effects on bottles
2100 cookware.RemoveAudioVisualsOnClient();
2101
2102 Edible_Base itsfood = Edible_Base.Cast(m_DirectCookingSlots[i]);
2103 if (itsfood)
2104 itsfood.MakeSoundsOnClient(false);
2105
2106 GameInventory inv = m_DirectCookingSlots[i].GetInventory();
2107 if (!inv)
2108 return;
2109
2110 CargoBase cargo = inv.GetCargo();
2111 if (!cargo) // cookware
2112 return;
2113
2114 for (int j = 0; j < cargo.GetItemCount(); j++)
2115 {
2116 Edible_Base edible = Edible_Base.Cast(cargo.GetItem(j));
2117 if (edible)
2118 edible.MakeSoundsOnClient(false);
2119 }
2120 }
2121 }
2122 }
2123 }
ItemBase GetCookingEquipment()
Определения FireplaceBase.c:583
bool DirectCookingSlotsInUse()
Определения FireplaceBase.c:609
const int DIRECT_COOKING_SLOT_COUNT
direct cooking slots
Определения FireplaceBase.c:76
void SetFireState(FireplaceFireState state)
Определения FireplaceBase.c:1711
const string MATERIAL_FIREPLACE_NOGLOW
Определения FireplaceBase.c:180
ref Timer m_CoolingTimer
Определения FireplaceBase.c:93
void DestroyAreaDamage()
Определения FireplaceBase.c:2338
ItemBase m_DirectCookingSlots[DIRECT_COOKING_SLOT_COUNT]
Определения FireplaceBase.c:101
FireplaceFireState
Определения FireplaceBase.c:2
proto native int GetItemCount()
proto native EntityAI GetItem(int index)
represents base for cargo storage for entities
Определения Cargo.c:7
Super root of all classes in Enforce script.
Определения EnScript.c:11
void MakeSoundsOnClient(bool soundstate, CookingMethodType cookingMethod=CookingMethodType.NONE)
Определения Edible_Base.c:215
Определения Edible_Base.c:2
proto native CargoBase GetCargo()
cargo
script counterpart to engine's class Inventory
Определения Inventory.c:79
Определения InventoryItem.c:731
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo(), DestroyAreaDamage(), DIRECT_COOKING_SLOT_COUNT, DirectCookingSlotsInUse(), GameInventory::GetCargo(), GetCookingEquipment(), CargoBase::GetItem(), CargoBase::GetItemCount(), m_CoolingTimer, m_DirectCookingSlots, Edible_Base::MakeSoundsOnClient(), MATERIAL_FIREPLACE_NOGLOW и SetFireState().

Используется в Cooling().