public float getInventoryWeight()
{
float answer = 0.0f;
//Get the weight of all the equipment slots
for (int i = 0; i <= 10; i++)
{
ObjectInteraction objItem = GetObjectIntAtSlot(i);
if (objItem != null)
{
answer += objItem.GetWeight();
}
}
//Get the weight of the gronk container as that is alway the top level of the inventory
for (short i = 0; i <= playerContainer.MaxCapacity(); i++)
{
ObjectInteraction objItem = playerContainer.GetItemAt(i); //GameObject.Find (playerContainer.GetItemAt(i));
if (objItem != null)
{
answer += objItem.GetWeight();
}
else
{
answer += 0;
}
}
return(answer);
}