Skip to content

Commit 7c7c958

Browse files
authored
Merge pull request #157 from SubnauticaModding/nugetDependencies
Switch to NuGet package for latest AssetsTools.NET
2 parents bfe5bcd + 391e569 commit 7c7c958

File tree

10 files changed

+13
-8
lines changed

10 files changed

+13
-8
lines changed

Build/InstallerExtensions.dll

0 Bytes
Binary file not shown.

Build/QModInstaller.dll

-4.5 KB
Binary file not shown.

Build/QModManager.exe

-512 Bytes
Binary file not shown.

Build/QModManager_Setup.exe

70.3 KB
Binary file not shown.

Dependencies/AssetsTools.NET.dll

-112 KB
Binary file not shown.

Executable/AudioFixer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ internal static void ChangeDisableUnityAudio(string path, bool newValue, QModGam
1616
AssetsManager am = new AssetsManager();
1717
AssetsFileInstance afi = am.LoadAssetsFile(path, false);
1818
am.LoadClassDatabase("cldb.dat");
19-
AssetFileInfoEx audioInfo = afi.table.getAssetInfo(4);
19+
AssetFileInfoEx audioInfo = afi.table.GetAssetInfo(4);
2020
AssetTypeInstance audioAti = am.GetATI(afi.file, audioInfo);
2121
AssetTypeValueField audioBaseField = audioAti.GetBaseField();
2222
audioBaseField.Get("m_DisableAudio").GetValue().Set(newValue);
@@ -32,7 +32,7 @@ internal static void ChangeDisableUnityAudio(string path, bool newValue, QModGam
3232
using (MemoryStream memStream = new MemoryStream())
3333
using (AssetsFileWriter writer = new AssetsFileWriter(memStream))
3434
{
35-
afi.file.Write(writer, 0, rep.ToArray(), 0);
35+
afi.file.Write(writer, 0, rep, 0);
3636
afi.stream.Close();
3737
File.WriteAllBytes(path, memStream.ToArray());
3838
}

Executable/Executable.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
8383
</PropertyGroup>
8484
<ItemGroup>
85-
<Reference Include="AssetsTools.NET">
86-
<HintPath>..\Dependencies\AssetsTools.NET.dll</HintPath>
85+
<Reference Include="AssetsTools.NET, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
86+
<HintPath>..\packages\AssetsTools.NET.2.0.3\lib\net35\AssetsTools.NET.dll</HintPath>
8787
<Private>False</Private>
8888
</Reference>
8989
<Reference Include="Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
@@ -119,6 +119,7 @@
119119
</ItemGroup>
120120
<ItemGroup>
121121
<None Include="app.config" />
122+
<None Include="packages.config" />
122123
</ItemGroup>
123124
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
124125
<PropertyGroup>

Executable/Injector.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal class Injector
1717
internal Injector(string dir, string managedDir)
1818
{
1919
gameDirectory = dir;
20-
managedDirectory = managedDir;
20+
managedDirectory = managedDir;
2121
mainFilename = Path.Combine(managedDirectory, mainFilename);
2222
globalgamemanagers = Path.Combine(managedDirectory, "../globalgamemanagers");
2323
}
@@ -45,7 +45,6 @@ internal void Inject()
4545
File.Delete(backupFilePath);
4646

4747
AssemblyDefinition game = AssemblyDefinition.ReadAssembly(mainFilename);
48-
4948
AssemblyDefinition installer = AssemblyDefinition.ReadAssembly(installerFilename);
5049
MethodDefinition patchMethod = installer.MainModule.GetType("QModInstaller.QModPatcher").Methods.First(x => x.Name == "Patch");
5150

Executable/packages.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="AssetsTools.NET" version="2.0.3" targetFramework="net40" />
4+
<package id="Mono.Cecil" version="0.10.4" targetFramework="net40" />
5+
</packages>

Installer/QModsInstallerScript.iss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Source: "..\Build\InstallerExtensions.dll"; Flags: DontCopy
6060
; Subnautica
6161
Source: "..\Dependencies\0Harmony.dll"; DestDir: "{app}\Subnautica_Data\Managed"; Flags: IgnoreVersion; Check: IsSubnauticaApp
6262
Source: "..\Dependencies\0Harmony-1.2.0.1.dll"; DestDir: "{app}\Subnautica_Data\Managed"; Flags: IgnoreVersion; Check: IsSubnauticaApp
63-
Source: "..\Dependencies\AssetsTools.NET.dll"; DestDir: "{app}\Subnautica_Data\Managed"; Flags: IgnoreVersion; Check: IsSubnauticaApp
63+
Source: "..\packages\AssetsTools.NET.2.0.3\lib\net35\AssetsTools.NET.dll"; DestDir: "{app}\Subnautica_Data\Managed"; Flags: IgnoreVersion; Check: IsSubnauticaApp
6464
Source: "..\Dependencies\cldb.dat"; DestDir: "{app}\Subnautica_Data\Managed"; Flags: IgnoreVersion; Check: IsSubnauticaApp
6565
Source: "..\Dependencies\Mono.Cecil.dll"; DestDir: "{app}\Subnautica_Data\Managed"; Flags: IgnoreVersion; Check: IsSubnauticaApp
6666
Source: "..\Build\QModInstaller.dll"; DestDir: "{app}\Subnautica_Data\Managed"; Flags: IgnoreVersion; Check: IsSubnauticaApp
@@ -69,7 +69,7 @@ Source: "..\Build\QModManager.exe"; DestDir: "{app}\Subnautica_Data\Managed"; Fl
6969
; Below Zero
7070
Source: "..\Dependencies\0Harmony.dll"; DestDir: "{app}\SubnauticaZero_Data\Managed"; Flags: IgnoreVersion; Check: IsBelowZeroApp
7171
Source: "..\Dependencies\0Harmony-1.2.0.1.dll"; DestDir: "{app}\SubnauticaZero_Data\Managed"; Flags: IgnoreVersion; Check: IsBelowZeroApp
72-
Source: "..\Dependencies\AssetsTools.NET.dll"; DestDir: "{app}\SubnauticaZero_Data\Managed"; Flags: IgnoreVersion; Check: IsBelowZeroApp
72+
Source: "..\packages\AssetsTools.NET.2.0.3\lib\net35\AssetsTools.NET.dll"; DestDir: "{app}\SubnauticaZero_Data\Managed"; Flags: IgnoreVersion; Check: IsBelowZeroApp
7373
Source: "..\Dependencies\cldb.dat"; DestDir: "{app}\SubnauticaZero_Data\Managed"; Flags: IgnoreVersion; Check: IsBelowZeroApp
7474
Source: "..\Dependencies\Mono.Cecil.dll"; DestDir: "{app}\SubnauticaZero_Data\Managed"; Flags: IgnoreVersion; Check: IsBelowZeroApp
7575
Source: "..\Build\QModInstaller.dll"; DestDir: "{app}\SubnauticaZero_Data\Managed"; Flags: IgnoreVersion; Check: IsBelowZeroApp

0 commit comments

Comments
 (0)