Merge branch 'master' into 2020-03-03-g-g-g-g-g-g-g-g-ghooooosts

This commit is contained in:
zumorica
2020-03-28 23:48:00 +01:00
52 changed files with 881 additions and 134 deletions

View File

@@ -0,0 +1,14 @@
using System;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Power
{
[Serializable, NetSerializable]
public enum LatheVisualState
{
Idle,
Producing,
InsertingMetal,
InsertingGlass
}
}

View File

@@ -6,6 +6,7 @@ namespace Content.Shared.GameObjects.Components.Power
[Serializable, NetSerializable]
public enum PowerDeviceVisuals
{
VisualState,
Powered
}
}

View File

@@ -35,12 +35,14 @@ namespace Content.Shared.GameObjects.EntitySystemMessages
{
public readonly string Text;
public readonly string Key;
public readonly string Category;
public readonly bool Available;
public VerbData(string text, string key, bool available)
public VerbData(string text, string key, string category, bool available)
{
Text = text;
Key = key;
Category = category;
Available = available;
}
}

View File

@@ -27,6 +27,13 @@ namespace Content.Shared.GameObjects
/// <returns>The text string that is shown in the right click menu for this verb.</returns>
public abstract string GetText(IEntity user, IEntity target);
/// <summary>
/// Gets the category of this verb.
/// </summary>
/// <param name="user">The entity of the user opening this menu.</param>
/// <returns>The category of this verb.</returns>
public virtual string GetCategory(IEntity user, IEntity target) => "";
/// <summary>
/// Gets the visibility level of this verb in the right click menu.
/// </summary>

View File

@@ -31,6 +31,14 @@ namespace Content.Shared.GameObjects
/// <returns>The text string that is shown in the right click menu for this verb.</returns>
public abstract string GetText(IEntity user, IComponent component);
/// <summary>
/// Gets the category of this verb.
/// </summary>
/// <param name="user">The entity of the user opening this menu.</param>
/// <param name="component">The component instance for which this verb is being loaded.</param>
/// <returns>The category of this verb.</returns>
public virtual string GetCategory(IEntity user, IComponent component) => "";
/// <summary>
/// Gets the visibility level of this verb in the right click menu.
/// </summary>
@@ -63,6 +71,14 @@ namespace Content.Shared.GameObjects
/// <returns>The text string that is shown in the right click menu for this verb.</returns>
protected abstract string GetText(IEntity user, T component);
/// <summary>
/// Gets the category of this verb.
/// </summary>
/// <param name="user">The entity of the user opening this menu.</param>
/// <param name="component">The component instance for which this verb is being loaded.</param>
/// <returns>The category of this verb.</returns>
protected virtual string GetCategory(IEntity user, T component) => "";
/// <summary>
/// Gets the visibility level of this verb in the right click menu.
/// </summary>
@@ -84,6 +100,12 @@ namespace Content.Shared.GameObjects
return GetText(user, (T) component);
}
/// <inheritdoc />
public sealed override string GetCategory(IEntity user, IComponent component)
{
return GetCategory(user, (T) component);
}
/// <inheritdoc />
public sealed override VerbVisibility GetVisibility(IEntity user, IComponent component)
{