Skip to content

Commit

Permalink
dlc support. forgot to include in initial release, whoops
Browse files Browse the repository at this point in the history
  • Loading branch information
Monitor221hz committed Dec 20, 2023
1 parent 321a06d commit 59721f6
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<hkparam name="mirroredSyncPointSubstringsA" numelements="0"></hkparam>
<hkparam name="mirroredSyncPointSubstringsB" numelements="0"></hkparam>
<hkparam name="name">NetchCharacter</hkparam>
<hkparam name="rigName">CharacterAssets\Skeleton.hkx</hkparam>
<hkparam name="ragdollName">CharacterAssets\Skeleton.hkx</hkparam>
<hkparam name="rigName">Character Assets\Skeleton.hkx</hkparam>
<hkparam name="ragdollName">Character Assets\Skeleton.hkx</hkparam>
<hkparam name="behaviorFilename">Behaviors\NetchBehavior.hkx</hkparam>
</hkobject>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ actors\character\_1stperson\firstperson.hkx
actors\chaurus\chaurusproject.hkx
actors\cow\highlandcowproject.hkx
actors\deer\deerproject.hkx
actors\dlc01\chaurusflyer\chaurusflyer.hkx
actors\dlc01\vampirebrute\vampirebruteproject.hkx
actors\dlc02\benthiclurker\benthiclurkerproject.hkx
actors\dlc02\boarriekling\boarproject.hkx
actors\dlc02\dwarvenballistacenturion\ballistacenturion.hkx
actors\dlc02\hmdaedra\hmdaedra.hkx
actors\dlc02\netch\netchproject.hkx
actors\dlc02\riekling\rieklingproject.hkx
actors\dlc02\scrib\scribproject.hkx
actors\dragon\dragonproject.hkx
actors\dragonpriest\dragon_priest.hkx
actors\draugr\draugrproject.hkx
Expand Down
43 changes: 43 additions & 0 deletions PandoraPlus/Patch/Patchers/FileCache.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pandora.Patch.Patchers;
public class FileCache
{

private Dictionary<string, FileInfo> pathMap = new Dictionary<string, FileInfo>();

public FileInfo GetFile(string path)
{
FileInfo? fileInfo = null;

if (!pathMap.TryGetValue(path, out fileInfo))
{
pathMap.Add(path, fileInfo = new FileInfo(path));
}

return fileInfo;
}

public FileInfo[] GetFiles(DirectoryInfo directory)
{
var fileArray = directory.GetFiles();

for (int i = 0; i < fileArray.Length; i++)
{
FileInfo? fileInfo;
if (pathMap.TryGetValue(fileArray[i].FullName, out fileInfo))
{
fileArray[i] = fileInfo;
continue;
}
fileInfo = fileArray[i];
pathMap.Add(fileInfo.FullName, fileInfo );
}
return fileArray;
}
}

0 comments on commit 59721f6

Please sign in to comment.