public override void OnEnter() { TutorialManager = new Tutorial.TutorialManager(); IsInitialized = true; DwarfTime.LastTime.Speed = 1.0f; IndicatorManager.SetupStandards(); DwarfGame.GumInputMapper.GetInputQueue(); GuiRoot = new Gui.Root(DwarfGame.GuiSkin); Tip = GuiRoot.RootItem.AddChild(new Gui.Widget { Font = "font10", TextColor = new Vector4(1, 1, 1, 1), MinimumSize = new Point(0, 64), TextHorizontalAlign = Gui.HorizontalAlign.Center, TextVerticalAlign = Gui.VerticalAlign.Center, Text = "Press any key to jump!", AutoLayout = Gui.AutoLayout.DockBottom, Background = new Gui.TileReference("basic", 0), BackgroundColor = new Vector4(0, 0, 0, 0.5f), InteriorMargin = new Gui.Margin(0, 0, 15, 15) }); LoadTicker = GuiRoot.RootItem.AddChild(new Gui.Widgets.InfoTicker { Font = "font8", AutoLayout = Gui.AutoLayout.DockFill, TextColor = new Vector4(1, 1, 1, 1) }) as Gui.Widgets.InfoTicker; GuiRoot.RootItem.Layout(); if (Settings.GenerateFromScratch) { Generator = new WorldGenerator(Settings) { Seed = MathFunctions.Random.Next() }; Generator.Generate(); } else { CreateWorld(); } base.OnEnter(); }
public static void Load() { PersistentOperations.SetInstallFolder(); if (!DiscordBot.TokenLoaded) { DiscordBot.BuildToken(); } if (!RunTimePatch.Applied) { RunTimePatch.PatchAll(); } if (!Timers.IsRunning) { Timers.TimerStart(); } if (!Triggers.IsRunning) { Triggers.Load(); } if (Poll.IsEnabled && PersistentContainer.Instance.PollOpen) { Poll.CheckTime(); } if (!ClanManager.IsEnabled) { ClanManager.Clans.Clear(); ClanManager.ClanMember.Clear(); } if (!InfoTicker.IsEnabled && InfoTicker.IsRunning) { InfoTicker.Unload(); } if (InfoTicker.IsEnabled && !InfoTicker.IsRunning) { InfoTicker.Load(); } if (Gimme.IsRunning && !Gimme.IsEnabled) { Gimme.Unload(); } if (!Gimme.IsRunning && Gimme.IsEnabled) { Gimme.Load(); } if (Badwords.IsRunning && !Badwords.IsEnabled) { Badwords.Unload(); } if (!Badwords.IsRunning && Badwords.IsEnabled) { Badwords.Load(); } if (!LoginNotice.IsRunning && LoginNotice.IsEnabled) { LoginNotice.Load(); } if (LoginNotice.IsRunning && !LoginNotice.IsEnabled) { LoginNotice.Unload(); } if (!Zones.IsRunning && Zones.IsEnabled) { Zones.Load(); } if (Zones.IsRunning && !Zones.IsEnabled) { Zones.Unload(); } if (!VoteReward.IsRunning && VoteReward.IsEnabled) { VoteReward.Load(); } if (VoteReward.IsRunning && !VoteReward.IsEnabled) { VoteReward.Unload(); } if (!Watchlist.IsRunning && Watchlist.IsEnabled) { Watchlist.Load(); } if (Watchlist.IsRunning && !Watchlist.IsEnabled) { Watchlist.Unload(); } if (!ReservedSlots.IsRunning && ReservedSlots.IsEnabled) { ReservedSlots.Load(); } if (ReservedSlots.IsRunning && !ReservedSlots.IsEnabled) { ReservedSlots.Unload(); } if (!StartingItems.IsRunning && StartingItems.IsEnabled) { StartingItems.Load(); } if (StartingItems.IsRunning && !StartingItems.IsEnabled) { StartingItems.Unload(); } if (!Travel.IsRunning && Travel.IsEnabled) { Travel.Load(); } if (Travel.IsRunning && !Travel.IsEnabled) { Travel.Unload(); } if (!Shop.IsRunning && Shop.IsEnabled) { Shop.Load(); } if (Shop.IsRunning && !Shop.IsEnabled) { Shop.Unload(); } if (!Motd.IsRunning && Motd.IsEnabled) { Motd.Load(); } if (Motd.IsRunning && !Motd.IsEnabled) { Motd.Unload(); } if (InvalidItems.IsRunning && !InvalidItems.IsEnabled) { InvalidItems.Unload(); } if (!InvalidItems.IsRunning && InvalidItems.IsEnabled) { InvalidItems.Load(); } if (HighPingKicker.IsRunning && !HighPingKicker.IsEnabled) { HighPingKicker.Unload(); } if (!HighPingKicker.IsRunning && HighPingKicker.IsEnabled) { HighPingKicker.Load(); } if (CredentialCheck.IsRunning && !CredentialCheck.IsEnabled) { CredentialCheck.Unload(); } if (!CredentialCheck.IsRunning && CredentialCheck.IsEnabled) { CredentialCheck.Load(); } if (CustomCommands.IsRunning && !CustomCommands.IsEnabled) { CustomCommands.Unload(); } if (!CustomCommands.IsRunning && CustomCommands.IsEnabled) { CustomCommands.Load(); } if (DupeLog.IsRunning && !DupeLog.IsEnabled) { DupeLog.Unload(); } if (!DupeLog.IsRunning && DupeLog.IsEnabled) { DupeLog.Load(); } if (ChatColorPrefix.IsRunning && !ChatColorPrefix.IsEnabled) { ChatColorPrefix.Unload(); } if (!ChatColorPrefix.IsRunning && ChatColorPrefix.IsEnabled) { ChatColorPrefix.Load(); } if (KillNotice.IsRunning && !KillNotice.IsEnabled) { KillNotice.Unload(); } if (!KillNotice.IsRunning && KillNotice.IsEnabled) { KillNotice.Load(); } if (Prayer.IsRunning && !Prayer.IsEnabled) { Prayer.Unload(); } if (!Prayer.IsRunning && Prayer.IsEnabled) { Prayer.Load(); } if (BloodmoonWarrior.IsRunning && !BloodmoonWarrior.IsEnabled) { BloodmoonWarrior.Unload(); } else if (!BloodmoonWarrior.IsRunning && BloodmoonWarrior.IsEnabled) { BloodmoonWarrior.Load(); } if (ProtectedSpaces.IsRunning && !ProtectedSpaces.IsEnabled) { ProtectedSpaces.Unload(); } else if (!ProtectedSpaces.IsRunning && ProtectedSpaces.IsEnabled) { ProtectedSpaces.Load(); } if (ClanManager.IsEnabled) { ClanManager.ClanList(); } if (Auction.IsEnabled) { Auction.AuctionList(); } if (Mute.IsEnabled) { Mute.ClientMuteList(); Mute.MuteList(); } if (Jail.IsEnabled) { Jail.JailList(); } if (WebAPI.IsEnabled && !WebAPI.IsRunning) { WebAPI.Load(); } else if (WebAPI.IsRunning && !WebAPI.IsEnabled) { WebAPI.Unload(); } }
public static void Load() { DiscordBot.BuildToken(); if (!Timers.CoreIsRunning) { Timers.CoreTimerStart(); } if (XRayDetector.IsEnabled && !Timers.HalfSecondIsRunning) { Timers.HalfSecondTimerStart(); } if (!XRayDetector.IsEnabled && Timers.HalfSecondIsRunning) { Timers.HalfSecondTimerStop(); } if (Poll.IsEnabled && PersistentContainer.Instance.PollOpen) { Poll.CheckTime(); } if (!ClanManager.IsEnabled) { ClanManager.Clans.Clear(); ClanManager.ClanMember.Clear(); } if (!InfoTicker.IsEnabled && InfoTicker.IsRunning) { InfoTicker.Unload(); } if (InfoTicker.IsEnabled && !InfoTicker.IsRunning) { InfoTicker.Load(); } if (Gimme.IsRunning && !Gimme.IsEnabled) { Gimme.Unload(); } if (!Gimme.IsRunning && Gimme.IsEnabled) { Gimme.Load(); } if (Badwords.IsRunning && !Badwords.IsEnabled) { Badwords.Unload(); } if (!Badwords.IsRunning && Badwords.IsEnabled) { Badwords.Load(); } if (!LoginNotice.IsRunning && LoginNotice.IsEnabled) { LoginNotice.Load(); } if (LoginNotice.IsRunning && !LoginNotice.IsEnabled) { LoginNotice.Unload(); } if (!Zones.IsRunning && Zones.IsEnabled) { Zones.Load(); } if (Zones.IsRunning && !Zones.IsEnabled) { Zones.Unload(); } if (!VoteReward.IsRunning && VoteReward.IsEnabled) { VoteReward.Load(); } if (VoteReward.IsRunning && !VoteReward.IsEnabled) { VoteReward.Unload(); } if (!WatchList.IsRunning && WatchList.IsEnabled) { WatchList.Load(); } if (WatchList.IsRunning && !WatchList.IsEnabled) { WatchList.Unload(); } if (!ReservedSlots.IsRunning && ReservedSlots.IsEnabled) { ReservedSlots.Load(); } if (ReservedSlots.IsRunning && !ReservedSlots.IsEnabled) { ReservedSlots.Unload(); } if (!StartingItems.IsRunning && StartingItems.IsEnabled) { StartingItems.Load(); } if (StartingItems.IsRunning && !StartingItems.IsEnabled) { StartingItems.Unload(); } if (!Travel.IsRunning && Travel.IsEnabled) { Travel.Load(); } if (Travel.IsRunning && !Travel.IsEnabled) { Travel.Unload(); } if (!Shop.IsRunning && Shop.IsEnabled) { Shop.Load(); } if (Shop.IsRunning && !Shop.IsEnabled) { Shop.Unload(); } if (!Motd.IsRunning && Motd.IsEnabled) { Motd.Load(); } if (Motd.IsRunning && !Motd.IsEnabled) { Motd.Unload(); } if (InvalidItems.IsRunning && !InvalidItems.IsEnabled) { InvalidItems.Unload(); } if (!InvalidItems.IsRunning && InvalidItems.IsEnabled) { InvalidItems.Load(); } if (HighPingKicker.IsRunning && !HighPingKicker.IsEnabled) { HighPingKicker.Unload(); } if (!HighPingKicker.IsRunning && HighPingKicker.IsEnabled) { HighPingKicker.Load(); } if (CustomCommands.IsRunning && !CustomCommands.IsEnabled) { CustomCommands.Unload(); } if (!CustomCommands.IsRunning && CustomCommands.IsEnabled) { CustomCommands.Load(); } if (DupeLog.IsRunning && !DupeLog.IsEnabled) { DupeLog.Unload(); } if (!DupeLog.IsRunning && DupeLog.IsEnabled) { DupeLog.Load(); } if (ChatColor.IsRunning && !ChatColor.IsEnabled) { ColorList.Unload(); ChatColor.Unload(); } if (!ChatColor.IsRunning && ChatColor.IsEnabled) { ColorList.Load(); ChatColor.Load(); } if (KillNotice.IsRunning && !KillNotice.IsEnabled) { KillNotice.Unload(); } if (!KillNotice.IsRunning && KillNotice.IsEnabled) { KillNotice.Load(); } if (Prayer.IsRunning && !Prayer.IsEnabled) { Prayer.Unload(); } if (!Prayer.IsRunning && Prayer.IsEnabled) { Prayer.Load(); } if (BloodmoonWarrior.IsRunning && !BloodmoonWarrior.IsEnabled) { BloodmoonWarrior.Unload(); } else if (!BloodmoonWarrior.IsRunning && BloodmoonWarrior.IsEnabled) { BloodmoonWarrior.Load(); } if (Waypoints.IsRunning && !Waypoints.Public_Waypoints) { Waypoints.Unload(); } else if (!Waypoints.IsRunning && Waypoints.Public_Waypoints) { Waypoints.Load(); } if (LevelUp.IsRunning && !LevelUp.IsEnabled) { LevelUp.Unload(); } else if (!LevelUp.IsRunning && LevelUp.IsEnabled) { LevelUp.Load(); } if (BotResponse.IsRunning && !BotResponse.IsEnabled) { BotResponse.Unload(); } else if (!BotResponse.IsRunning && BotResponse.IsEnabled) { BotResponse.Load(); } if (ProtectedZones.IsRunning && !ProtectedZones.IsEnabled) { ProtectedZones.Unload(); } else if (!ProtectedZones.IsRunning && ProtectedZones.IsEnabled) { ProtectedZones.Load(); } if (ClanManager.IsEnabled) { ClanManager.ClanList(); } if (Auction.IsEnabled) { Auction.AuctionList(); } if (Mute.IsEnabled) { Mute.ClientMuteList(); Mute.MuteList(); } if (Jail.IsEnabled) { Jail.JailList(); } if (WebAPI.IsEnabled && !WebAPI.IsRunning) { if (!PersistentOperations.ThirtySeconds) { Log.Out("[SERVERTOOLS] Web_API will go live thirty seconds after the server finishes loading"); } else { WebAPI.Load(); } } else if (WebAPI.IsRunning && !WebAPI.IsEnabled) { WebAPI.Unload(); } }
public static void Load() { if (AutoSaveWorld.IsRunning && !AutoSaveWorld.IsEnabled) { AutoSaveWorld.Stop(); } if (!AutoSaveWorld.IsRunning && AutoSaveWorld.IsEnabled) { AutoSaveWorld.Start(); } if (Badwords.IsRunning && !Badwords.IsEnabled) { Badwords.Unload(); } if (!Badwords.IsRunning && Badwords.IsEnabled) { Badwords.Load(); } if (ClanManager.IsEnabled) { PersistentContainer.Instance.Players.GetClans(); } if (!ClanManager.IsEnabled) { PersistentContainer.Instance.Players.clans.Clear(); } if (CustomCommands.IsRunning && !CustomCommands.IsEnabled) { CustomCommands.Unload(); } if (!CustomCommands.IsRunning && CustomCommands.IsEnabled) { CustomCommands.Load(); } if (Gimme.IsRunning && !Gimme.IsEnabled) { Gimme.Unload(); } if (!Gimme.IsRunning && Gimme.IsEnabled) { Gimme.Load(); } if (HighPingKicker.IsRunning && !HighPingKicker.IsEnabled) { HighPingKicker.Unload(); } if (!HighPingKicker.IsRunning && HighPingKicker.IsEnabled) { HighPingKicker.Load(); } if (InfoTicker.IsRunning && !InfoTicker.IsEnabled) { InfoTicker.Unload(); } if (!InfoTicker.IsRunning && InfoTicker.IsEnabled) { InfoTicker.Load(); } if (InventoryCheck.IsRunning && !InventoryCheck.IsEnabled) { InventoryCheck.Unload(); } if (!InventoryCheck.IsRunning && InventoryCheck.IsEnabled) { InventoryCheck.Load(); } if (!Watchlist.IsRunning && Watchlist.IsEnabled) { Watchlist.Load(); } if (Watchlist.IsRunning && !Watchlist.IsEnabled) { Watchlist.Unload(); } if (!ReservedSlots.IsRunning && ReservedSlots.IsEnabled) { ReservedSlots.Load(); } if (ReservedSlots.IsRunning && !ReservedSlots.IsEnabled) { ReservedSlots.Unload(); } }
public static void Init() { GameItems.LoadGameItems(); if (CustomCommands.IsRunning && !CustomCommands.IsEnabled) { CustomCommands._fileWatcher.Dispose(); CustomCommands.IsRunning = false; } if (!CustomCommands.IsRunning && CustomCommands.IsEnabled) { CustomCommands.Init(); } if (KillMe.IsEnabled) { KillMe.Init(); } if (Gimme.IsRunning && !Gimme.IsEnabled) { Gimme._fileWatcher.Dispose(); Gimme.IsRunning = false; } if (!Gimme.IsRunning && Gimme.IsEnabled) { Gimme.Init(); } if (HighPingKicker.IsRunning && !HighPingKicker.IsEnabled) { HighPingKicker._fileWatcher.Dispose(); HighPingKicker.IsRunning = false; } if (!HighPingKicker.IsRunning && HighPingKicker.IsEnabled) { HighPingKicker.Init(); } if (InventoryCheck.IsRunning && !InventoryCheck.IsEnabled) { InventoryCheck._fileWatcher.Dispose(); InventoryCheck.IsRunning = false; } if (!InventoryCheck.IsRunning && InventoryCheck.IsEnabled) { InventoryCheck.Init(); } if (TeleportHome.IsEnabled) { TeleportHome.Init(); } if (TeleportReturn.IsEnabled) { TeleportReturn.Init(); } if (Badwords.IsRunning && !Badwords.IsEnabled) { Badwords._fileWatcher.Dispose(); Badwords.IsRunning = false; } if (!Badwords.IsRunning && Badwords.IsEnabled) { Badwords.Init(); } if (SaveWorld.IsRunning && !SaveWorld.IsEnabled) { SaveWorld.th.Abort(); SaveWorld.IsRunning = false; } if (!SaveWorld.IsRunning && SaveWorld.IsEnabled) { SaveWorld.Init(); } if (InfoTicker.IsRunning && !InfoTicker.IsEnabled) { InfoTicker.th.Abort(); InfoTicker.IsRunning = false; } if (!InfoTicker.IsEnabled && !Motd.IsEnabled && InfoTicker.IsConfigLoaded) { InfoTicker._fileWatcher.Dispose(); InfoTicker.IsConfigLoaded = false; } if (!InfoTicker.IsRunning && InfoTicker.IsEnabled) { InfoTicker.Init(); } if (!InfoTicker.IsConfigLoaded && Motd.IsEnabled) { InfoTicker.Init(); } if (ClanManager.IsEnabled) { ClanData.Init(); } }
public static void Load() { Timers.TimerStart(); if (TeleportCheck.IsEnabled) { TeleportCheck.DetectionLogsDir(); } if (FlightCheck.IsEnabled) { FlightCheck.DetectionLogsDir(); } if (HatchElevator.IsEnabled) { HatchElevator.DetectionLogsDir(); } if (PlayerLogs.IsEnabled) { PlayerLogs.PlayerLogsDir(); } if (Report.IsEnabled) { Report.ReportLogsDir(); } if (PlayerStatCheck.IsEnabled) { PlayerStatCheck.DetectionLogsDir(); } if (UndergroundCheck.IsEnabled) { UndergroundCheck.DetectionLogsDir(); } if (Bank.IsEnabled) { Bank.CreateFolder(); } if (AuctionBox.IsEnabled) { AuctionBox.CreateFolder(); } if (Bounties.IsEnabled) { Players.CreateFolder(); } if (CredentialCheck.IsEnabled) { CredentialCheck.CreateFolder(); } if (DupeLog.IsEnabled) { DupeLog.CreateFolder(); } Poll.CreateFolder(); if (PersistentContainer.Instance.PollOpen) { Poll.Check(); } if (ChatHook.Special_Player_Name_Coloring) { ChatHook.SpecialIdCheck(); } if (ClanManager.IsEnabled) { PersistentContainer.Instance.Players.GetClans(); ClanManager.BuildList(); } if (!ClanManager.IsEnabled) { PersistentContainer.Instance.Players.clans.Clear(); ClanManager.ClanMember.Clear(); } if (!InfoTicker.IsEnabled && InfoTicker.IsRunning) { InfoTicker.Unload(); } if (InfoTicker.IsEnabled && !InfoTicker.IsRunning) { InfoTicker.Load(); } if (Gimme.IsRunning && !Gimme.IsEnabled) { Gimme.Unload(); } if (!Gimme.IsRunning && Gimme.IsEnabled) { Gimme.Load(); } if (UndergroundCheck.IsRunning && !UndergroundCheck.IsEnabled) { UndergroundCheck.Unload(); } if (!UndergroundCheck.IsRunning && UndergroundCheck.IsEnabled) { UndergroundCheck.Load(); } if (Badwords.IsRunning && !Badwords.IsEnabled) { Badwords.Unload(); } if (!Badwords.IsRunning && Badwords.IsEnabled) { Badwords.Load(); } if (!LoginNotice.IsRunning && LoginNotice.IsEnabled) { LoginNotice.Load(); } if (LoginNotice.IsRunning && !LoginNotice.IsEnabled) { LoginNotice.Unload(); } if (!Zones.IsRunning && Zones.IsEnabled) { Zones.Load(); } if (Zones.IsRunning && !Zones.IsEnabled) { Zones.Unload(); } if (!VoteReward.IsRunning && VoteReward.IsEnabled) { VoteReward.Load(); } if (VoteReward.IsRunning && !VoteReward.IsEnabled) { VoteReward.Unload(); } if (!Watchlist.IsRunning && Watchlist.IsEnabled) { Watchlist.Load(); } if (Watchlist.IsRunning && !Watchlist.IsEnabled) { Watchlist.Unload(); } if (!ReservedSlots.IsRunning && ReservedSlots.IsEnabled) { ReservedSlots.Load(); } if (ReservedSlots.IsRunning && !ReservedSlots.IsEnabled) { ReservedSlots.Unload(); } if (!StartingItems.IsRunning && StartingItems.IsEnabled) { StartingItems.Load(); } if (StartingItems.IsRunning && !StartingItems.IsEnabled) { StartingItems.Unload(); } if (!Travel.IsRunning && Travel.IsEnabled) { Travel.Load(); } if (Travel.IsRunning && !Travel.IsEnabled) { Travel.Unload(); } if (!Shop.IsRunning && Shop.IsEnabled) { Shop.Load(); } if (Shop.IsRunning && !Shop.IsEnabled) { Shop.Unload(); } if (!Motd.IsRunning && Motd.IsEnabled) { Motd.Load(); } if (Motd.IsRunning && !Motd.IsEnabled) { Motd.Unload(); } if (InventoryCheck.IsRunning && !InventoryCheck.IsEnabled) { InventoryCheck.Unload(); } if (!InventoryCheck.IsRunning && InventoryCheck.IsEnabled) { InventoryCheck.Load(); } if (HighPingKicker.IsRunning && !HighPingKicker.IsEnabled) { HighPingKicker.Unload(); } if (!HighPingKicker.IsRunning && HighPingKicker.IsEnabled) { HighPingKicker.Load(); } if (CredentialCheck.IsRunning && !CredentialCheck.IsEnabled) { CredentialCheck.Unload(); } if (!CredentialCheck.IsRunning && CredentialCheck.IsEnabled) { CredentialCheck.Load(); } if (CustomCommands.IsRunning && !CustomCommands.IsEnabled) { CustomCommands.Unload(); } if (!CustomCommands.IsRunning && CustomCommands.IsEnabled) { CustomCommands.Load(); } if (DupeLog.IsRunning && !DupeLog.IsEnabled) { DupeLog.Unload(); } if (!DupeLog.IsRunning && DupeLog.IsEnabled) { DupeLog.Load(); } if (AuctionBox.IsEnabled) { AuctionBox.AuctionList(); } if (MutePlayer.IsEnabled) { MutePlayer.MuteList(); } if (Jail.IsEnabled) { Jail.JailList(); } if (Animals.IsEnabled) { Animals.AnimalList(); } if (AutoShutdown.IsEnabled) { AutoShutdown.ShutdownList(); } }