refactor: wip

This commit is contained in:
anavoi 2025-07-13 16:16:41 +02:00
commit 0cb7131435
5 changed files with 69 additions and 45 deletions

View file

@ -1,3 +1,6 @@
using CoreNet.Config;
using GB.Config;
using GB.Core;
using GB.Game;
using HarmonyLib;
using UnityEngine;
@ -29,6 +32,13 @@ public class GBSUServer : MonoBehaviour
localSingleGang?.SetValue(false);
}
public static void StartServer()
{
RotationConfig gameConfig = GBConfigLoader.LoadRotationConfig("config.json", true); // load rotation config from Config/Rotation/config.json
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
}
/*
public string GetRemainingRoundTime()
{