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

@@ -2,6 +2,7 @@ using System.Linq;
using Content.Client.Stylesheets;
using Content.Shared.Decals;
using Robust.Client.AutoGenerated;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
@@ -19,6 +20,7 @@ public sealed partial class DecalPlacerWindow : DefaultWindow
[Dependency] private readonly IEntityManager _e = default!;
private readonly DecalPlacementSystem _decalPlacementSystem;
private readonly SpriteSystem _sprite;
public FloatSpinBox RotationSpinBox;
@@ -41,6 +43,7 @@ public sealed partial class DecalPlacerWindow : DefaultWindow
IoCManager.InjectDependencies(this);
_decalPlacementSystem = _e.System<DecalPlacementSystem>();
_sprite = _e.System<SpriteSystem>();
// This needs to be done in C# so we can have custom stuff passed in the constructor
// and thus have a proper step size
@@ -204,7 +207,7 @@ public sealed partial class DecalPlacerWindow : DefaultWindow
foreach (var decalPrototype in prototypes)
{
if (decalPrototype.ShowMenu)
_decals.Add(decalPrototype.ID, decalPrototype.Sprite.Frame0());
_decals.Add(decalPrototype.ID, _sprite.Frame0(decalPrototype.Sprite));
}
RefreshList();