Skip to content
Snippets Groups Projects
Commit ecbf0bbd authored by baletiballo's avatar baletiballo
Browse files

Auto Formatting and some comments

parent 0f242526
No related branches found
No related tags found
No related merge requests found
Pipeline #6499 passed
using System.Collections.Generic; using System.Collections;
using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
...@@ -138,7 +139,11 @@ public IEnumerator UpdateServerStatus(bool skipIfAlreadyChecked = false) ...@@ -138,7 +139,11 @@ public IEnumerator UpdateServerStatus(bool skipIfAlreadyChecked = false)
} }
/// <summary> /// <summary>
/// Gather the <see cref="ServerSlotData"/> of all <see cref="ServerSlot"/> in one place, so one can iterate over all of them /// Gather the <see cref="ServerSlotData"/> of all <see cref="ServerSlot"/> in one place, so one can iterate over all of them.<br/>
/// <remarks><list type="bullet">
/// <item><seealso cref="LastIP"/>, <seealso cref="SelecIP"/> and alike offer more compact access to the domains.</item>
/// <item>Accessing other data in this Dict is kind of ugly, but I cannot think of a much better way to implement it, as it shoud be iteratable and indexable.</item>
/// </list> </remarks>
/// </summary> /// </summary>
public static Dictionary<ServerSlot, ServerSlotData> ServerSlots = new() public static Dictionary<ServerSlot, ServerSlotData> ServerSlots = new()
{ {
...@@ -149,7 +154,6 @@ public IEnumerator UpdateServerStatus(bool skipIfAlreadyChecked = false) ...@@ -149,7 +154,6 @@ public IEnumerator UpdateServerStatus(bool skipIfAlreadyChecked = false)
{ ServerSlot.slot3, new ServerSlotData("- GO TO -> 'Options'") }, { ServerSlot.slot3, new ServerSlotData("- GO TO -> 'Options'") },
{ ServerSlot.slot4, new ServerSlotData("- -> 'Reset Options'") }, { ServerSlot.slot4, new ServerSlotData("- -> 'Reset Options'") },
{ ServerSlot.slot5, new ServerSlotData("- -> PRESS: 'Reset Configurations'") }, { ServerSlot.slot5, new ServerSlotData("- -> PRESS: 'Reset Configurations'") },
{ServerSlot.selecIP, new ServerSlotData("") }
{ ServerSlot.selecIP, new ServerSlotData("") }, { ServerSlot.selecIP, new ServerSlotData("") },
{ ServerSlot.localServer, new ServerSlotData(ServerAddressLocal) } { ServerSlot.localServer, new ServerSlotData(ServerAddressLocal) }
}; };
...@@ -171,10 +175,12 @@ public static IEnumerator UpdateAllServers() ...@@ -171,10 +175,12 @@ public static IEnumerator UpdateAllServers()
//Enum.GetNames(typeof(KnownServers)).Length; //Number of known Server slots, to be able to add more later //Enum.GetNames(typeof(KnownServers)).Length; //Number of known Server slots, to be able to add more later
/* /*
* will be loaded from other config file * will be loaded from other config file,
* ,and I am not going to refactor all of this as well, so just an indirection * and I am not going to refactor all of this as well, so just an indirection.
* *
* Also those are domain names (+ port) not IPs * LastIP and SelecIP are likely useful shortcuts to the most relevant parts of 'ServerSlots' above, anyway.
*
* (Also those are domain names (+ port) not IPs)
*/ */
public static string LastIP { get => ServerSlots[ServerSlot.last].domain; set => ServerSlots[ServerSlot.last].domain = value; } public static string LastIP { get => ServerSlots[ServerSlot.last].domain; set => ServerSlots[ServerSlot.last].domain = value; }
public static string NewIP { get => ServerSlots[ServerSlot.newIP].domain; set => ServerSlots[ServerSlot.newIP].domain = value; } public static string NewIP { get => ServerSlots[ServerSlot.newIP].domain; set => ServerSlots[ServerSlot.newIP].domain = value; }
......
...@@ -6,22 +6,6 @@ ...@@ -6,22 +6,6 @@
public class WaitingForLocalMMT : MonoBehaviour public class WaitingForLocalMMT : MonoBehaviour
{ {
private void Start()
{
//StartCoroutine(ServerRoutine());
}
private void Update()
{
}
private void OnEnable() private void OnEnable()
{ {
StartCoroutine(ServerRoutine()); StartCoroutine(ServerRoutine());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment