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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user