mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-31 21:03:48 +01:00
Improve GamePaths and parsing, add support for identifying skeletons and phybs.
This commit is contained in:
parent
8860d1e39a
commit
c6de7ddebd
17 changed files with 65 additions and 83 deletions
|
|
@ -124,7 +124,7 @@ public partial class MtrlTab
|
|||
|
||||
private FullPath FindAssociatedShpk(out string defaultPath, out Utf8GamePath defaultGamePath)
|
||||
{
|
||||
defaultPath = GamePaths.Shader.ShpkPath(Mtrl.ShaderPackage.Name);
|
||||
defaultPath = GamePaths.Shader(Mtrl.ShaderPackage.Name);
|
||||
if (!Utf8GamePath.FromString(defaultPath, out defaultGamePath))
|
||||
return FullPath.Empty;
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public sealed class AtchMetaDrawer : MetaDrawer<AtchIdentifier, AtchEntry>, ISer
|
|||
if (filePath.Length == 0 || !File.Exists(filePath))
|
||||
throw new FileNotFoundException();
|
||||
|
||||
var gr = GamePaths.ParseRaceCode(filePath);
|
||||
var gr = Parser.ParseRaceCode(filePath);
|
||||
if (gr is GenderRace.Unknown)
|
||||
throw new Exception($"Could not identify race code from path {filePath}.");
|
||||
var text = File.ReadAllBytes(filePath);
|
||||
|
|
@ -277,7 +277,7 @@ public sealed class AtchMetaDrawer : MetaDrawer<AtchIdentifier, AtchEntry>, ISer
|
|||
if (!ret)
|
||||
return false;
|
||||
|
||||
index = Math.Clamp(index, (ushort)0, (ushort)(currentAtchPoint!.Entries.Length - 1));
|
||||
index = Math.Clamp(index, (ushort)0, (ushort)(currentAtchPoint.Entries.Length - 1));
|
||||
identifier = identifier with { EntryIndex = index };
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public partial class ModEditWindow
|
|||
{
|
||||
_dragDropManager.CreateImGuiSource("atchDrag", f => f.Extensions.Contains(".atch"), f =>
|
||||
{
|
||||
var gr = GamePaths.ParseRaceCode(f.Files.FirstOrDefault() ?? string.Empty);
|
||||
var gr = Parser.ParseRaceCode(f.Files.FirstOrDefault() ?? string.Empty);
|
||||
if (gr is GenderRace.Unknown)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue