mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-16 21:17:39 +03:00
* - 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
50 lines
1.1 KiB
C#
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();
|
|
}
|
|
}
|