public override void Run(string[] args) { if (!SynchronizationManager.Instance.PlayerIsAdmin) { Console.instance.Print($"You are not an admin!"); return; } int count = 0; foreach (var timer in Timer.Each) { if (Player.m_localPlayer == null || timer.dungeon == null) { continue; } ++count; Console.instance.Print($"Forcing regeneration of Dungeon '{timer.dungeon.GetCleanName()}', resetting now!"); Dungeons.Reset(timer.dungeon); } if (count < 1) { Console.instance.Print($"Could't find loaded dungeons!"); } else { Console.instance.Print($"Forced a total of {count} dungeons to reset!"); } }
public static void DungeonGenerator_Load_Post(DungeonGenerator __instance) { Main.Log.LogInfo($"Loaded dungeon '{__instance.GetCleanName()}' with theme {__instance.m_themes}\n"); if (Configs.AllowedThemes.Value.Contains(__instance.m_themes.ToString())) { Dungeons.OnDungeonLoad(__instance); } }
public override void Run(string[] args) { if (!SynchronizationManager.Instance.PlayerIsAdmin) { Console.instance.Print($"You are not an admin!"); return; } var closest = GetClosest(); if (closest == null) { Console.instance.Print($"No dungeon found!"); return; } Console.instance.Print($"Forcing regeneration of Dungeon '{closest.GetCleanName()}', resetting now!"); Dungeons.Reset(closest); }
public static void ZNet_OnDestroy_Post() => Dungeons.UnscheduleAll();