Localize diseases (#11916)

This commit is contained in:
Morb
2022-10-15 07:18:33 +03:00
committed by GitHub
parent 51acdefa4d
commit e397707cc7
5 changed files with 44 additions and 17 deletions

View File

@@ -11,12 +11,18 @@ namespace Content.Shared.Disease
[DataDefinition]
public sealed class DiseasePrototype : IPrototype, IInheritingPrototype
{
private string _name = string.Empty;
[ViewVariables]
[IdDataFieldAttribute]
public string ID { get; } = default!;
[DataField("name")]
public string Name { get; } = string.Empty;
public string Name
{
get => _name;
private set => _name = Loc.GetString(value);
}
[ParentDataFieldAttribute(typeof(AbstractPrototypeIdArraySerializer<DiseasePrototype>))]
public string[]? Parents { get; private set; }