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:
parent
4771a41fa7
commit
8132f69ed2
8 changed files with 69 additions and 14 deletions
|
|
@ -11,11 +11,11 @@ namespace GBSU.Addons;
|
|||
public class GBSUGui : MonoBehaviour
|
||||
{
|
||||
private bool menu_shown;
|
||||
private bool error_shown;
|
||||
private static bool error_shown;
|
||||
//private string _currentMap;
|
||||
public Rect gmenu = new(Screen.width / 2, 0, 385f, 690f);
|
||||
public Rect error_dialog = new(Screen.width / 2, 0, 520f, 175f);
|
||||
private string error_msg = "Unknown error!";
|
||||
private static string error_msg = "Unknown error!";
|
||||
|
||||
readonly IInputSystem inputSystem = UnityInput.Current;
|
||||
private void Update()
|
||||
|
|
@ -46,7 +46,7 @@ public class GBSUGui : MonoBehaviour
|
|||
GUI.skin.label.alignment = TextAnchor.UpperLeft;
|
||||
|
||||
GUILayout.Label($@"==Guide==
|
||||
Set CLI arguments: -ip, -port
|
||||
Set CLI arguments: -ip, -port (optionally -maplist)
|
||||
|
||||
[Hosting]
|
||||
1. Create a config in Gang Beasts_Data/Config/Rotation/config.json
|
||||
|
|
@ -65,7 +65,7 @@ Set CLI arguments: -ip, -port
|
|||
{
|
||||
if (LobbyManager.Instance.LobbyStates.SelfState == LobbyState.Game.Menu)
|
||||
{
|
||||
if (File.Exists(Helper.RotationFolderPath + "config.json"))
|
||||
if (File.Exists(Helper.GameConfigPath))
|
||||
{
|
||||
Helper.hosting = true;
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ Please refer to the documentation for more information.");
|
|||
return null;
|
||||
}
|
||||
|
||||
private void PushError(string message)
|
||||
public static void PushError(string message)
|
||||
{
|
||||
Plugin.Log.LogError(message);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue