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

◆ GetItemTypeFromCargo()

ItemBase GetItemTypeFromCargo ( typename item_type ,
ItemBase cooking_equipment )
protected

Cooking data.

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

411 {
412 CargoBase cargo = cooking_equipment.GetInventory().GetCargo();
413 if (cargo)
414 {
415 for (int i = 0; i < cargo.GetItemCount(); i++)
416 {
417 EntityAI entity = cargo.GetItem(i);
418 if (entity.Type() == item_type)
419 {
420 ItemBase item = ItemBase.Cast(entity);
421
422 return item;
423 }
424 }
425 }
426
427 return null;
428 }
proto native int GetItemCount()
proto native EntityAI GetItem(int index)
represents base for cargo storage for entities
Определения Cargo.c:7
Определения Building.c:6
Определения InventoryItem.c:731

Перекрестные ссылки CargoBase::GetItem() и CargoBase::GetItemCount().

Используется в GetCookingMethod(), GetCookingMethodWithTimeOverride() и UpdateCookingState().