Removed LocalizationManager dependencies (#2059)

* Removed LocalizationManager dependencies

* Fixed error

Co-authored-by: David Tan <>
This commit is contained in:
DTanxxx
2020-09-17 09:55:50 +12:00
committed by GitHub
parent 6b4fbc211f
commit 27a5a7a09c
19 changed files with 99 additions and 130 deletions

View File

@@ -14,7 +14,6 @@ namespace Content.Client.GameObjects.Components.Actor
[RegisterComponent]
public sealed class CharacterInfoComponent : Component, ICharacterUI
{
[Dependency] private readonly ILocalizationManager _loc = default!;
[Dependency] private readonly IResourceCache _resourceCache = default!;
private CharacterInfoControl _control;
@@ -28,7 +27,7 @@ namespace Content.Client.GameObjects.Components.Actor
{
base.OnAdd();
Scene = _control = new CharacterInfoControl(_resourceCache, _loc);
Scene = _control = new CharacterInfoControl(_resourceCache);
}
public override void Initialize()
@@ -42,7 +41,7 @@ namespace Content.Client.GameObjects.Components.Actor
_control.NameLabel.Text = Owner.Name;
// ReSharper disable once StringLiteralTypo
_control.SubText.Text = _loc.GetString("Professional Greyshirt");
_control.SubText.Text = Loc.GetString("Professional Greyshirt");
}
private sealed class CharacterInfoControl : VBoxContainer
@@ -51,7 +50,7 @@ namespace Content.Client.GameObjects.Components.Actor
public Label NameLabel { get; }
public Label SubText { get; }
public CharacterInfoControl(IResourceCache resourceCache, ILocalizationManager loc)
public CharacterInfoControl(IResourceCache resourceCache)
{
AddChild(new HBoxContainer
{
@@ -76,17 +75,17 @@ namespace Content.Client.GameObjects.Components.Actor
AddChild(new Placeholder(resourceCache)
{
PlaceholderText = loc.GetString("Health & status effects")
PlaceholderText = Loc.GetString("Health & status effects")
});
AddChild(new Placeholder(resourceCache)
{
PlaceholderText = loc.GetString("Objectives")
PlaceholderText = Loc.GetString("Objectives")
});
AddChild(new Placeholder(resourceCache)
{
PlaceholderText = loc.GetString("Antagonist Roles")
PlaceholderText = Loc.GetString("Antagonist Roles")
});
}
}