fix infinite lathe printing bug (#12343)

This commit is contained in:
Nemanja
2022-11-01 19:05:00 -04:00
committed by GitHub
parent 9d8f19a442
commit 6fd083af0b
6 changed files with 24 additions and 7 deletions

View File

@@ -122,7 +122,11 @@ public sealed partial class LatheMenu : DefaultWindow
else
sb.Append('\n');
sb.Append((int) (amount * component.MaterialUseMultiplier));
var adjustedAmount = amount;
if (prototype.ApplyMaterialDiscount)
adjustedAmount = (int) (adjustedAmount * component.MaterialUseMultiplier);
sb.Append(adjustedAmount);
sb.Append(' ');
sb.Append(proto.Name);
}