fix(breaking): better handling of the server rotation config

The config path was also changed to `BepInEx/config/GBSU/config.json`

Tracks the -maplist argument
This commit is contained in:
anavoi 2025-07-13 23:32:42 +02:00
commit 8132f69ed2
8 changed files with 69 additions and 14 deletions

View file

@ -6,7 +6,7 @@ using UnityEngine.Analytics;
namespace GBSU.Addons;
public class Helper
{
public static string RotationFolderPath = Application.dataPath + "/Config/Rotation/";
public static string RotationFolderPath = BepInEx.Paths.BepInExRootPath + "/config/GBSU/";
public static string GameConfigPath = RotationFolderPath + "config.json";
public static string serverip = null;
public static int serverport = 5999;
@ -72,4 +72,14 @@ public class Helper
QualitySettings.vSyncCount = 0;
}
}
public static void CheckCustomRotationPath()
{
// Did the host request to use their own rotation config path?
if (CommandLineParser.Instance.KeyExists("-maplist"))
{
GameConfigPath = CommandLineParser.Instance.GetValueForKey("-maplist");
Plugin.Log.LogInfo("Set custom rotation config path at " + GameConfigPath);
}
}
}