/// <inheritdoc cref="Server.OnRestartingRound"/> public static void OnRestartingRound() { MultiAdminFeatures.CallEvent(MultiAdminFeatures.EventType.ROUND_END); API.Features.Scp173.TurnedPlayers.Clear(); API.Features.Scp096.TurnedPlayers.Clear(); }
/// <inheritdoc cref="Server.OnWaitingForPlayers"/> public static void OnWaitingForPlayers() { MultiAdminFeatures.CallEvent(MultiAdminFeatures.EventType.WAITING_FOR_PLAYERS); if (Events.Instance.Config.ShouldReloadConfigsAtRoundRestart) { ConfigManager.Reload(); } RoundSummary.RoundLock = false; }
/// <inheritdoc cref="Server.OnRoundStarted"/> public static void OnRoundStarted() { MultiAdminFeatures.CallEvent(MultiAdminFeatures.EventType.ROUND_START); foreach (API.Features.Player player in API.Features.Player.List) { if (player.IsOverwatchEnabled) { player.IsOverwatchEnabled = false; Timing.CallDelayed(2f, () => player.IsOverwatchEnabled = true); } } }
/// <inheritdoc cref="Server.OnRestartingRound"/> public static void OnRestartingRound() { MultiAdminFeatures.CallEvent(MultiAdminFeatures.EventType.ROUND_END); API.Features.Scp173.TurnedPlayers.Clear(); API.Features.Scp096.TurnedPlayers.Clear(); API.Features.TeslaGate.IgnoredPlayers.Clear(); API.Features.TeslaGate.IgnoredRoles.Clear(); API.Features.TeslaGate.IgnoredTeams.Clear(); API.Features.Scp106Container.IgnoredPlayers.Clear(); API.Features.Scp106Container.IgnoredRoles = new List <RoleType> { RoleType.Spectator }; API.Features.Scp106Container.IgnoredTeams = new List <Team> { Team.SCP }; }
static Loader() { Log.Info($"Initializing at {Environment.CurrentDirectory}"); #if PUBLIC_BETA Log.Warn("You are running a public beta build. It is not compatible with another version of the game."); #endif Log.SendRaw($"{Assembly.GetExecutingAssembly().GetName().Name} - Version {Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion}", ConsoleColor.DarkRed); if (MultiAdminFeatures.MultiAdminUsed) { Log.SendRaw($"Detected MultiAdmin! Version: {MultiAdminFeatures.MultiAdminVersion} | Features: {MultiAdminFeatures.MultiAdminModFeatures}", ConsoleColor.Cyan); MultiAdminFeatures.CallEvent(MultiAdminFeatures.EventType.SERVER_START); MultiAdminFeatures.CallAction(MultiAdminFeatures.ActionType.SET_SUPPORTED_FEATURES, MultiAdminFeatures.ModFeatures.All); } CustomNetworkManager.Modded = true; // "Useless" check for now, since configs will be loaded after loading all plugins. if (Config.Environment != EnvironmentType.Production) { Paths.Reload($"EXILED-{Config.Environment.ToString().ToUpper()}"); } if (Environment.CurrentDirectory.Contains("testing", StringComparison.OrdinalIgnoreCase)) { Paths.Reload($"EXILED-Testing"); } if (!Directory.Exists(Paths.Configs)) { Directory.CreateDirectory(Paths.Configs); } if (!Directory.Exists(Paths.Plugins)) { Directory.CreateDirectory(Paths.Plugins); } if (!Directory.Exists(Paths.Dependencies)) { Directory.CreateDirectory(Paths.Dependencies); } }
/// <inheritdoc cref="Server.OnWaitingForPlayers"/> public static void OnWaitingForPlayers() { MultiAdminFeatures.CallEvent(MultiAdminFeatures.EventType.WAITING_FOR_PLAYERS); Item.BaseToItem.Clear(); Pickup.BaseToItem.Clear(); ExplosiveGrenade.GrenadeToItem.Clear(); FlashGrenade.GrenadeToItem.Clear(); if (Events.Instance.Config.ShouldReloadConfigsAtRoundRestart) { ConfigManager.Reload(); } if (Events.Instance.Config.ShouldReloadTranslationsAtRoundRestart) { TranslationManager.Reload(); } RoundSummary.RoundLock = false; }
private static void Postfix(ReferenceHub __instance) { try { // ReferenceHub is a component that is loaded first if (__instance.isDedicatedServer || ReferenceHub.HostHub == null || PlayerManager.localPlayer == null) { return; } if (PlayerManager.players.Count >= CustomNetworkManager.slots) { MultiAdminFeatures.CallEvent(MultiAdminFeatures.EventType.SERVER_FULL); } CallEvent(__instance, out _); } catch (Exception exception) { Log.Error($"{typeof(Joined).FullName}:\n{exception}"); } }
/// <inheritdoc cref="Server.OnRoundStarted"/> public static void OnRoundStarted() { MultiAdminFeatures.CallEvent(MultiAdminFeatures.EventType.ROUND_START); }