DIFF

class CargoListSourceSource

CargoList CargoBase Managed

All members, including inherited

Methods 6

proto native int GetMaxWeight()

Returns: maximum weight that the cargo can hold

proto native int GetTotalWeight(EntityAI item)

sums weight of all items in cargo and adds weight of item if item != null

Returns: sum of weights plus weight of item (if !null)

proto native bool CanFitItemIntoCargo(EntityAI cargo)

Returns: true if adding item does not exceed GetMaxWeight, false otherwise

override bool CanReceiveItemIntoCargo(EntityAI item)

Returns: true if adding item does not exceed GetMaxWeight, false otherwise

proto native bool CanFitSwappedItemInCargo(EntityAI child_entity, EntityAI new_entity)

Returns: true if swapping item does not exceed GetMaxWeight, false otherwise

Referenced by CanSwapItemInCargo()
override bool CanSwapItemInCargo(EntityAI child_entity, EntityAI new_entity)