Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Теперь то заработает?
Browse files Browse the repository at this point in the history
  • Loading branch information
Vonsant authored Apr 23, 2024
1 parent dfe6081 commit edc911f
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions Content.Server/Humanoid/Systems/HumanoidAppearanceSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,42 +151,4 @@ public void SetMarkingColor(EntityUid uid, MarkingCategories category, int index

Dirty(uid, humanoid);
}

/// <summary>
/// Takes ID of the species prototype, returns UI-friendly name of the species.
/// </summary>
public string GetSpeciesRepresentation(string speciesId)
{
if (_prototypeManager.TryIndex<SpeciesPrototype>(speciesId, out var species))
{
return Loc.GetString(species.Name);
}
else
{
return Loc.GetString("humanoid-appearance-component-unknown-species");
}
}

public string GetAgeRepresentation(string species, int age)
{
_prototypeManager.TryIndex<SpeciesPrototype>(species, out var speciesPrototype);

if (speciesPrototype == null)
{
Log.Error("Tried to get age representation of species that couldn't be indexed: " + species);
return Loc.GetString("identity-age-young");
}

if (age < speciesPrototype.YoungAge)
{
return Loc.GetString("identity-age-young");
}

if (age < speciesPrototype.OldAge)
{
return Loc.GetString("identity-age-middle-aged");
}

return Loc.GetString("identity-age-old");
}
}

0 comments on commit edc911f

Please sign in to comment.