118 {
119 bool is_empty = true;
120
121
122 if (cooking_equipment == null)
123 return 0;
124
125 if (cooking_equipment.IsRuined())
126 return 0;
127
128
131 if (cooking_time_coef != 1)
132 cookingMethodWithTime.param2 = cooking_time_coef;
133
134
135 ProcessItemToCook(cooking_equipment, cooking_equipment, cookingMethodWithTime, stateFlags);
136
137
138 if (cooking_equipment.IsCookware() && cooking_equipment.IsLiquidContainer())
139 {
141 if (cooking_time_coef != 1)
142 cookingMethodWithTime.param2 = cooking_time_coef;
143 }
144
145
146 CargoBase cargo = cooking_equipment.GetInventory().GetCargo();
147 if (cargo)
148 {
150 is_empty = count == 0;
151
152
153 for (int i = 0; i < count; i++)
154 {
156 }
157 }
158
159
160 int liquidType = cooking_equipment.GetLiquidType();
161
162 if (cooking_equipment.IsLiquidContainer() && liquidType !=
LIQUID_NONE)
163 {
164 if (cooking_equipment.GetTemperature() >= Liquid.GetBoilThreshold(liquidType))
165 {
166
167 cooking_equipment.RefreshAudioVisualsOnClient(cookingMethodWithTime.param1, stateFlags.param1, is_empty, stateFlags.param2);
168 }
169 else
170 {
171 cooking_equipment.RemoveAudioVisualsOnClient();
172 }
173 }
174 else if (cooking_equipment.IsCookware())
175 {
176
177 cooking_equipment.RefreshAudioVisualsOnClient(cookingMethodWithTime.param1, stateFlags.param1, is_empty, stateFlags.param2);
178 }
179
180 return 1;
181 }
void ProcessItemToCook(notnull ItemBase pItem, ItemBase cookingEquip, Param2< CookingMethodType, float > pCookingMethod, out Param2< bool, bool > pStateFlags)
Param2< CookingMethodType, float > GetCookingMethodWithTimeOverride(ItemBase cooking_equipment)
proto native int GetItemCount()
proto native EntityAI GetItem(int index)
represents base for cargo storage for entities