Fix secfab being able to print protolathe items (#17443)

This commit is contained in:
Nemanja
2023-06-18 18:35:19 -04:00
committed by GitHub
parent c6cc55f4d9
commit 8411739e00
5 changed files with 78 additions and 102 deletions

View File

@@ -1,4 +1,5 @@
using System.Text;
using System.Linq;
using System.Text;
using Content.Shared.Lathe;
using Content.Shared.Materials;
using Content.Shared.Research.Prototypes;
@@ -53,7 +54,7 @@ public sealed partial class LatheMenu : DefaultWindow
if (_entityManager.TryGetComponent<LatheComponent>(owner.Lathe, out var latheComponent))
{
if (latheComponent.DynamicRecipes == null)
if (!latheComponent.DynamicRecipes.Any())
{
ServerListButton.Visible = false;
ServerSyncButton.Visible = false;
@@ -132,7 +133,7 @@ public sealed partial class LatheMenu : DefaultWindow
sb.Append('\n');
var adjustedAmount = SharedLatheSystem.AdjustMaterial(amount, prototype.ApplyMaterialDiscount, component.MaterialUseMultiplier);
sb.Append(adjustedAmount);
sb.Append(' ');
sb.Append(Loc.GetString(proto.Name));