mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-19 14:07:43 +01:00
Change fixed state handling for advanced dyes.
This commit is contained in:
parent
bade38f82e
commit
93ba44d230
3 changed files with 41 additions and 7 deletions
|
|
@ -322,8 +322,10 @@ public sealed class StateManager(
|
|||
{
|
||||
actors = Applier.ChangeArmor(state, EquipSlotExtensions.EqdpSlots[0], true);
|
||||
foreach (var slot in EquipSlotExtensions.EqdpSlots.Skip(1))
|
||||
{
|
||||
Applier.ChangeArmor(actors, slot, state.ModelData.Armor(slot), !state.Sources[slot, false].IsIpc(),
|
||||
state.ModelData.IsHatVisible());
|
||||
}
|
||||
|
||||
var mainhandActors = state.ModelData.MainhandType != state.BaseData.MainhandType ? actors.OnlyGPose() : actors;
|
||||
Applier.ChangeMainhand(mainhandActors, state.ModelData.Item(EquipSlot.MainHand), state.ModelData.Stain(EquipSlot.MainHand));
|
||||
|
|
@ -331,7 +333,8 @@ public sealed class StateManager(
|
|||
Applier.ChangeOffhand(offhandActors, state.ModelData.Item(EquipSlot.OffHand), state.ModelData.Stain(EquipSlot.OffHand));
|
||||
}
|
||||
|
||||
Glamourer.Log.Verbose($"Reset equipment state of {state.Identifier.Incognito(null)} to game base. [Affecting {actors.ToLazyString("nothing")}.]");
|
||||
Glamourer.Log.Verbose(
|
||||
$"Reset equipment state of {state.Identifier.Incognito(null)} to game base. [Affecting {actors.ToLazyString("nothing")}.]");
|
||||
}
|
||||
|
||||
public void ResetStateFixed(ActorState state, bool respectManualPalettes, uint key = 0)
|
||||
|
|
@ -386,6 +389,17 @@ public sealed class StateManager(
|
|||
state.Sources[meta] = StateSource.Game;
|
||||
state.ModelData.SetMeta(meta, state.BaseData.GetMeta(meta));
|
||||
}
|
||||
|
||||
foreach (var (index, value) in state.Materials.Values.ToList())
|
||||
{
|
||||
switch (value.Source)
|
||||
{
|
||||
case StateSource.Fixed:
|
||||
case StateSource.Manual when !respectManualPalettes:
|
||||
state.Materials.RemoveValue(index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ReapplyState(Actor actor, StateSource source)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue