Skip to content

Commit 86c76da

Browse files
committed
Release 1.0.1
1 parent 1c15188 commit 86c76da

File tree

3 files changed

+6
-19
lines changed

3 files changed

+6
-19
lines changed

Logless.cs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System.Linq;
55
using System.Reflection;
66
using BepInEx;
7-
using BepInEx.Logging;
87
using HarmonyLib;
98

109
namespace Logless
@@ -15,18 +14,10 @@ namespace Logless
1514
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
1615
public class Plugin : BaseUnityPlugin
1716
{
18-
// Using GUID for the Harmony instance, so that we can unpatch just this plugin if needed
1917
private readonly Assembly _assembly = Assembly.GetExecutingAssembly();
2018
private readonly Harmony _harmony = new(PluginInfo.PLUGIN_GUID);
21-
22-
internal new static ManualLogSource Logger;
23-
24-
// When the plugin is loaded
19+
2520
public void Awake() {
26-
// Create masking Logger as internal to use more easily in code
27-
Logger = base.Logger;
28-
29-
// Inject custom js and patch c#
3021
try {
3122
Patch();
3223
}
@@ -35,12 +26,9 @@ public void Awake() {
3526
throw;
3627
}
3728

38-
// All done!
3929
Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!");
4030
}
4131

42-
// Unpatch if plugin is destroyed to handle in-game plugin reloads
43-
// Remove files we created
4432
public void OnDestroy() {
4533
UnPatch();
4634
}
@@ -49,7 +37,6 @@ private void Patch() {
4937
_harmony.PatchAll(_assembly);
5038
}
5139

52-
// Undoes what Patch() did
5340
private void UnPatch() {
5441
_harmony.UnpatchSelf();
5542
}
@@ -76,7 +63,7 @@ private static IEnumerable<MethodBase> TargetMethods()
7663
}
7764

7865
[HarmonyPrefix]
79-
private static bool Prefix(MethodBase __originalMethod) {
66+
private static bool Prefix() {
8067
return false;
8168
}
8269
}
@@ -102,7 +89,7 @@ private static IEnumerable<MethodBase> TargetMethods()
10289
}
10390

10491
[HarmonyPrefix]
105-
private static bool Prefix(MethodBase __originalMethod) {
92+
private static bool Prefix() {
10693
return false;
10794
}
10895
}

Logless.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<PropertyGroup>
33
<TargetFramework>netstandard2.0</TargetFramework>
44
<AssemblyName>Logless</AssemblyName>
5-
<Description>This Logless mod</Description>
6-
<Version>1.0.0</Version>
5+
<Description>Removes all logs from the game</Description>
6+
<Version>1.0.1</Version>
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
88
<LangVersion>latest</LangVersion>
99
<PackageId>ltd2.mods.Kidev.Logless</PackageId>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Logless
22

3-
Bye bye logs
3+
Removes all logs from the game

0 commit comments

Comments
 (0)