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

◆ ProcessItemHierarchyRecursive()

void ProcessItemHierarchyRecursive ( ItemBase item,
float heatPermeabilityCoef = 1.0 )
protected

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

1262 {
1263 float heatPermCoef = heatPermeabilityCoef;
1264
1265 // go through any attachments and cargo, recursive
1266 int inventoryAttCount = item.GetInventory().AttachmentCount();
1267 if (inventoryAttCount > 0)
1268 {
1269 ItemBase attachmentItem;
1270 for (int inAttIdx = 0; inAttIdx < inventoryAttCount; ++inAttIdx)
1271 {
1272 if (Class.CastTo(attachmentItem,item.GetInventory().GetAttachmentFromIndex(inAttIdx)))
1273 {
1274 heatPermCoef = heatPermeabilityCoef;
1275 heatPermCoef *= attachmentItem.GetHeatPermeabilityCoef();
1276
1277 if (attachmentItem.CanHaveTemperature() && !attachmentItem.IsSelfAdjustingTemperature())
1278 {
1279 SetProcessedItemTemperature(attachmentItem,heatPermCoef);
1280 }
1281
1282 ProcessItemHierarchyRecursive(attachmentItem,heatPermCoef);
1283 }
1284 }
1285 }
1286
1287 if (item.GetInventory().GetCargo())
1288 {
1289 int inventoryItemCount = item.GetInventory().GetCargo().GetItemCount();
1290 if (inventoryItemCount > 0)
1291 {
1292 ItemBase inventoryItem;
1293 for (int j = 0; j < inventoryItemCount; ++j)
1294 {
1295 if (Class.CastTo(inventoryItem,item.GetInventory().GetCargo().GetItem(j)))
1296 {
1297 heatPermCoef = heatPermeabilityCoef;
1298 heatPermCoef *= inventoryItem.GetHeatPermeabilityCoef();
1299
1300 if (inventoryItem.CanHaveTemperature() && !inventoryItem.IsSelfAdjustingTemperature())
1301 {
1302 SetProcessedItemTemperature(inventoryItem,heatPermCoef);
1303 }
1304
1305 ProcessItemHierarchyRecursive(inventoryItem,heatPermCoef);
1306 }
1307 }
1308 }
1309 }
1310 }
void SetProcessedItemTemperature(ItemBase item, float heatPermeabilityCoef=1.0)
Определения Environment.c:1312
void ProcessItemHierarchyRecursive(ItemBase item, float heatPermeabilityCoef=1.0)
Определения Environment.c:1261
Super root of all classes in Enforce script.
Определения EnScript.c:11
override bool IsSelfAdjustingTemperature()
Определения PortableGasStove.c:287
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo(), ItemBase::IsSelfAdjustingTemperature(), ProcessItemHierarchyRecursive() и SetProcessedItemTemperature().

Используется в ProcessItemHierarchyRecursive(), ProcessItemsInHandsTemperature() и ProcessItemsTemperature().