Various UI warnings cleanup (#36169)

* Various UI warnings cleanup

* Revert unnecessary change

* Redoing SpriteSystem as it's non-injectable

* Missed one

* Better entity instantiation

* General cleanup of warnings changes

* Wrong class name!
This commit is contained in:
J
2025-04-10 10:47:05 +00:00
committed by GitHub
parent 48004bfad7
commit 3c307f3b36
21 changed files with 54 additions and 45 deletions

View File

@@ -21,6 +21,7 @@ using Content.Shared.Preferences.Loadouts;
using Content.Shared.Roles;
using Content.Shared.Traits;
using Robust.Client.AutoGenerated;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Client.UserInterface;
@@ -50,6 +51,8 @@ namespace Content.Client.Lobby.UI
private readonly JobRequirementsManager _requirements;
private readonly LobbyUIController _controller;
private readonly SpriteSystem _sprite;
private FlavorText.FlavorText? _flavorText;
private TextEdit? _flavorTextEdit;
@@ -127,7 +130,7 @@ namespace Content.Client.Lobby.UI
_resManager = resManager;
_requirements = requirements;
_controller = UserInterfaceManager.GetUIController<LobbyUIController>();
_sprite = _entManager.System<SpriteSystem>();
ImportButton.OnPressed += args =>
{
ImportProfile();
@@ -906,7 +909,7 @@ namespace Content.Client.Lobby.UI
VerticalAlignment = VAlignment.Center
};
var jobIcon = _prototypeManager.Index(job.Icon);
icon.Texture = jobIcon.Icon.Frame0();
icon.Texture = _sprite.Frame0(jobIcon.Icon);
selector.Setup(items, job.LocalizedName, 200, job.LocalizedDescription, icon, job.Guides);
if (!_requirements.IsAllowed(job, (HumanoidCharacterProfile?)_preferencesManager.Preferences?.SelectedCharacter, out var reason))