Connect movement speed modifiers
This commit is contained in:
@@ -33,6 +33,16 @@ int32 UAgrarianInventoryComponent::GetItemCount(FName ItemId) const
|
||||
return Count;
|
||||
}
|
||||
|
||||
float UAgrarianInventoryComponent::GetTotalWeight() const
|
||||
{
|
||||
float TotalWeight = 0.0f;
|
||||
for (const FAgrarianItemStack& Stack : Items)
|
||||
{
|
||||
TotalWeight += FMath::Max(0.0f, Stack.UnitWeight) * FMath::Max(0, Stack.Quantity);
|
||||
}
|
||||
return TotalWeight;
|
||||
}
|
||||
|
||||
bool UAgrarianInventoryComponent::AddItem(const FAgrarianItemStack& Stack)
|
||||
{
|
||||
if (!GetOwner() || !GetOwner()->HasAuthority() || !Stack.IsValidStack())
|
||||
|
||||
Reference in New Issue
Block a user