* Adds stack splitting * Apply suggestions from code review Co-authored-by: ike709 <ike709@github.com> Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
58 lines
2.2 KiB
C#
58 lines
2.2 KiB
C#
using Robust.Shared.Localization;
|
|
using Robust.Shared.Serialization;
|
|
using Robust.Shared.Utility;
|
|
using System;
|
|
|
|
namespace Content.Shared.Verbs
|
|
{
|
|
/// <summary>
|
|
/// Contains combined name and icon information for a verb category.
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public class VerbCategory
|
|
{
|
|
public readonly string Text;
|
|
|
|
public readonly SpriteSpecifier? Icon;
|
|
|
|
/// <summary>
|
|
/// If true, this verb category is shown in the context menu as a row of icons without any text.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// For example, the 'Rotate' category simply shows two icons for rotating left and right.
|
|
/// </remarks>
|
|
public readonly bool IconsOnly;
|
|
|
|
public VerbCategory(string text, string? icon, bool iconsOnly = false)
|
|
{
|
|
Text = Loc.GetString(text);
|
|
Icon = icon == null ? null : new SpriteSpecifier.Texture(new ResourcePath(icon));
|
|
IconsOnly = iconsOnly;
|
|
}
|
|
|
|
public static readonly VerbCategory Debug =
|
|
new("verb-categories-debug", "/Textures/Interface/VerbIcons/debug.svg.192dpi.png");
|
|
|
|
public static readonly VerbCategory Eject =
|
|
new("verb-categories-eject", "/Textures/Interface/VerbIcons/eject.svg.192dpi.png");
|
|
|
|
public static readonly VerbCategory Insert =
|
|
new("verb-categories-insert", "/Textures/Interface/VerbIcons/insert.svg.192dpi.png");
|
|
|
|
public static readonly VerbCategory Buckle =
|
|
new("verb-categories-buckle", "/Textures/Interface/VerbIcons/buckle.svg.192dpi.png");
|
|
|
|
public static readonly VerbCategory Unbuckle =
|
|
new("verb-categories-unbuckle", "/Textures/Interface/VerbIcons/unbuckle.svg.192dpi.png");
|
|
|
|
public static readonly VerbCategory Rotate =
|
|
new("verb-categories-rotate", "/Textures/Interface/VerbIcons/refresh.svg.192dpi.png", iconsOnly: true);
|
|
|
|
public static readonly VerbCategory SetTransferAmount =
|
|
new("verb-categories-transfer", "/Textures/Interface/VerbIcons/spill.svg.192dpi.png");
|
|
|
|
public static readonly VerbCategory Split =
|
|
new("verb-categories-split", null);
|
|
}
|
|
}
|