44using System . Linq ;
55using System . Reflection ;
66using BepInEx ;
7- using BepInEx . Logging ;
87using HarmonyLib ;
98
109namespace 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 }
0 commit comments