Remove localization manager dependencies from components (#1864)

Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
This commit is contained in:
DrSmugleaf
2020-08-23 12:53:09 +02:00
committed by GitHub
parent 0b4ca168d4
commit a4a25a9975
22 changed files with 73 additions and 117 deletions

View File

@@ -2,7 +2,6 @@
using Content.Shared.Construction;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Map;
using Robust.Shared.Maths;
@@ -13,9 +12,6 @@ namespace Content.Shared.GameObjects.EntitySystems
{
public class SharedConstructionSystem : EntitySystem
{
#pragma warning disable 649
[Dependency] private readonly ILocalizationManager _loc;
#pragma warning restore 649
/// <summary>
/// Sent client -> server to to tell the server that we started building
/// a structure-construction.
@@ -90,7 +86,7 @@ namespace Content.Shared.GameObjects.EntitySystems
if (curStage.Backward != null && curStage.Backward is ConstructionStepTool)
{
var backward = (ConstructionStepTool) curStage.Backward;
message.AddText(_loc.GetString("To deconstruct: {0}x {1} Tool", backward.Amount, backward.ToolQuality));
message.AddText(Loc.GetString("To deconstruct: {0}x {1} Tool", backward.Amount, backward.ToolQuality));
}
if (curStage.Forward != null && curStage.Forward is ConstructionStepMaterial)
{
@@ -99,7 +95,7 @@ namespace Content.Shared.GameObjects.EntitySystems
message.AddText("\n");
}
var forward = (ConstructionStepMaterial) curStage.Forward;
message.AddText(_loc.GetString("To construct: {0}x {1}", forward.Amount, forward.Material));
message.AddText(Loc.GetString("To construct: {0}x {1}", forward.Amount, forward.Material));
}
}
}