Fix rsi sprite access for verbs (#14284)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Content.Shared.Verbs;
|
||||
using Robust.Client.Console;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Client.Administration.Systems
|
||||
{
|
||||
@@ -26,7 +27,7 @@ namespace Content.Client.Administration.Systems
|
||||
Verb verb = new();
|
||||
verb.Category = VerbCategory.Debug;
|
||||
verb.Text = "View Variables";
|
||||
verb.IconTexture = "/Textures/Interface/VerbIcons/vv.svg.192dpi.png";
|
||||
verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/vv.svg.192dpi.png"));
|
||||
verb.Act = () => _clientConsoleHost.ExecuteCommand($"vv {args.Target}");
|
||||
verb.ClientExclusive = true; // opening VV window is client-side. Don't ask server to run this verb.
|
||||
args.Verbs.Add(verb);
|
||||
|
||||
@@ -49,11 +49,9 @@ public sealed class ExamineButton : ContainerButton
|
||||
SetHeight = ElementHeight
|
||||
};
|
||||
|
||||
if (verb.IconTexture != null)
|
||||
if (verb.Icon != null)
|
||||
{
|
||||
var icon = new SpriteSpecifier.Texture(new ResourcePath(verb.IconTexture));
|
||||
|
||||
Icon.Texture = icon.Frame0();
|
||||
Icon.Texture = verb.Icon.Frame0();
|
||||
Icon.Stretch = TextureRect.StretchMode.KeepAspectCentered;
|
||||
|
||||
AddChild(Icon);
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Content.Client.Examine
|
||||
CommandBinds.Builder
|
||||
.Bind(ContentKeyFunctions.ExamineEntity, new PointerInputCmdHandler(HandleExamine, outsidePrediction: true))
|
||||
.Register<ExamineSystem>();
|
||||
|
||||
|
||||
_idCounter = 0;
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace Content.Client.Examine
|
||||
// Center it on the entity if they use the verb instead.
|
||||
verb.Act = () => DoExamine(args.Target, false);
|
||||
verb.Text = Loc.GetString("examine-verb-name");
|
||||
verb.IconTexture = "/Textures/Interface/VerbIcons/examine.svg.192dpi.png";
|
||||
verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/examine.svg.192dpi.png"));
|
||||
verb.ShowOnExamineTooltip = false;
|
||||
verb.ClientExclusive = true;
|
||||
args.Verbs.Add(verb);
|
||||
@@ -132,7 +132,7 @@ namespace Content.Client.Examine
|
||||
// Prevent updating a new tooltip.
|
||||
if (ev.Id != 0 && ev.Id != _idCounter)
|
||||
return;
|
||||
|
||||
|
||||
// Tooltips coming in from the server generally prioritize
|
||||
// opening at the old tooltip rather than the cursor/another entity,
|
||||
// since there's probably one open already if it's coming in from the server.
|
||||
@@ -286,7 +286,7 @@ namespace Content.Client.Examine
|
||||
if (verb is not ExamineVerb examine)
|
||||
continue;
|
||||
|
||||
if (examine.IconTexture == null)
|
||||
if (examine.Icon == null)
|
||||
continue;
|
||||
|
||||
if (!examine.ShowOnExamineTooltip)
|
||||
|
||||
@@ -14,6 +14,7 @@ using Robust.Shared.Input;
|
||||
using Robust.Shared.Input.Binding;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Client.Guidebook;
|
||||
|
||||
@@ -56,7 +57,7 @@ public sealed class GuidebookSystem : EntitySystem
|
||||
args.Verbs.Add(new()
|
||||
{
|
||||
Text = Loc.GetString("guide-help-verb"),
|
||||
IconTexture = "/Textures/Interface/VerbIcons/information.svg.192dpi.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/information.svg.192dpi.png")),
|
||||
Act = () => OpenGuidebook(component.Guides, includeChildren: component.IncludeChildren, selected: component.Guides[0]),
|
||||
ClientExclusive = true,
|
||||
CloseMenu = true
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Pointing;
|
||||
using Content.Shared.Verbs;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.Utility;
|
||||
using DrawDepth = Content.Shared.DrawDepth.DrawDepth;
|
||||
|
||||
namespace Content.Client.Pointing;
|
||||
@@ -54,7 +55,7 @@ public sealed class PointingSystem : SharedPointingSystem
|
||||
Verb verb = new()
|
||||
{
|
||||
Text = Loc.GetString("pointing-verb-get-data-text"),
|
||||
IconTexture = "/Textures/Interface/VerbIcons/point.svg.192dpi.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/point.svg.192dpi.png")),
|
||||
ClientExclusive = true,
|
||||
Act = () => RaiseNetworkEvent(new PointingAttemptEvent(args.Target))
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user