using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Utility;
namespace Content.Shared.GameObjects
{
///
/// Stores visual data for a verb.
///
///
/// An instance of this class gets instantiated by the verb system and should be filled in by implementations of
/// .
///
public sealed class VerbData
{
///
/// The text that the user sees on the verb button.
///
public string Text { get; set; }
///
/// Sprite of the icon that the user sees on the verb button.
///
public SpriteSpecifier Icon { get; set; }
///
/// Name of the category this button is under.
///
public string Category { get; set; } = "";
///
/// Sprite of the icon that the user sees on the verb button.
///
public SpriteSpecifier CategoryIcon { get; set; }
///
/// Whether this verb is visible, disabled (greyed out) or hidden.
///
public VerbVisibility Visibility { get; set; } = VerbVisibility.Visible;
public bool IsInvisible => Visibility == VerbVisibility.Invisible;
public bool IsDisabled => Visibility == VerbVisibility.Disabled;
///
/// Convenience property to set verb category and icon at once.
///
[ValueProvider("Content.Shared.GameObjects.VerbCategories")]
public VerbCategoryData CategoryData
{
set
{
Category = value.Name;
CategoryIcon = value.Icon;
}
}
///
/// Convenience property to set to a raw texture path.
///
public string IconTexture
{
set => Icon = new SpriteSpecifier.Texture(new ResourcePath(value));
}
}
}