/// <summary> /// Save all mod and user settings. Use this instead of UserIO.SaveHandler(false, true) /// </summary> /// <returns>The routine enumerator.</returns> public static IEnumerator SaveSettings() { bool saving = true; RunThread.Start(() => { Invoke("SaveSettings"); saving = false; }, "MOD_IO", false); SaveLoadIcon.Show(Engine.Scene); while (saving) { yield return(null); } yield return(UserIO.SaveHandler(false, true)); SaveLoadIcon.Hide(); }
public override void Begin() { base.Begin(); targetSID = CollabModule.Instance.Session.LobbySID; targetRoom = CollabModule.Instance.Session.LobbyRoom; targetSpawnPoint = new Vector2(CollabModule.Instance.Session.LobbySpawnPointX, CollabModule.Instance.Session.LobbySpawnPointY); CollabModule.Instance.Session.LobbySID = null; CollabModule.Instance.Session.LobbyRoom = null; CollabModule.Instance.Session.LobbySpawnPointX = 0; CollabModule.Instance.Session.LobbySpawnPointY = 0; CollabModule.Instance.Session.SaveAndReturnToLobbyAllowed = false; SaveLoadIcon.Show(this); Entity coroutineHolder; Add(coroutineHolder = new Entity()); coroutineHolder.Add(new Coroutine(Routine())); Stats.Store(); RendererList.UpdateLists(); }
private static IEnumerator _SaveSettings() { bool saving = true; RunThread.Start(() => { foreach (EverestModule mod in _Modules) { mod.SaveSettings(); } saving = false; }, "MOD_IO", false); SaveLoadIcon.Show(Engine.Scene); while (saving) { yield return(null); } yield return(patch_UserIO.SaveHandlerLegacy(false, true)); SaveLoadIcon.Hide(); _SavingSettings = false; }