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

@ -34,7 +34,7 @@ public class GBSUServer : MonoBehaviour
public static void StartServer()
{
RotationConfig gameConfig = GBConfigLoader.LoadRotationConfig("config.json", true); // load rotation config from Config/Rotation/config.json
RotationConfig gameConfig = GBConfigLoader.LoadRotationConfig(null); // the argument doesn't matter as we do stuff in the method
ServerConfig serverConfig = NetConfigLoader.LoadServerConfig(); // load default server config, because it can be overridden by args like -ip and -port
MonoSingleton<Global>.Instance.UNetManager.LaunchServer(serverConfig); // launch the server with the server config
MonoSingleton<Global>.Instance.UNetManager.GetComponent<GameManagerNew>().ChangeRotationConfig(gameConfig, 0); // set server's rotationconfig