diff --git a/src/ARKServerManager/App.config b/src/ARKServerManager/App.config index 1edd45d2..5e0b1729 100644 --- a/src/ARKServerManager/App.config +++ b/src/ARKServerManager/App.config @@ -915,6 +915,9 @@ Normal + + Online Player Count: + diff --git a/src/ARKServerManager/Config.Designer.cs b/src/ARKServerManager/Config.Designer.cs index 15ebb99b..1b59df29 100644 --- a/src/ARKServerManager/Config.Designer.cs +++ b/src/ARKServerManager/Config.Designer.cs @@ -3252,5 +3252,17 @@ namespace ServerManagerTool { return ((string)(this["DiscordUrl"])); } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Online Player Count:")] + public string Alert_OnlinePlayerCountChange { + get { + return ((string)(this["Alert_OnlinePlayerCountChange"])); + } + set { + this["Alert_OnlinePlayerCountChange"] = value; + } + } } } diff --git a/src/ARKServerManager/Config.settings b/src/ARKServerManager/Config.settings index 6d250841..5ec4aaa1 100644 --- a/src/ARKServerManager/Config.settings +++ b/src/ARKServerManager/Config.settings @@ -893,5 +893,8 @@ https://discord.gg/cJdHJSG + + Online Player Count: + \ No newline at end of file diff --git a/src/ARKServerManager/Globalization/en-US/en-US.xaml b/src/ARKServerManager/Globalization/en-US/en-US.xaml index f2cd02c9..59b93a3f 100644 --- a/src/ARKServerManager/Globalization/en-US/en-US.xaml +++ b/src/ARKServerManager/Globalization/en-US/en-US.xaml @@ -713,6 +713,8 @@ This message will be displayed when the status of the server changes. Mod Update Detected: This message will be displayed when the server manager detects one or more mods are out of date. + Online Player Count Change: + This message will be displayed when the online player count changes. Force Respawn Dinos Warning: This message will be displayed when the server is being started and a wild dino wipe is scheduled. diff --git a/src/ARKServerManager/Lib/ServerRuntime.cs b/src/ARKServerManager/Lib/ServerRuntime.cs index e96e67bf..48018475 100644 --- a/src/ARKServerManager/Lib/ServerRuntime.cs +++ b/src/ARKServerManager/Lib/ServerRuntime.cs @@ -333,6 +333,10 @@ namespace ServerManagerTool.Lib break; } + if (this.Players != update.OnlinePlayerCount) + { + PluginHelper.Instance.ProcessAlert(AlertType.OnlinePlayerCountChanged, this.ProfileSnapshot.ProfileName, $"{Config.Default.Alert_OnlinePlayerCountChange} {update.OnlinePlayerCount}"); + } this.Players = update.OnlinePlayerCount; this.MaxPlayers = update.ServerInfo?.MaxPlayers ?? this.ProfileSnapshot.MaxPlayerCount; diff --git a/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml b/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml index 280c9b69..43e3daac 100644 --- a/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml +++ b/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml @@ -8,7 +8,6 @@ xmlns:globcntrls="clr-namespace:WPFSharp.Globalizer.Controls;assembly=WPFSharp.Globalizer" mc:Ignorable="d" d:DesignWidth="800" - FocusManager.FocusedElement="{Binding ElementName=DataPathTextBox}" x:Name="GlobalSettings"> @@ -77,7 +76,7 @@