Re-organize all projects (#4166)

This commit is contained in:
DrSmugleaf
2021-06-09 22:19:39 +02:00
committed by GitHub
parent 9f50e4061b
commit ff1a2d97ea
1773 changed files with 5258 additions and 5508 deletions

View File

@@ -0,0 +1,36 @@
using Content.Shared.CharacterAppearance;
using Content.Shared.Dataset;
using Content.Shared.Preferences;
using Content.Shared.Random.Helpers;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
namespace Content.Client.Preferences.UI
{
public partial class HumanoidProfileEditor
{
private readonly IRobustRandom _random;
private readonly IPrototypeManager _prototypeManager;
private void RandomizeEverything()
{
Profile = HumanoidCharacterProfile.Random();
UpdateSexControls();
UpdateGenderControls();
UpdateClothingControls();
UpdateAgeEdit();
UpdateNameEdit();
UpdateHairPickers();
UpdateEyePickers();
}
private void RandomizeName()
{
if (Profile == null) return;
var firstName = _random.Pick(Profile.Sex.FirstNames(_prototypeManager).Values);
var lastName = _random.Pick(_prototypeManager.Index<DatasetPrototype>("names_last"));
SetName($"{firstName} {lastName}");
UpdateNameEdit();
}
}
}