diff --git a/Dustbin/Dustbin.cs b/Dustbin/Dustbin.cs index 9330d3d..d9c9b79 100644 --- a/Dustbin/Dustbin.cs +++ b/Dustbin/Dustbin.cs @@ -20,7 +20,7 @@ public class Dustbin : BaseUnityPlugin, IModCanSave, IMultiplayerMod public new static readonly BepInEx.Logging.ManualLogSource Logger = BepInEx.Logging.Logger.CreateLogSource(PluginInfo.PLUGIN_NAME); - public static readonly int[] SandsFactors = new int[12001]; + private static readonly int[] SandsFactors = new int[12001]; public bool CheckVersion(string hostVersion, string clientVersion) { diff --git a/LogisticMiner/LogisticMiner.cs b/LogisticMiner/LogisticMiner.cs index a774f05..28eba56 100644 --- a/LogisticMiner/LogisticMiner.cs +++ b/LogisticMiner/LogisticMiner.cs @@ -91,7 +91,10 @@ public class LogisticMiner : BaseUnityPlugin { _miningSpeedScaleByTech = GameMain.history.miningSpeedScale; _miningSpeedScaleLong = (long)(_miningSpeedScaleByTech * 100); - _miningFrames = 120f / _miningSpeedScaleByTech; + lock (PlanetVeinCacheData) + { + _miningFrames = 120f / _miningSpeedScaleByTech; + } } [HarmonyPostfix] diff --git a/MechaDronesTweaks/MechaDronesTweaks.cs b/MechaDronesTweaks/MechaDronesTweaks.cs index bc8273a..19fd77d 100644 --- a/MechaDronesTweaks/MechaDronesTweaks.cs +++ b/MechaDronesTweaks/MechaDronesTweaks.cs @@ -65,8 +65,8 @@ public class MechaDronesTweaksPlugin : BaseUnityPlugin public static class MechaDronesTweaks { - public static bool UseFixedSpeed = false; - public static bool SkipStage1 = false; + public static bool UseFixedSpeed; + public static bool SkipStage1; public static bool RemoveSpeedLimitForStage1 = true; public static float FixedSpeed = 300f; public static float SpeedMultiplier = 4f; diff --git a/OCBatchBuild/OrbitalCollectorBatchBuild.cs b/OCBatchBuild/OrbitalCollectorBatchBuild.cs index bfd554c..0e501bd 100644 --- a/OCBatchBuild/OrbitalCollectorBatchBuild.cs +++ b/OCBatchBuild/OrbitalCollectorBatchBuild.cs @@ -13,7 +13,7 @@ public class OrbitalCollectorBatchBuild : BaseUnityPlugin private bool _cfgEnabled = true; private static int _maxBuildCount; - private static bool _instantBuild = false; + private static bool _instantBuild; private void Awake() { diff --git a/OverclockEverything/BeltFix.cs b/OverclockEverything/BeltFix.cs index 606958b..c56c270 100644 --- a/OverclockEverything/BeltFix.cs +++ b/OverclockEverything/BeltFix.cs @@ -58,7 +58,7 @@ public static class BeltFix [HarmonyPatch(typeof(ConnGizmoRenderer), "Update")] public static IEnumerable ConnGizmoRenderer_Update_Transpiler(IEnumerable instructions, ILGenerator generator) { - bool lastIsLdcI4_3 = false; + var lastIsLdcI4_3 = false; foreach (var instr in instructions) { if (lastIsLdcI4_3) diff --git a/OverclockEverything/OverclockEverything.cs b/OverclockEverything/OverclockEverything.cs index c55f387..69c6be8 100644 --- a/OverclockEverything/OverclockEverything.cs +++ b/OverclockEverything/OverclockEverything.cs @@ -18,7 +18,7 @@ public class Patch : BaseUnityPlugin, IModCanSave BepInEx.Logging.Logger.CreateLogSource(PluginInfo.PLUGIN_NAME); private const ushort SaveVersion = 1; - private static bool _initialized = false; + private static bool _initialized; public static Cfg Cfg = new(); private static Cfg _oldCfg;