diff --git a/MuzikaGromche/MuzikaGromche.csproj b/MuzikaGromche/MuzikaGromche.csproj
index 1f1886a..9c8e7f3 100644
--- a/MuzikaGromche/MuzikaGromche.csproj
+++ b/MuzikaGromche/MuzikaGromche.csproj
@@ -41,6 +41,7 @@
diff --git a/MuzikaGromche/Plugin.cs b/MuzikaGromche/Plugin.cs
index 36cf926..03572a6 100644
--- a/MuzikaGromche/Plugin.cs
+++ b/MuzikaGromche/Plugin.cs
@@ -1,7 +1,5 @@
using BepInEx;
using BepInEx.Configuration;
-using CSync.Extensions;
-using CSync.Lib;
using HarmonyLib;
using LethalConfig;
using LethalConfig.ConfigItems;
@@ -21,10 +19,17 @@ using Unity.Netcode;
using UnityEngine;
using UnityEngine.Networking;
+#if DEBUG
+using CSync.Extensions;
+using CSync.Lib;
+#endif
+
namespace MuzikaGromche
{
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
+#if DEBUG
[BepInDependency("com.sigurd.csync", "5.0.1")]
+#endif
[BepInDependency("ainavt.lc.lethalconfig", "1.4.6")]
[BepInDependency("watergun.v72lightfix", BepInDependency.DependencyFlags.SoftDependency)]
[BepInDependency("BMX.LobbyCompatibility", BepInDependency.DependencyFlags.HardDependency)]
@@ -1433,6 +1438,7 @@ namespace MuzikaGromche
readonly public int TotalWeights { get; }
}
+#if DEBUG
static class SyncedEntryExtensions
{
// Update local values on clients. Even though the clients couldn't
@@ -1445,8 +1451,12 @@ namespace MuzikaGromche
};
}
}
+#endif
- class Config : SyncedConfig2
+ class Config
+#if DEBUG
+ : SyncedConfig2
+#endif
{
public static ConfigEntry DisplayLyrics { get; private set; } = null!;
@@ -1469,7 +1479,10 @@ namespace MuzikaGromche
public static float? ColorTransitionOutOverride { get; private set; } = null;
public static string? ColorTransitionEasingOverride { get; private set; } = null;
- internal Config(ConfigFile configFile) : base(PluginInfo.PLUGIN_GUID)
+ internal Config(ConfigFile configFile)
+#if DEBUG
+ : base(PluginInfo.PLUGIN_GUID)
+#endif
{
DisplayLyrics = configFile.Bind("General", "Display Lyrics", true,
new ConfigDescription("Display lyrics in the HUD tooltip when you hear the music."));
@@ -1537,9 +1550,12 @@ namespace MuzikaGromche
LethalConfigManager.AddConfigItem(new IntSliderConfigItem(track.Weight, Default(new IntSliderOptions())));
}
+#if DEBUG
ConfigManager.Register(this);
+#endif
}
+#if DEBUG
// HACK because CSync doesn't provide an API to register a list of config entries
// See https://github.com/lc-sigurd/CSync/issues/11
private void CSyncHackAddSyncedEntry(SyncedEntryBase entryBase)
@@ -1547,6 +1563,7 @@ namespace MuzikaGromche
// This is basically what ConfigFile.PopulateEntryContainer does
EntryContainer.Add(entryBase.BoxedEntry.ToSyncedEntryIdentifier(), entryBase);
}
+#endif
public static CanModifyResult CanModifyIfHost()
{
@@ -1582,6 +1599,7 @@ namespace MuzikaGromche
return CanModifyResult.True();
}
+#if DEBUG
private void SetupEntriesToSkipWinding(ConfigFile configFile)
{
var syncedEntry = configFile.BindSyncedEntry("General", "Skip Winding Phase", false,
@@ -1789,6 +1807,7 @@ namespace MuzikaGromche
}
}
}
+#endif
private T Default(T options) where T : BaseOptions
{
diff --git a/README.md b/README.md
index 1618a6c..04cd753 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ To keep it a surprise, it is adviced that you do not read the detailed descripti
Muzika Gromche is compatible with *Almost Vanilla™* gameplay and [*High Quota Mindset*](https://youtu.be/18RUCgQldGg?t=2553). It slightly changes certain timers, so won't be compatible with leaderboards. If you are a streamer™, be aware that it does play *copyrighted content.*
-Muzika Gromche works with all Lethal Company versions from v72 all the way back to v40, and is likely to work on all future versions as long as dependencies ([`CSync`] and [`LethalConfig`]) are working.
+Muzika Gromche works with all Lethal Company versions from v72 all the way back to v40, and is likely to work on all future versions as long as dependencies ([`LethalConfig`] and [`LobbyCompatibility`]) are working.
Speaking of dependencies, [`V70PoweredLights_Fix`] is not strictly required, but it doesn't hurt to have it installed on any version, and it makes this mod more enjoyable on new Mansion tiles.
@@ -38,4 +38,5 @@ Any player can change their personal preferences locally.
[`CSync`]: https://thunderstore.io/c/lethal-company/p/Sigurd/CSync/
[`LethalConfig`]: https://thunderstore.io/c/lethal-company/p/AinaVT/LethalConfig/
+[`LobbyCompatibility`]: https://thunderstore.io/c/lethal-company/p/BMX/LobbyCompatibility/
[`V70PoweredLights_Fix`]: https://thunderstore.io/c/lethal-company/p/WaterGun/V70PoweredLights_Fix/
diff --git a/manifest.json b/manifest.json
index 5b60aef..7e42c61 100644
--- a/manifest.json
+++ b/manifest.json
@@ -6,7 +6,6 @@
"website_url": "https://git.vilunov.me/ratijas/muzika-gromche",
"dependencies": [
"BepInEx-BepInExPack-5.4.2100",
- "Sigurd-CSync-5.0.1",
"AinaVT-LethalConfig-1.4.6",
"WaterGun-V70PoweredLights_Fix-1.0.0",
"BMX-LobbyCompatibility-1.5.1"