using KCM.Packets.Game; using KCM.Packets.Handlers; using KCM.Packets.Lobby; using Riptide.Demos.Steam.PlayerHosted; using Steamworks; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using TMPro; using UnityEngine; using UnityEngine.UI; namespace KCM { public class ServerLobbyScript : MonoBehaviour { public static ServerEntryScript serverDetails { get; set; } public static Transform PlayerListContent { get; set; } public static Transform PlayerChatContent { get; set; } public static Button StartGameButton { get; set; } public static TMP_InputField ChatInput { get; set; } public static Button ChatSendButton { get; set; } public static TMP_InputField ServerName { get; set; } public static TMP_InputField MaxPlayers { get; set; } public static Toggle Locked { get; set; } public static TMP_InputField Password { get; set; } public static TMP_Dropdown Difficulty { get; set; } public static TMP_InputField WorldSeed { get; set; } public static Button NewWorldButton { get; set; } public static TMP_Dropdown WorldSize { get; set; } public static TMP_Dropdown WorldType { get; set; } public static TMP_Dropdown WorldRivers { get; set; } public static TMP_Dropdown PlacementType { get; set; } public static Toggle FogOfWarToggle { get; set; } public static ServerLobbyScript inst { get; set; } public static GameObject LoadingSave { get; set; } public static Image ProgressBar { get; set; } public static TextMeshProUGUI ProgressBarText { get; set; } public static TextMeshProUGUI ProgressText { get; set; } enum Difficulties { Paxlon, Sommern, Vintar, Falle } public void Start() { Main.helper.Log("ServerLobby start called"); inst = this; } public void Awake() { Main.helper.Log("ServerLobby awake called"); try { inst = this; PlayerListContent = transform.Find("Container/PlayerList/Viewport/Content"); Main.helper.Log(PlayerListContent.ToString()); PlayerChatContent = transform.Find("Container/PlayerChat/Viewport/Content"); Main.helper.Log(PlayerChatContent.ToString()); ChatInput = transform.Find("Container/TextMeshPro - InputField").GetComponent(); Main.helper.Log(ChatInput.ToString()); ChatSendButton = transform.Find("Container/SendMessage").GetComponent