Merge branch 'master' into 2020-03-03-g-g-g-g-g-g-g-g-ghooooosts
This commit is contained in:
@@ -21,6 +21,7 @@ namespace Content.Shared.Construction
|
||||
private string _id;
|
||||
private string _result;
|
||||
private string _placementMode;
|
||||
private bool _canBuildInImpassable;
|
||||
|
||||
/// <summary>
|
||||
/// Friendly name displayed in the construction GUI.
|
||||
@@ -37,6 +38,11 @@ namespace Content.Shared.Construction
|
||||
/// </summary>
|
||||
public SpriteSpecifier Icon => _icon;
|
||||
|
||||
/// <summary>
|
||||
/// If you can start building or complete steps on impassable terrain.
|
||||
/// </summary>
|
||||
public bool CanBuildInImpassable => _canBuildInImpassable;
|
||||
|
||||
/// <summary>
|
||||
/// A list of keywords that are used for searching.
|
||||
/// </summary>
|
||||
@@ -81,6 +87,7 @@ namespace Content.Shared.Construction
|
||||
ser.DataField(ref _type, "objecttype", ConstructionType.Structure);
|
||||
ser.DataField(ref _result, "result", null);
|
||||
ser.DataField(ref _placementMode, "placementmode", "PlaceFree");
|
||||
ser.DataField(ref _canBuildInImpassable, "canbuildinimpassable", false);
|
||||
|
||||
_keywords = ser.ReadDataField<List<string>>("keywords", new List<string>());
|
||||
{
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ namespace Content.Shared.GameObjects.Components.Power
|
||||
[Serializable, NetSerializable]
|
||||
public enum PowerDeviceVisuals
|
||||
{
|
||||
VisualState,
|
||||
Powered
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user