Construction warning cleanup (#12256)

This commit is contained in:
Nemanja
2022-10-30 02:48:53 -04:00
committed by GitHub
parent 1a6d084c4d
commit b6135d3be5
47 changed files with 166 additions and 146 deletions

View File

@@ -5,11 +5,14 @@ using Content.Shared.Construction.Steps;
using Content.Shared.Examine;
using Content.Shared.Popups;
using Content.Shared.Verbs;
using Robust.Shared.Player;
namespace Content.Server.Construction
{
public sealed partial class ConstructionSystem
{
[Dependency] private readonly SharedPopupSystem _popup = default!;
private readonly Dictionary<ConstructionPrototype, ConstructionGuide> _guideCache = new();
private void InitializeGuided()
@@ -49,11 +52,11 @@ namespace Content.Server.Construction
if (component.TargetNode == null)
{
// Maybe check, but on the flip-side a better solution might be to not make it undeconstructible in the first place, no?
component.Owner.PopupMessage(args.User, Loc.GetString("deconstructible-verb-activate-no-target-text"));
_popup.PopupEntity(Loc.GetString("deconstructible-verb-activate-no-target-text"), uid, Filter.Entities(uid));
}
else
{
component.Owner.PopupMessage(args.User, Loc.GetString("deconstructible-verb-activate-text"));
_popup.PopupEntity(Loc.GetString("deconstructible-verb-activate-text"), args.User, Filter.Entities(args.User));
}
};
@@ -94,7 +97,6 @@ namespace Content.Server.Construction
if (!preventStepExamine && component.StepIndex < edge.Steps.Count)
edge.Steps[component.StepIndex].DoExamine(args);
return;
}
}