Files
wwdpublic/Content.Client/Lobby/UI/ProfileEditor/HumanoidProfileEditor.CharacterEditor.cs
Cinkafox b2d255cdd2 [tweak] UI Tweaks (#1001)
* - tweak: update StyleSheetify

* - add: flexbox

* - fix: size of flexbox in launchergui

* - tweak: Profile editor: start.

* - add: categories

* - tweak: help me please with this shi... loadouts

* - fix: container path think

* - tweak: thinks for optimisation

* - add: group selection for loadoutpicker

* - tweak: change position of preview

* - add: reason text

* - fix: Кролькины фиксы

* - fix: кролькины фиксы ч.2

* - fix: кролькины фиксы ч.3

* - кролькины фиксы - финал

* - fix: Ворчливого дедушкины фиксы, удаление старого барахла и пометка wwdp

* - tweak: some ui change for LoadoutCategories and LoadoutEntry

* - ворчливый дед фиксы ч.2

* - fix: очередные кролькины фиксы

* - add: loadout prototype validation

* - fix: description read from edit field
2026-01-04 23:33:01 +02:00

50 lines
1.1 KiB
C#

using Content.Shared.Clothing.Loadouts.Systems;
namespace Content.Client.Lobby.UI;
// WWDP PARTIAL CLASS
public sealed partial class HumanoidProfileEditor
{
private void InitializeCharacterMenu()
{
Loadouts.OnLoadoutsChanged += OnLoadoutsChange;
}
private void UpdateLoadouts()
{
if (Profile == null)
return;
var highJob = _controller.GetPreferredJob(Profile);
Loadouts.SetData(
Profile.LoadoutPreferencesList,
new(
highJob,
Profile,
_requirements.GetRawPlayTimeTrackers(),
_requirements.IsWhitelisted()
)
);
}
private void CheckpointLoadouts()
{
if (Profile == null)
return;
Loadouts.SetCheckpoint();
}
private void OnLoadoutsChange(List<Loadout> loadouts)
{
if (Profile is null)
return;
Profile = Profile.WithLoadoutPreference(loadouts);
ReloadProfilePreview();
ReloadClothes();
UpdateLoadouts();
}
}