Skip to content

Commit 372d7e8

Browse files
authored
Merge pull request #242 from SubnauticaModding/Dev
QModManager 4.2
2 parents c976a95 + e00aed2 commit 372d7e8

29 files changed

+342
-242
lines changed

Data/latest-version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.1.4.0
1+
4.2.0.0

Dependencies/BZ.EXP/BepInEx.cfg

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[Preloader.Entrypoint]
2+
3+
## The local filename of the assembly to target.
4+
# Setting type: String
5+
# Default value: UnityEngine.CoreModule.dll
6+
Assembly = Assembly-CSharp.dll
7+
8+
## The name of the type in the entrypoint assembly to search for the entrypoint method.
9+
# Setting type: String
10+
# Default value: Application
11+
Type = PreStartScreen
12+
13+
## The name of the method in the specified entrypoint assembly and type to hook and load Chainloader from.
14+
# Setting type: String
15+
# Default value: .cctor
16+
Method = Start

Dependencies/BZ.STABLE/BepInEx.cfg

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[Preloader.Entrypoint]
2+
3+
## The local filename of the assembly to target.
4+
# Setting type: String
5+
# Default value: UnityEngine.CoreModule.dll
6+
Assembly = Assembly-CSharp.dll
7+
8+
## The name of the type in the entrypoint assembly to search for the entrypoint method.
9+
# Setting type: String
10+
# Default value: Application
11+
Type = PreStartScreen
12+
13+
## The name of the method in the specified entrypoint assembly and type to hook and load Chainloader from.
14+
# Setting type: String
15+
# Default value: .cctor
16+
Method = Start
Binary file not shown.

Dependencies/BepInEx/doorstop_config.ini

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ ignoreDisableSwitch=false
1313
# (e.g. mscorlib is stripped in original game)
1414
# This option causes Mono to seek mscorlib and core libraries from a different folder before Managed
1515
# Original Managed folder is added as a secondary folder in the search path
16-
dllSearchPathOverride=
16+
dllSearchPathOverride=
17+
18+
[MultiFolderLoader]
19+
baseDir=.\QMods

Dependencies/SN.EXP/BepInEx.cfg

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[Preloader.Entrypoint]
2+
3+
## The local filename of the assembly to target.
4+
# Setting type: String
5+
# Default value: UnityEngine.CoreModule.dll
6+
Assembly = Assembly-CSharp.dll
7+
8+
## The name of the type in the entrypoint assembly to search for the entrypoint method.
9+
# Setting type: String
10+
# Default value: Application
11+
Type = PreStartScreen
12+
13+
## The name of the method in the specified entrypoint assembly and type to hook and load Chainloader from.
14+
# Setting type: String
15+
# Default value: .cctor
16+
Method = Start

Dependencies/SN.STABLE/BepInEx.cfg

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[Preloader.Entrypoint]
2+
3+
## The local filename of the assembly to target.
4+
# Setting type: String
5+
# Default value: UnityEngine.CoreModule.dll
6+
Assembly = Assembly-CSharp.dll
7+
8+
## The name of the type in the entrypoint assembly to search for the entrypoint method.
9+
# Setting type: String
10+
# Default value: Application
11+
Type = SystemsSpawner
12+
13+
## The name of the method in the specified entrypoint assembly and type to hook and load Chainloader from.
14+
# Setting type: String
15+
# Default value: .cctor
16+
Method = Awake

Executable/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
[assembly: ComVisible(false)]
1414

15-
[assembly: AssemblyVersion("4.1.4")]
16-
[assembly: AssemblyFileVersion("4.1.4")]
15+
[assembly: AssemblyVersion("4.2")]
16+
[assembly: AssemblyFileVersion("4.2")]

Installer/BZ.EXP.iss

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#endif
66

77
#define Name "QModManager" ; The name of the game will be added after it
8-
#define Version "4.1.4"
8+
#define Version "4.2"
99
#define Author "QModManager"
1010
#define URL "https://github.com/QModManager/QModManager"
1111
#define SupportURL "https://discord.gg/UpWuWwq"
@@ -59,7 +59,7 @@ Source: "InstallerExtensions.dll"; Flags: DontCopy
5959

6060
; Files required by QModManager itself
6161
; Dependencies
62-
Source: "..\..\packages\AssetsTools.NET.2.0.3\lib\net35\AssetsTools.NET.dll"; DestDir: "{app}\BepInEx\patchers\QModManager"; Flags: ignoreversion;
62+
Source: "..\..\packages\AssetsTools.NET.2.0.9\lib\net40\AssetsTools.NET.dll"; DestDir: "{app}\BepInEx\patchers\QModManager"; Flags: ignoreversion;
6363
Source: "..\..\Dependencies\cldb.dat"; DestDir: "{app}\BepInEx\patchers\QModManager"; Flags: ignoreversion;
6464
Source: "..\..\Dependencies\Oculus.Newtonsoft.Json.dll"; DestDir: "{app}\BepInEx\patchers\QModManager"; Flags: ignoreversion;
6565

@@ -76,6 +76,7 @@ Source: "QModManager.UnityAudioFixer.xml"; DestDir: "{app}\BepInEx\patchers\QMod
7676

7777
; BepInEx
7878
Source: "..\..\Dependencies\BepInEx\*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs replacesameversion sharedfile uninsnosharedfileprompt;
79+
Source: "..\..\Dependencies\BZ.EXP\BepInEx.cfg"; DestDir: "{app}\BepInEx\config"; Flags: ignoreversion sharedfile uninsnosharedfileprompt;
7980

8081
[Dirs]
8182
Name: "{app}\QMods"

Installer/BZ.STABLE.iss

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#endif
66

77
#define Name "QModManager" ; The name of the game will be added after it
8-
#define Version "4.1.4"
8+
#define Version "4.2"
99
#define Author "QModManager"
1010
#define URL "https://github.com/QModManager/QModManager"
1111
#define SupportURL "https://discord.gg/UpWuWwq"
@@ -59,7 +59,7 @@ Source: "InstallerExtensions.dll"; Flags: DontCopy
5959

6060
; Files required by QModManager itself
6161
; Dependencies
62-
Source: "..\..\packages\AssetsTools.NET.2.0.3\lib\net35\AssetsTools.NET.dll"; DestDir: "{app}\BepInEx\patchers\QModManager"; Flags: ignoreversion;
62+
Source: "..\..\packages\AssetsTools.NET.2.0.9\lib\net40\AssetsTools.NET.dll"; DestDir: "{app}\BepInEx\patchers\QModManager"; Flags: ignoreversion;
6363
Source: "..\..\Dependencies\cldb.dat"; DestDir: "{app}\BepInEx\patchers\QModManager"; Flags: ignoreversion;
6464
Source: "..\..\Dependencies\Oculus.Newtonsoft.Json.dll"; DestDir: "{app}\BepInEx\patchers\QModManager"; Flags: ignoreversion;
6565

@@ -76,6 +76,7 @@ Source: "QModManager.UnityAudioFixer.xml"; DestDir: "{app}\BepInEx\patchers\QMod
7676

7777
; BepInEx
7878
Source: "..\..\Dependencies\BepInEx\*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs replacesameversion sharedfile uninsnosharedfileprompt;
79+
Source: "..\..\Dependencies\BZ.STABLE\BepInEx.cfg"; DestDir: "{app}\BepInEx\config"; Flags: ignoreversion sharedfile uninsnosharedfileprompt;
7980

8081
[Dirs]
8182
Name: "{app}\QMods"

Installer/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414

1515
[assembly: Guid("8c6c9a0b-80c4-43d2-89f2-749e6f09fdda")]
1616

17-
[assembly: AssemblyVersion("4.1.4")]
18-
[assembly: AssemblyFileVersion("4.1.4")]
17+
[assembly: AssemblyVersion("4.2")]
18+
[assembly: AssemblyFileVersion("4.2")]

Installer/SN.EXP.iss

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#endif
66

77
#define Name "QModManager" ; The name of the game will be added after it
8-
#define Version "4.1.4"
8+
#define Version "4.2"
99
#define Author "QModManager"
1010
#define URL "https://github.com/QModManager/QModManager"
1111
#define SupportURL "https://discord.gg/UpWuWwq"
@@ -59,7 +59,7 @@ Source: "InstallerExtensions.dll"; Flags: DontCopy
5959

6060
; Files required by QModManager itself
6161
; Dependencies
62-
Source: "..\..\packages\AssetsTools.NET.2.0.3\lib\net35\AssetsTools.NET.dll"; DestDir: "{app}\BepInEx\patchers\QModManager"; Flags: ignoreversion;
62+
Source: "..\..\packages\AssetsTools.NET.2.0.9\lib\net40\AssetsTools.NET.dll"; DestDir: "{app}\BepInEx\patchers\QModManager"; Flags: ignoreversion;
6363
Source: "..\..\Dependencies\cldb.dat"; DestDir: "{app}\BepInEx\patchers\QModManager"; Flags: ignoreversion;
6464
Source: "..\..\Dependencies\Oculus.Newtonsoft.Json.dll"; DestDir: "{app}\BepInEx\patchers\QModManager"; Flags: ignoreversion;
6565

@@ -76,6 +76,7 @@ Source: "QModManager.UnityAudioFixer.xml"; DestDir: "{app}\BepInEx\patchers\QMod
7676

7777
; BepInEx
7878
Source: "..\..\Dependencies\BepInEx\*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs replacesameversion sharedfile uninsnosharedfileprompt;
79+
Source: "..\..\Dependencies\SN.EXP\BepInEx.cfg"; DestDir: "{app}\BepInEx\config"; Flags: ignoreversion sharedfile uninsnosharedfileprompt;
7980

8081
[Dirs]
8182
Name: "{app}\QMods"

Installer/SN.STABLE.iss

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#endif
66

77
#define Name "QModManager" ; The name of the game will be added after it
8-
#define Version "4.1.4"
8+
#define Version "4.2"
99
#define Author "QModManager"
1010
#define URL "https://github.com/QModManager/QModManager"
1111
#define SupportURL "https://discord.gg/UpWuWwq"
@@ -59,7 +59,7 @@ Source: "InstallerExtensions.dll"; Flags: DontCopy
5959

6060
; Files required by QModManager itself
6161
; Dependencies
62-
Source: "..\..\packages\AssetsTools.NET.2.0.3\lib\net35\AssetsTools.NET.dll"; DestDir: "{app}\BepInEx\patchers\QModManager"; Flags: ignoreversion;
62+
Source: "..\..\packages\AssetsTools.NET.2.0.9\lib\net40\AssetsTools.NET.dll"; DestDir: "{app}\BepInEx\patchers\QModManager"; Flags: ignoreversion;
6363
Source: "..\..\Dependencies\cldb.dat"; DestDir: "{app}\BepInEx\patchers\QModManager"; Flags: ignoreversion;
6464

6565
; QMM
@@ -74,6 +74,7 @@ Source: "QModManager.UnityAudioFixer.xml"; DestDir: "{app}\BepInEx\patchers\QMod
7474

7575
; BepInEx
7676
Source: "..\..\Dependencies\BepInEx\*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs replacesameversion sharedfile uninsnosharedfileprompt;
77+
Source: "..\..\Dependencies\SN.STABLE\BepInEx.cfg"; DestDir: "{app}\BepInEx\config"; Flags: ignoreversion sharedfile uninsnosharedfileprompt;
7778

7879
[Dirs]
7980
Name: "{app}\QMods"

OculusNewtonsoftRedirect/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("4.1.4")]
36-
[assembly: AssemblyFileVersion("4.1.4")]
35+
[assembly: AssemblyVersion("4.2")]
36+
[assembly: AssemblyFileVersion("4.2")]

QModManager.sln

+8
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QModManager.QModPluginGener
3636
EndProject
3737
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QModManager.OculusNewtonsoftRedirect", "OculusNewtonsoftRedirect\QModManager.OculusNewtonsoftRedirect.csproj", "{25558450-FF33-4FDF-91C7-0C5C00A94A57}"
3838
EndProject
39+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Scripts", "Build Scripts", "{075884D3-CC6F-4B56-B050-C31A8E11FA52}"
40+
ProjectSection(SolutionItems) = preProject
41+
Scripts\QModPluginGenerator-post-build.cmd = Scripts\QModPluginGenerator-post-build.cmd
42+
EndProjectSection
43+
EndProject
3944
Global
4045
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4146
BZ.EXP|Any CPU = BZ.EXP|Any CPU
@@ -224,6 +229,9 @@ Global
224229
GlobalSection(SolutionProperties) = preSolution
225230
HideSolutionNode = FALSE
226231
EndGlobalSection
232+
GlobalSection(NestedProjects) = preSolution
233+
{075884D3-CC6F-4B56-B050-C31A8E11FA52} = {5A8D179E-C749-4346-AD81-05F11C082A1C}
234+
EndGlobalSection
227235
GlobalSection(ExtensibilityGlobals) = postSolution
228236
SolutionGuid = {54A73C4F-4981-48CC-AD91-27D3D090D5D4}
229237
EndGlobalSection
+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
using BepInEx;
2+
using HarmonyLib;
3+
using System.Text.RegularExpressions;
4+
5+
namespace QModInstaller.BepInEx.Plugins
6+
{
7+
/// <summary>
8+
/// Handles filtering noisy logs from the QModManager logs.
9+
/// </summary>
10+
[BepInPlugin(PluginGuid, PluginName, PluginVersion)]
11+
[BepInProcess("Subnautica"), BepInProcess("SubnauticaZero")]
12+
internal class LogFilter : BaseUnityPlugin
13+
{
14+
internal const string PluginGuid = "QModManager.LogFilter";
15+
internal const string PluginName = PluginGuid;
16+
internal const string PluginVersion = "4.2";
17+
18+
private void Awake()
19+
{
20+
var harmony = new Harmony(PluginGuid);
21+
harmony.Patch(AccessTools.Method("MirrorInternalLogs.Util.LibcHelper:Format"),
22+
postfix: new HarmonyMethod(AccessTools.Method(typeof(LogFilter), nameof(LogFilter.LibcHelper_Format_Postfix))));
23+
}
24+
25+
private readonly static Regex[] DirtyRegexPatterns = new Regex[] {
26+
new Regex(@"([\r\n]+)?(\(Filename: .*\))", RegexOptions.Compiled),
27+
new Regex(@"([\r\n]+)?(Replacing cell.*)", RegexOptions.Compiled),
28+
new Regex(@"([\r\n]+)?(Resetting cell with.*)", RegexOptions.Compiled),
29+
new Regex(@"([\r\n]+)?(Fallback handler could not load.*)", RegexOptions.Compiled),
30+
new Regex(@"([\r\n]+)?(Heartbeat CSV.*,[0-9])", RegexOptions.Compiled),
31+
new Regex(@"([\r\n]+)?(L[0-9]: .*)", RegexOptions.Compiled),
32+
new Regex(@"([\r\n]+)?(Kinematic body only supports Speculative Continuous collision detection)", RegexOptions.Compiled)
33+
};
34+
35+
private static void LibcHelper_Format_Postfix(ref string __result)
36+
{
37+
bool match = false;
38+
foreach (Regex pattern in DirtyRegexPatterns)
39+
{
40+
if (pattern.IsMatch(__result))
41+
{
42+
__result = pattern.Replace(__result, string.Empty).Trim();
43+
match = true;
44+
}
45+
}
46+
47+
// if our filtering resulted in an empty string, return null so that MirrorInternalLogs will skip the line
48+
if (match && string.IsNullOrWhiteSpace(__result))
49+
{
50+
__result = null;
51+
}
52+
}
53+
}
54+
}

0 commit comments

Comments
 (0)