diff --git a/Main.cs b/Main.cs index 2bf4cdf..4e3c59a 100644 --- a/Main.cs +++ b/Main.cs @@ -7,7 +7,10 @@ using KCM.Packets.Lobby; using KCM.Packets.Network; using KCM.Packets.State; using KCM.StateManagement.Observers; +using KCM.StateManagement.Sync; +using KCM.StateManagement.BuildingState; using Riptide; +using Riptide.Utils; using Steamworks; using System; using System.Collections.Generic; @@ -24,6 +27,10 @@ namespace KCM public static Harmony harmony = new Harmony("com.kcm.mod"); public static Helper helper; public static Dictionary kCPlayers = new Dictionary(); + public static Dictionary clientSteamIds = new Dictionary(); + + public static SteamClient steamClient; + public static SteamServer steamServer; public static string PlayerSteamID => SteamUser.GetSteamID().ToString(); @@ -49,12 +56,31 @@ namespace KCM public static void ClientUpdate() { - if (!KCClient.IsConnected) + if (!KCClient.client.IsConnected) return; // Handle client-side updates } + public static void TransitionTo(string scene) + { + // Simple scene transition + UnityEngine.SceneManagement.SceneManager.LoadScene(scene); + } + + public static void ResetMultiplayerState() + { + // Reset multiplayer state + kCPlayers.Clear(); + clientSteamIds.Clear(); + } + + public static void SetMultiplayerSaveLoadInProgress(bool inProgress) + { + // Set save/load progress flag + // Implementation depends on UI + } + public static int FixedUpdateInterval = 0; private void FixedUpdate()