mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-21 15:51:23 +03:00
35 lines
804 B
C#
35 lines
804 B
C#
using System.Linq;
|
|
using System.Text.Json.Serialization;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server.GuideGenerator;
|
|
|
|
public sealed class EntityEntry
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public string Id { get; }
|
|
|
|
[JsonPropertyName("name")]
|
|
public string Name { get; }
|
|
|
|
[JsonPropertyName("desc")]
|
|
public string Description { get; }
|
|
|
|
public EntityEntry(EntityPrototype proto)
|
|
{
|
|
Id = proto.ID;
|
|
if (proto.Name.Length > 1)
|
|
{
|
|
Name = char.ToUpper(proto.Name[0]) + proto.Name.Remove(0, 1);
|
|
}
|
|
else if (proto.Name.Length == 1)
|
|
{
|
|
Name = char.ToUpper(proto.Name[0]).ToString(); // xD
|
|
}
|
|
else
|
|
{
|
|
Name = proto.Name;
|
|
}
|
|
Description = proto.Description;
|
|
}
|
|
}
|