Skip to content

Commit 4e04e0d

Browse files
committed
allow customisation of path to info.dat
1 parent 5fd3a30 commit 4e04e0d

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

CathodeLib/CathodeLib.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<Authors>Matt Filer</Authors>
1111
<Description>Provides support for parsing and writing common Alien: Isolation formats from the Cathode engine.</Description>
1212
<Copyright>Matt Filer 2026</Copyright>
13-
<Version>0.12.1</Version>
13+
<Version>0.12.2</Version>
1414
<OutputType>Library</OutputType>
15-
<AssemblyVersion>0.12.1.0</AssemblyVersion>
16-
<FileVersion>0.12.0.0</FileVersion>
15+
<AssemblyVersion>0.12.2.0</AssemblyVersion>
16+
<FileVersion>0.12.2.0</FileVersion>
1717
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
1818
<PackageReadmeFile>README.md</PackageReadmeFile>
1919
<PackageTags>alien, modding, alien isolation, mod tool, file utility</PackageTags>

CathodeLib/Scripts/CATHODE/Commands/Helpers/CustomTable.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public VanillaData()
2828
byte[] content = Utilities.ReadStreamingAsset("info.dat");
2929
#else
3030
byte[] content = CathodeLib.Properties.Resources.info;
31-
if (File.Exists("data/info.dat"))
32-
content = File.ReadAllBytes("data/info.dat");
31+
if (File.Exists(Paths.CustomInfoDat))
32+
content = File.ReadAllBytes(Paths.CustomInfoDat);
3333
#endif
3434

3535
using (MemoryStream stream = new MemoryStream())

CathodeLib/Scripts/CATHODE/Helpers/SoundUtils.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ static SoundUtils()
1919
byte[] content = Utilities.ReadStreamingAsset("sound_names.bin");
2020
#else
2121
byte[] content = CathodeLib.Properties.Resources.sound_names;
22+
if (File.Exists(Paths.CustomSoundBin))
23+
content = File.ReadAllBytes(Paths.CustomSoundBin);
2224
#endif
2325
using (MemoryStream stream = new MemoryStream())
2426
using (GZipStream compressedStream = new GZipStream(new MemoryStream(content), CompressionMode.Decompress))

CathodeLib/Scripts/Utilities.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,12 @@ private static void AddGodotDataSubdirectoryRoots(string root, Action<string> ad
729729
#endif
730730
}
731731

732+
public static class Paths
733+
{
734+
public static string CustomInfoDat = "data/info.dat"; //Set this path to a local CustomTable to override the one embedded in CathodeLib
735+
public static string CustomSoundBin = "data/sound_names.bin"; //Set this path to a local sound name BIN to override the one embedded in CathodeLib
736+
}
737+
732738
public static class MathsUtils
733739
{
734740
public static (decimal, decimal, decimal) ToYawPitchRoll(this Quaternion q)

0 commit comments

Comments
 (0)