]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Examine warnings cleanup (#36162)
authorJ <billsmith116@gmail.com>
Sun, 30 Mar 2025 12:06:43 +0000 (12:06 +0000)
committerGitHub <noreply@github.com>
Sun, 30 Mar 2025 12:06:43 +0000 (14:06 +0200)
* Examine warnings cleanup

* Revert unnecessary change

* SpriteSystem naming conventions

Content.Client/Examine/ExamineButton.cs
Content.Client/Examine/ExamineSystem.cs

index 839e08f3d4602eaba57009109c64056c3d0c542e..3d5ac211e409cd0a6e761ac9492b2130e858517f 100644 (file)
@@ -1,11 +1,7 @@
-using Content.Client.ContextMenu.UI;
-using Content.Client.Stylesheets;
 using Content.Shared.Verbs;
-using Robust.Client.AutoGenerated;
-using Robust.Client.Graphics;
+using Robust.Client.GameObjects;
 using Robust.Client.UserInterface.Controls;
 using Robust.Client.UserInterface.CustomControls;
-using Robust.Client.UserInterface.XAML;
 using Robust.Client.Utility;
 using Robust.Shared.Utility;
 
@@ -27,14 +23,16 @@ public sealed class ExamineButton : ContainerButton
     public TextureRect Icon;
 
     public ExamineVerb Verb;
+    private SpriteSystem _sprite;
 
-    public ExamineButton(ExamineVerb verb)
+    public ExamineButton(ExamineVerb verb, SpriteSystem spriteSystem)
     {
         Margin = new Thickness(Thickness, Thickness, Thickness, Thickness);
 
         SetOnlyStyleClass(StyleClassExamineButton);
 
         Verb = verb;
+        _sprite = spriteSystem;
 
         if (verb.Disabled)
         {
@@ -61,7 +59,7 @@ public sealed class ExamineButton : ContainerButton
 
         if (verb.Icon != null)
         {
-            Icon.Texture = verb.Icon.Frame0();
+            Icon.Texture = _sprite.Frame0(verb.Icon);
             Icon.Stretch = TextureRect.StretchMode.KeepAspectCentered;
 
             AddChild(Icon);
index 07694ac24a323cda4b8d146569968dc6a97182d9..2e8d95c9788915195249a3054f61ef2026c04db3 100644 (file)
@@ -30,6 +30,7 @@ namespace Content.Client.Examine
         [Dependency] private readonly IPlayerManager _playerManager = default!;
         [Dependency] private readonly IEyeManager _eyeManager = default!;
         [Dependency] private readonly VerbSystem _verbSystem = default!;
+        [Dependency] private readonly SpriteSystem _sprite = default!;
 
         public const string StyleClassEntityTooltip = "entity-tooltip";
 
@@ -332,7 +333,7 @@ namespace Content.Client.Examine
                 if (!examine.ShowOnExamineTooltip)
                     continue;
 
-                var button = new ExamineButton(examine);
+                var button = new ExamineButton(examine, _sprite);
 
                 if (examine.HoverVerb)
                 {