Fix rsi sprite access for verbs (#14284)

This commit is contained in:
metalgearsloth
2023-02-26 18:48:57 +11:00
committed by GitHub
parent a6d0c9b129
commit 44fb8a9e2d
53 changed files with 313 additions and 271 deletions

View File

@@ -11,6 +11,7 @@ using Content.Shared.Placeable;
using Content.Shared.Storage;
using Robust.Shared.Containers;
using Robust.Shared.Random;
using Robust.Shared.Utility;
namespace Content.Server.Storage.EntitySystems
{
@@ -54,7 +55,7 @@ namespace Content.Server.Storage.EntitySystems
StartDoAfter(uid, null, args.User, dumpable);//Had multiplier of 0.6f
},
Text = Loc.GetString("dump-verb-name"),
IconTexture = "/Textures/Interface/VerbIcons/drop.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/drop.svg.192dpi.png")),
};
args.Verbs.Add(verb);
}

View File

@@ -117,12 +117,14 @@ namespace Content.Server.Storage.EntitySystems
if (component.Open)
{
verb.Text = Loc.GetString("verb-common-close");
verb.IconTexture = "/Textures/Interface/VerbIcons/close.svg.192dpi.png";
verb.Icon = new SpriteSpecifier.Texture(
new ResourcePath("/Textures/Interface/VerbIcons/close.svg.192dpi.png"));
}
else
{
verb.Text = Loc.GetString("verb-common-open");
verb.IconTexture = "/Textures/Interface/VerbIcons/open.svg.192dpi.png";
verb.Icon = new SpriteSpecifier.Texture(
new ResourcePath("/Textures/Interface/VerbIcons/open.svg.192dpi.png"));
}
verb.Act = () => _entityStorage.ToggleOpen(args.User, args.Target, component);
args.Verbs.Add(verb);
@@ -147,12 +149,14 @@ namespace Content.Server.Storage.EntitySystems
if (uiOpen)
{
verb.Text = Loc.GetString("verb-common-close-ui");
verb.IconTexture = "/Textures/Interface/VerbIcons/close.svg.192dpi.png";
verb.Icon = new SpriteSpecifier.Texture(
new ResourcePath("/Textures/Interface/VerbIcons/close.svg.192dpi.png"));
}
else
{
verb.Text = Loc.GetString("verb-common-open-ui");
verb.IconTexture = "/Textures/Interface/VerbIcons/open.svg.192dpi.png";
verb.Icon = new SpriteSpecifier.Texture(
new ResourcePath("/Textures/Interface/VerbIcons/open.svg.192dpi.png"));
}
args.Verbs.Add(verb);
}