Files
tbd-station-14/Content.Client/Preferences/UI/HumanoidProfileEditor.Random.cs
2023-08-08 23:26:33 -07:00

26 lines
664 B
C#

using Content.Shared.Preferences;
using Robust.Shared.Prototypes;
namespace Content.Client.Preferences.UI
{
public sealed partial class HumanoidProfileEditor
{
private readonly IPrototypeManager _prototypeManager;
private void RandomizeEverything()
{
Profile = HumanoidCharacterProfile.Random();
UpdateControls();
IsDirty = true;
}
private void RandomizeName()
{
if (Profile == null) return;
var name = HumanoidCharacterProfile.GetName(Profile.Species, Profile.Gender);
SetName(name);
UpdateNameEdit();
}
}
}