1564 {
1565 CargoBase cargo = GetInventory().GetCargo();
1566 if (cargo)
1567 {
1569 if (item_count > 0)
1570 {
1571 int random_pick = Math.RandomInt(0, item_count);
1573 if (!item.IsExplosive())
1574 {
1575 item.AddHealth("","",damage);
1576 return true;
1577 }
1578 }
1579 }
1580 return false;
1581 }
proto native int GetItemCount()
proto native EntityAI GetItem(int index)