lathe recipes no longer specify textures (#12944)
Co-authored-by: Moony <moony@hellomouse.net>
This commit is contained in:
@@ -17,14 +17,20 @@ namespace Content.Shared.Research.Prototypes
|
||||
[DataField("name")]
|
||||
private string _name = string.Empty;
|
||||
|
||||
[DataField("icon")]
|
||||
private SpriteSpecifier _icon = SpriteSpecifier.Invalid;
|
||||
|
||||
[DataField("description")]
|
||||
private string _description = string.Empty;
|
||||
|
||||
[DataField("result", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
private string _result = string.Empty;
|
||||
/// <summary>
|
||||
/// The prototype name of the resulting entity when the recipe is printed.
|
||||
/// </summary>
|
||||
[DataField("result", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string Result = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// An entity whose sprite is displayed in the ui in place of the actual recipe result.
|
||||
/// </summary>
|
||||
[DataField("icon")]
|
||||
public SpriteSpecifier? Icon;
|
||||
|
||||
[DataField("completetime")]
|
||||
private TimeSpan _completeTime = TimeSpan.FromSeconds(5);
|
||||
@@ -42,7 +48,7 @@ namespace Content.Shared.Research.Prototypes
|
||||
{
|
||||
if (_name.Trim().Length != 0) return _name;
|
||||
var protoMan = IoCManager.Resolve<IPrototypeManager>();
|
||||
protoMan.TryIndex(_result, out EntityPrototype? prototype);
|
||||
protoMan.TryIndex(Result, out EntityPrototype? prototype);
|
||||
if (prototype?.Name != null)
|
||||
_name = prototype.Name;
|
||||
return _name;
|
||||
@@ -59,25 +65,13 @@ namespace Content.Shared.Research.Prototypes
|
||||
{
|
||||
if (_description.Trim().Length != 0) return _description;
|
||||
var protoMan = IoCManager.Resolve<IPrototypeManager>();
|
||||
protoMan.TryIndex(_result, out EntityPrototype? prototype);
|
||||
protoMan.TryIndex(Result, out EntityPrototype? prototype);
|
||||
if (prototype?.Description != null)
|
||||
_description = prototype.Description;
|
||||
return _description;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Texture path used in the lathe GUI.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public SpriteSpecifier Icon => _icon;
|
||||
|
||||
/// <summary>
|
||||
/// The prototype name of the resulting entity when the recipe is printed.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public string Result => _result;
|
||||
|
||||
/// <summary>
|
||||
/// The materials required to produce this recipe.
|
||||
/// Takes a material ID as string.
|
||||
|
||||
Reference in New Issue
Block a user