This commit is contained in:
Leon Friedrich
2022-03-17 20:13:31 +13:00
committed by GitHub
parent 7b84362901
commit bfd95c493b
94 changed files with 1454 additions and 2185 deletions

View File

@@ -152,15 +152,10 @@ public sealed partial class GunSystem
return false;
}
if (TryComp(ammo, out ItemComponent? item))
if (!_handsSystem.TryPickup(user, ammo, handsComp: handsComponent))
{
if (!handsComponent.CanPutInHand(item))
{
TryInsertAmmo(user, ammo, ammoBox);
return false;
}
handsComponent.PutInHand(item);
TryInsertAmmo(user, ammo, ammoBox);
return false;
}
UpdateAmmoBoxAppearance(ammoBox.Owner, ammoBox);