mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-21 07:41:22 +03:00
* Functional product * Bugfix * Handle empty case gracefully * Fix inserting bad values * First set of tests * Don't need this * Dont add empty modifers to names Signed-off-by: Connor Huffine <chuffine@gmail.com> * Typo and [SubscribeLocalEvent] Signed-off-by: Connor Huffine <chuffine@gmail.com> * Refactor GenerateUniqueName to GenerateUniqueNameModifier Signed-off-by: Connor Huffine <chuffine@gmail.com> * Fix returning name when empty Signed-off-by: Connor Huffine <chuffine@gmail.com> * Docs Signed-off-by: Connor Huffine <chuffine@gmail.com> * Tests Signed-off-by: Connor Huffine <chuffine@gmail.com> * Fix comment Signed-off-by: Connor Huffine <chuffine@gmail.com> * Fix FTL test Signed-off-by: Connor Huffine <chuffine@gmail.com> * Add adjectives Signed-off-by: Connor Huffine <chuffine@gmail.com> * Amateur hour Signed-off-by: Connor Huffine <chuffine@gmail.com> * Simplify spawning Signed-off-by: Connor Huffine <chuffine@gmail.com> * Even more streamlined Signed-off-by: Connor Huffine <chuffine@gmail.com> * Improve comment Signed-off-by: Connor Huffine <chuffine@gmail.com> * Apply suggestions from code review Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com> Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com> --------- Signed-off-by: Connor Huffine <chuffine@gmail.com> Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com> Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>
49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
using Content.Shared.Dataset;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.NameIdentifier;
|
|
|
|
[Prototype]
|
|
public sealed partial class NameIdentifierGroupPrototype : IPrototype
|
|
{
|
|
[IdDataField]
|
|
public string ID { get; private set; } = default!;
|
|
|
|
/// <summary>
|
|
/// Should the identifier become the full name, or just append?
|
|
/// </summary>
|
|
[DataField]
|
|
public bool FullName = false;
|
|
|
|
/// <summary>
|
|
/// Should the identifier be a prefix, or a suffix?
|
|
/// </summary>
|
|
[DataField]
|
|
public bool Prefix = false;
|
|
|
|
/// <summary>
|
|
/// Optional format identifier. If set, the name will be formatted using it (e.g., "MK-500").
|
|
/// If not set, only the numeric part will be used (e.g., "500").
|
|
/// </summary>
|
|
[DataField]
|
|
public LocId? Format;
|
|
|
|
/// <summary>
|
|
/// The maximal value appearing in an identifier.
|
|
/// </summary>
|
|
[DataField]
|
|
public int MaxValue = 1000;
|
|
|
|
/// <summary>
|
|
/// The minimal value appearing in an identifier.
|
|
/// </summary>
|
|
[DataField]
|
|
public int MinValue = 0;
|
|
|
|
/// <summary>
|
|
/// An optional field that will provide a list of name elements to pull from.
|
|
/// If non-null, <see cref="MinValue"/> and <see cref="MaxValue"/> will be ignored.
|
|
/// </summary>
|
|
[DataField]
|
|
public ProtoId<LocalizedDatasetPrototype>? IdentifierDataset;
|
|
}
|