mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Maybe fix left finger resource nodes.
This commit is contained in:
parent
a54e45f9c3
commit
50db83146a
4 changed files with 24 additions and 24 deletions
|
|
@ -37,7 +37,7 @@ internal partial record ResolveContext
|
|||
{
|
||||
var path = IsEquipmentSlot(SlotIndex)
|
||||
? GamePaths.Equipment.Mdl.Path(Equipment.Set, ResolveModelRaceCode(), Slot.ToSlot())
|
||||
: GamePaths.Accessory.Mdl.Path(Equipment.Set, ResolveModelRaceCode(), Slot.ToSlot());
|
||||
: GamePaths.Accessory.Mdl.Path(Equipment.Set, ResolveModelRaceCode(), SlotIndex.ToEquipSlot());
|
||||
return Utf8GamePath.FromString(path, out var gamePath) ? gamePath : Utf8GamePath.Empty;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -340,9 +340,9 @@ internal unsafe partial record ResolveContext(
|
|||
|
||||
internal ResourceNode.UiData GuessModelUiData(Utf8GamePath gamePath)
|
||||
{
|
||||
var path = gamePath.ToString().Split('/', StringSplitOptions.RemoveEmptyEntries);
|
||||
var path = gamePath.Path.Split((byte)'/');
|
||||
// Weapons intentionally left out.
|
||||
var isEquipment = SafeGet(path, 0) == "chara" && SafeGet(path, 1) is "accessory" or "equipment";
|
||||
var isEquipment = path.Count >= 2 && path[0].Span.SequenceEqual("chara"u8) && (path[1].Span.SequenceEqual("accessory"u8) || path[1].Span.SequenceEqual("equipment"u8));
|
||||
if (isEquipment)
|
||||
foreach (var item in Global.Identifier.Identify(Equipment.Set, 0, Equipment.Variant, Slot.ToSlot()))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,20 +7,20 @@ namespace Penumbra.Interop.ResourceTree;
|
|||
|
||||
public class ResourceNode : ICloneable
|
||||
{
|
||||
public string? Name;
|
||||
public string? FallbackName;
|
||||
public ChangedItemIconFlag IconFlag;
|
||||
public readonly ResourceType Type;
|
||||
public readonly nint ObjectAddress;
|
||||
public readonly nint ResourceHandle;
|
||||
public Utf8GamePath[] PossibleGamePaths;
|
||||
public FullPath FullPath;
|
||||
public string? ModName;
|
||||
public string? ModRelativePath;
|
||||
public CiByteString AdditionalData;
|
||||
public readonly ulong Length;
|
||||
public readonly List<ResourceNode> Children;
|
||||
internal ResolveContext? ResolveContext;
|
||||
public string? Name;
|
||||
public string? FallbackName;
|
||||
public ChangedItemIconFlag IconFlag;
|
||||
public readonly ResourceType Type;
|
||||
public readonly nint ObjectAddress;
|
||||
public readonly nint ResourceHandle;
|
||||
public Utf8GamePath[] PossibleGamePaths;
|
||||
public FullPath FullPath;
|
||||
public string? ModName;
|
||||
public string? ModRelativePath;
|
||||
public CiByteString AdditionalData;
|
||||
public readonly ulong Length;
|
||||
public readonly List<ResourceNode> Children;
|
||||
internal ResolveContext? ResolveContext;
|
||||
|
||||
public Utf8GamePath GamePath
|
||||
{
|
||||
|
|
@ -53,7 +53,7 @@ public class ResourceNode : ICloneable
|
|||
{
|
||||
Name = other.Name;
|
||||
FallbackName = other.FallbackName;
|
||||
IconFlag = other.IconFlag;
|
||||
IconFlag = other.IconFlag;
|
||||
Type = other.Type;
|
||||
ObjectAddress = other.ObjectAddress;
|
||||
ResourceHandle = other.ResourceHandle;
|
||||
|
|
@ -82,7 +82,7 @@ public class ResourceNode : ICloneable
|
|||
|
||||
public void SetUiData(UiData uiData)
|
||||
{
|
||||
Name = uiData.Name;
|
||||
Name = uiData.Name;
|
||||
IconFlag = uiData.IconFlag;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,8 +81,8 @@ public class ResourceTree
|
|||
ModelType.Human => i switch
|
||||
{
|
||||
< 10 => globalContext.CreateContext(model, i, i.ToEquipSlot().ToEquipType(), equipment[(int)i]),
|
||||
16 => globalContext.CreateContext(model, i, FullEquipType.Glasses, equipment[10]),
|
||||
17 => globalContext.CreateContext(model, i, FullEquipType.Unknown, equipment[11]),
|
||||
16 => globalContext.CreateContext(model, i, FullEquipType.Glasses, equipment[10]),
|
||||
17 => globalContext.CreateContext(model, i, FullEquipType.Unknown, equipment[11]),
|
||||
_ => globalContext.CreateContext(model, i),
|
||||
},
|
||||
_ => i < equipment.Length
|
||||
|
|
@ -185,7 +185,7 @@ public class ResourceTree
|
|||
{
|
||||
pbdNode = pbdNode.Clone();
|
||||
pbdNode.FallbackName = "Racial Deformer";
|
||||
pbdNode.IconFlag = ChangedItemIconFlag.Customization;
|
||||
pbdNode.IconFlag = ChangedItemIconFlag.Customization;
|
||||
}
|
||||
|
||||
Nodes.Add(pbdNode);
|
||||
|
|
@ -203,7 +203,7 @@ public class ResourceTree
|
|||
{
|
||||
decalNode = decalNode.Clone();
|
||||
decalNode.FallbackName = "Face Decal";
|
||||
decalNode.IconFlag = ChangedItemIconFlag.Customization;
|
||||
decalNode.IconFlag = ChangedItemIconFlag.Customization;
|
||||
}
|
||||
|
||||
Nodes.Add(decalNode);
|
||||
|
|
@ -220,7 +220,7 @@ public class ResourceTree
|
|||
{
|
||||
legacyDecalNode = legacyDecalNode.Clone();
|
||||
legacyDecalNode.FallbackName = "Legacy Body Decal";
|
||||
legacyDecalNode.IconFlag = ChangedItemIconFlag.Customization;
|
||||
legacyDecalNode.IconFlag = ChangedItemIconFlag.Customization;
|
||||
}
|
||||
|
||||
Nodes.Add(legacyDecalNode);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue