show non-sheet material units in lathe (#19896)

* locale for material units

* use material units in lathe ui

* give units to non-sheet materials

* :trollface:

* use volume properly

* :trollface:

* review

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-09-08 03:11:10 +01:00
committed by GitHub
parent 1c6d723515
commit db2a4478b0
8 changed files with 81 additions and 28 deletions

View File

@@ -33,7 +33,15 @@ namespace Content.Shared.Materials
public string? StackEntity;
[DataField("name")]
public string Name = "";
public string Name = string.Empty;
/// <summary>
/// Locale id for the unit of this material.
/// Lathe recipe tooltips and material storage display use this to let you change a material to sound nicer.
/// For example, 5 bars of gold is better than 5 sheets of gold.
/// </summary>
[DataField("unit")]
public string Unit = "materials-unit-sheet";
[DataField("color")]
public Color Color { get; private set; } = Color.Gray;