mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-20 22:47:45 +01:00
Rework and improve CustomizationManager and stuff.
This commit is contained in:
parent
aae4141550
commit
ab76d3508b
34 changed files with 916 additions and 1025 deletions
|
|
@ -27,7 +27,7 @@ public unsafe class FunModule : IDisposable
|
|||
|
||||
private readonly WorldSets _worldSets = new();
|
||||
private readonly ItemManager _items;
|
||||
private readonly CustomizationService _customizations;
|
||||
private readonly CustomizeService _customizations;
|
||||
private readonly Configuration _config;
|
||||
private readonly CodeService _codes;
|
||||
private readonly Random _rng;
|
||||
|
|
@ -67,7 +67,7 @@ public unsafe class FunModule : IDisposable
|
|||
internal void ResetFestival()
|
||||
=> OnDayChange(DateTime.Now.Day, DateTime.Now.Month, DateTime.Now.Year);
|
||||
|
||||
public FunModule(CodeService codes, CustomizationService customizations, ItemManager items, Configuration config,
|
||||
public FunModule(CodeService codes, CustomizeService customizations, ItemManager items, Configuration config,
|
||||
GenericPopupWindow popupWindow, StateManager stateManager, ObjectManager objects, DesignConverter designConverter,
|
||||
DesignManager designManager)
|
||||
{
|
||||
|
|
@ -197,7 +197,7 @@ public unsafe class FunModule : IDisposable
|
|||
if (!_codes.EnabledIndividual)
|
||||
return;
|
||||
|
||||
var set = _customizations.Service.GetList(customize.Clan, customize.Gender);
|
||||
var set = _customizations.Manager.GetSet(customize.Clan, customize.Gender);
|
||||
foreach (var index in Enum.GetValues<CustomizeIndex>())
|
||||
{
|
||||
if (index is CustomizeIndex.Face || !set.IsAvailable(index))
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ namespace Glamourer.State;
|
|||
public class StateEditor
|
||||
{
|
||||
private readonly ItemManager _items;
|
||||
private readonly CustomizationService _customizations;
|
||||
private readonly CustomizeService _customizations;
|
||||
private readonly HumanModelList _humans;
|
||||
private readonly GPoseService _gPose;
|
||||
private readonly ICondition _condition;
|
||||
|
||||
public StateEditor(CustomizationService customizations, HumanModelList humans, ItemManager items, GPoseService gPose, ICondition condition)
|
||||
public StateEditor(CustomizeService customizations, HumanModelList humans, ItemManager items, GPoseService gPose, ICondition condition)
|
||||
{
|
||||
_customizations = customizations;
|
||||
_humans = humans;
|
||||
|
|
@ -72,7 +72,7 @@ public class StateEditor
|
|||
|
||||
state[CustomizeIndex.Clan] = source;
|
||||
state[CustomizeIndex.Gender] = source;
|
||||
var set = _customizations.Service.GetList(state.ModelData.Customize.Clan, state.ModelData.Customize.Gender);
|
||||
var set = _customizations.Manager.GetSet(state.ModelData.Customize.Clan, state.ModelData.Customize.Gender);
|
||||
foreach (var index in Enum.GetValues<CustomizeIndex>().Where(set.IsAvailable))
|
||||
state[index] = source;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public class StateListener : IDisposable
|
|||
private readonly StateManager _manager;
|
||||
private readonly StateApplier _applier;
|
||||
private readonly ItemManager _items;
|
||||
private readonly CustomizationService _customizations;
|
||||
private readonly CustomizeService _customizations;
|
||||
private readonly PenumbraService _penumbra;
|
||||
private readonly SlotUpdating _slotUpdating;
|
||||
private readonly WeaponLoading _weaponLoading;
|
||||
|
|
@ -52,7 +52,7 @@ public class StateListener : IDisposable
|
|||
SlotUpdating slotUpdating, WeaponLoading weaponLoading, VisorStateChanged visorState, WeaponVisibilityChanged weaponVisibility,
|
||||
HeadGearVisibilityChanged headGearVisibility, AutoDesignApplier autoDesignApplier, FunModule funModule, HumanModelList humans,
|
||||
StateApplier applier, MovedEquipment movedEquipment, ObjectManager objects, GPoseService gPose,
|
||||
ChangeCustomizeService changeCustomizeService, CustomizationService customizations, ICondition condition, CrestService crestService)
|
||||
ChangeCustomizeService changeCustomizeService, CustomizeService customizations, ICondition condition, CrestService crestService)
|
||||
{
|
||||
_manager = manager;
|
||||
_items = items;
|
||||
|
|
@ -167,7 +167,7 @@ public class StateListener : IDisposable
|
|||
return;
|
||||
}
|
||||
|
||||
var set = _customizations.Service.GetList(model.Clan, model.Gender);
|
||||
var set = _customizations.Manager.GetSet(model.Clan, model.Gender);
|
||||
foreach (var index in CustomizationExtensions.AllBasic)
|
||||
{
|
||||
if (state[index] is not StateChanged.Source.Fixed)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue