Infinite lathe fix again (#12384)
* lathe fix again fuck me i need to test shit more * Whitespace
This commit is contained in:
@@ -51,10 +51,10 @@ public abstract class SharedLatheSystem : EntitySystem
|
|||||||
foreach (var (material, needed) in recipe.RequiredMaterials)
|
foreach (var (material, needed) in recipe.RequiredMaterials)
|
||||||
{
|
{
|
||||||
var adjustedAmount = recipe.ApplyMaterialDiscount
|
var adjustedAmount = recipe.ApplyMaterialDiscount
|
||||||
? (int) (amount * component.MaterialUseMultiplier)
|
? (int) (needed * component.MaterialUseMultiplier)
|
||||||
: amount;
|
: needed;
|
||||||
|
|
||||||
if (_materialStorage.GetMaterialAmount(component.Owner, material) < adjustedAmount * needed)
|
if (_materialStorage.GetMaterialAmount(component.Owner, material) < adjustedAmount * amount)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user