diff --git a/ModSync.Server/src/config.ts b/ModSync.Server/src/config.ts index c3d097f..0b8d656 100644 --- a/ModSync.Server/src/config.ts +++ b/ModSync.Server/src/config.ts @@ -43,7 +43,7 @@ const DEFAULT_CONFIG = `{ // Fika "user/mods/fika-server/types", "user/mods/fika-server/cache", - "BepInEx/plugins/Fika.Dedicated.dll", + "BepInEx/plugins/Fika.Headless.dll", // Live Flea Prices "user/mods/zzDrakiaXYZ-LiveFleaPrices/config", // Questing Bots diff --git a/ModSync/Plugin.cs b/ModSync/Plugin.cs index 0291869..5e2ba6d 100644 --- a/ModSync/Plugin.cs +++ b/ModSync/Plugin.cs @@ -33,7 +33,7 @@ public class Plugin : BaseUnityPlugin private static readonly string LOCAL_EXCLUSIONS_PATH = Path.Combine(MODSYNC_DIR, "Exclusions.json"); private static readonly string UPDATER_PATH = Path.Combine(Directory.GetCurrentDirectory(), "ModSync.Updater.exe"); - private static readonly List DEDICATED_DEFAULT_EXCLUSIONS = + private static readonly List HEADLESS_DEFAULT_EXCLUSIONS = [ "BepInEx/plugins/AmandsGraphics.dll", "BepInEx/plugins/AmandsSense.dll", @@ -80,11 +80,11 @@ public class Plugin : BaseUnityPlugin + createdDirectories[syncPath.path].Count ) .Sum(); - private static bool IsDedicated => Chainloader.PluginInfos.ContainsKey("com.fika.dedicated"); + private static bool IsHeadless => Chainloader.PluginInfos.ContainsKey("com.fika.headless"); private List EnabledSyncPaths => syncPaths.Where(syncPath => configSyncPathToggles[syncPath.path].Value || syncPath.enforced).ToList(); private bool SilentMode => - IsDedicated + IsHeadless || EnabledSyncPaths.All(syncPath => syncPath.silent || ( @@ -215,7 +215,7 @@ private async Task SyncMods(SyncPathFileList filesToAdd, SyncPathFileList filesT totalDownloadCount = downloadTasks.Count; - if (!IsDedicated) + if (!IsHeadless) progressWindow.Show(); while (downloadTasks.Count > 0 && !cts.IsCancellationRequested) @@ -233,7 +233,7 @@ private async Task SyncMods(SyncPathFileList filesToAdd, SyncPathFileList filesT cts.Cancel(); progressWindow.Hide(); - if (!IsDedicated) + if (!IsHeadless) downloadErrorWindow.Show(); } @@ -255,7 +255,7 @@ private async Task SyncMods(SyncPathFileList filesToAdd, SyncPathFileList filesT Directory.Delete(PENDING_UPDATES_DIR, true); pluginFinished = true; } - else if (!IsDedicated) + else if (!IsHeadless) restartWindow.Show(); else StartUpdaterProcess(); @@ -284,7 +284,7 @@ private void StartUpdaterProcess() { List options = []; - if (IsDedicated) + if (IsHeadless) options.Add("--silent"); Logger.LogInfo($"Starting Updater with arguments {string.Join(" ", options)} {Process.GetCurrentProcess().Id}"); @@ -412,17 +412,17 @@ private IEnumerator StartPlugin() } Logger.LogDebug("Loading local exclusions"); - if (IsDedicated && !VFS.Exists(LOCAL_EXCLUSIONS_PATH)) + if (IsHeadless && !VFS.Exists(LOCAL_EXCLUSIONS_PATH)) { try { - VFS.WriteTextFile(LOCAL_EXCLUSIONS_PATH, Json.Serialize(DEDICATED_DEFAULT_EXCLUSIONS)); + VFS.WriteTextFile(LOCAL_EXCLUSIONS_PATH, Json.Serialize(HEADLESS_DEFAULT_EXCLUSIONS)); } catch (Exception e) { Logger.LogError(e); Chainloader.DependencyErrors.Add( - $"Could not load {Info.Metadata.Name} due to error writing local exclusions file for dedicated client. Please check BepInEx/LogOutput.log for more information." + $"Could not load {Info.Metadata.Name} due to error writing local exclusions file for headless client. Please check BepInEx/LogOutput.log for more information." ); yield break; } diff --git a/README.md b/README.md index e37fd33..8c7cf23 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ This project allows clients to easily add/update/remove mods, keeping them in sy > The ModSync Updater (client-only) requires the > [.NET 8.0 runtime](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-8.0.11-windows-x64-installer). -> If you use the launcher, you'll have it, but dedicated clients may need to manually install it. +> If you use the launcher, you'll have it, but headless clients may need to manually install it. 1. Download the latest version of the mod from the [GitHub Releases](https://github.com/c-orter/modsync/releases) page 2. Extract into your SPT folder like any other mod