mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-03 06:13:45 +01:00
Some cleanup.
This commit is contained in:
parent
1a8d194e05
commit
f533ae6667
3 changed files with 11 additions and 11 deletions
|
|
@ -199,8 +199,6 @@ internal partial record ResolveContext
|
|||
ByteString? path;
|
||||
try
|
||||
{
|
||||
Penumbra.Log.Information($"{(nint)CharacterBase:X} {ModelType} {SlotIndex} 0x{(ulong)mtrlFileName:X}");
|
||||
Penumbra.Log.Information($"{new ByteString(mtrlFileName)}");
|
||||
path = CharacterBase->ResolveMtrlPathAsByteString(SlotIndex, mtrlFileName);
|
||||
}
|
||||
catch (AccessViolationException)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public class ResourceTreeFactory(
|
|||
ObjectManager objects,
|
||||
MetaFileManager metaFileManager,
|
||||
CollectionResolver resolver,
|
||||
ObjectIdentification identifier,
|
||||
ObjectIdentification objectIdentifier,
|
||||
Configuration config,
|
||||
ActorManager actors,
|
||||
PathState pathState) : IService
|
||||
|
|
@ -80,7 +80,7 @@ public class ResourceTreeFactory(
|
|||
var networked = character.EntityId != 0xE0000000;
|
||||
var tree = new ResourceTree(name, anonymizedName, character.ObjectIndex, (nint)gameObjStruct, (nint)drawObjStruct, localPlayerRelated, related,
|
||||
networked, collectionResolveData.ModCollection.Name, collectionResolveData.ModCollection.AnonymizedName);
|
||||
var globalContext = new GlobalResolveContext(metaFileManager, identifier, collectionResolveData.ModCollection,
|
||||
var globalContext = new GlobalResolveContext(metaFileManager, objectIdentifier, collectionResolveData.ModCollection,
|
||||
cache, (flags & Flags.WithUiData) != 0);
|
||||
using (var _ = pathState.EnterInternalResolve())
|
||||
{
|
||||
|
|
@ -125,6 +125,14 @@ public class ResourceTreeFactory(
|
|||
|
||||
private static void FilterFullPaths(ResourceTree tree, string? onlyWithinPath)
|
||||
{
|
||||
foreach (var node in tree.FlatNodes)
|
||||
{
|
||||
if (!ShallKeepPath(node.FullPath, onlyWithinPath))
|
||||
node.FullPath = FullPath.Empty;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
static bool ShallKeepPath(FullPath fullPath, string? onlyWithinPath)
|
||||
{
|
||||
if (!fullPath.IsRooted)
|
||||
|
|
@ -139,12 +147,6 @@ public class ResourceTreeFactory(
|
|||
|
||||
return fullPath.Exists;
|
||||
}
|
||||
|
||||
foreach (var node in tree.FlatNodes)
|
||||
{
|
||||
if (!ShallKeepPath(node.FullPath, onlyWithinPath))
|
||||
node.FullPath = FullPath.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
private static void Cleanup(ResourceTree tree)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public unsafe struct CharacterUtilityData
|
|||
.Where(n => n.First.StartsWith("Eqdp"))
|
||||
.Select(n => n.Second).ToArray();
|
||||
|
||||
public const int TotalNumResources = 89;
|
||||
public const int TotalNumResources = 114;
|
||||
|
||||
/// <summary> Obtain the index for the eqdp file corresponding to the given race code and accessory. </summary>
|
||||
public static MetaIndex EqdpIdx(GenderRace raceCode, bool accessory)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue