Infinite lathe fix again (#12384)

* lathe fix again

fuck me i need to test shit more

* Whitespace
This commit is contained in:
Nemanja
2022-11-04 15:13:07 -04:00
committed by GitHub
parent f5e3b463a4
commit ac838025f0

View File

@@ -51,10 +51,10 @@ public abstract class SharedLatheSystem : EntitySystem
foreach (var (material, needed) in recipe.RequiredMaterials)
{
var adjustedAmount = recipe.ApplyMaterialDiscount
? (int) (amount * component.MaterialUseMultiplier)
: amount;
? (int) (needed * component.MaterialUseMultiplier)
: needed;
if (_materialStorage.GetMaterialAmount(component.Owner, material) < adjustedAmount * needed)
if (_materialStorage.GetMaterialAmount(component.Owner, material) < adjustedAmount * amount)
return false;
}
return true;