1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

huge commit for advanced stats feature.

broke data out into its own library.
may be breaking changes with existing plugins
This commit is contained in:
RaidMax
2021-03-22 11:09:25 -05:00
parent 267b045883
commit 434392a7e4
505 changed files with 13671 additions and 3271 deletions

View File

@ -9,16 +9,32 @@ namespace IW4MAdmin.Plugins.Stats.Config
{
public class StatsConfiguration : IBaseConfiguration
{
[Obsolete]
public bool? EnableAntiCheat { get; set; }
[Obsolete] public bool? EnableAntiCheat { get; set; }
public List<StreakMessageConfiguration> KillstreakMessages { get; set; }
public List<StreakMessageConfiguration> DeathstreakMessages { get; set; }
public int TopPlayersMinPlayTime { get; set; }
public bool StoreClientKills { get; set; }
public int MostKillsMaxInactivityDays { get; set; } = 30;
public int MostKillsClientLimit { get; set; } = 5;
[Obsolete]
public IDictionary<long, DetectionType[]> ServerDetectionTypes { get; set; }
public bool EnableAdvancedMetrics { get; set; } = true;
public WeaponNameParserConfiguration[] WeaponNameParserConfigurations { get; set; } = new[]
{
new WeaponNameParserConfiguration()
{
Game = Server.Game.IW4,
WeaponSuffix = "mp",
Delimiters = new[] {'_'}
},
new WeaponNameParserConfiguration()
{
Game = Server.Game.T6,
WeaponSuffix = "mp",
Delimiters = new[] {'_', '+'}
}
};
[Obsolete] public IDictionary<long, DetectionType[]> ServerDetectionTypes { get; set; }
public AnticheatConfiguration AnticheatConfiguration { get; set; } = new AnticheatConfiguration();
#pragma warning disable CS0612 // Type or member is obsolete
@ -41,41 +57,47 @@ namespace IW4MAdmin.Plugins.Stats.Config
#pragma warning restore CS0612 // Type or member is obsolete
public string Name() => "StatsPluginSettings";
public IBaseConfiguration Generate()
{
AnticheatConfiguration.Enable = Utilities.PromptBool(Utilities.CurrentLocalization.LocalizationIndex["PLUGIN_STATS_SETUP_ENABLEAC"]);
AnticheatConfiguration.Enable =
Utilities.PromptBool(Utilities.CurrentLocalization.LocalizationIndex["PLUGIN_STATS_SETUP_ENABLEAC"]);
KillstreakMessages = new List<StreakMessageConfiguration>()
{
new StreakMessageConfiguration(){
new StreakMessageConfiguration()
{
Count = -1,
Message = "Try not to kill yourself anymore"
},
new StreakMessageConfiguration() {
Count = 5,
Message = "Great job! You're on a ^55 killstreak!"
},
new StreakMessageConfiguration()
{
Count = 10,
Message = "Amazing! ^510 kills ^7without dying!"
},
new StreakMessageConfiguration(){
Count = 25,
Message = "You better call in that nuke, ^525 killstreak^7!"
}
new StreakMessageConfiguration()
{
Count = 5,
Message = "Great job! You're on a ^55 killstreak!"
},
new StreakMessageConfiguration()
{
Count = 10,
Message = "Amazing! ^510 kills ^7without dying!"
},
new StreakMessageConfiguration()
{
Count = 25,
Message = "You better call in that nuke, ^525 killstreak^7!"
}
};
DeathstreakMessages = new List<StreakMessageConfiguration>()
{
new StreakMessageConfiguration()
{
Count = 5,
Message = "Pick it up soldier, you've died ^55 times ^7in a row..."
},
new StreakMessageConfiguration(){
Count = 10,
Message = "Seriously? ^510 deaths ^7without getting a kill?"
},
new StreakMessageConfiguration()
{
Count = 5,
Message = "Pick it up soldier, you've died ^55 times ^7in a row..."
},
new StreakMessageConfiguration()
{
Count = 10,
Message = "Seriously? ^510 deaths ^7without getting a kill?"
},
};
TopPlayersMinPlayTime = 3600 * 3;
@ -84,4 +106,4 @@ namespace IW4MAdmin.Plugins.Stats.Config
return this;
}
}
}
}

View File

@ -0,0 +1,11 @@
using SharedLibraryCore;
namespace Stats.Config
{
public class WeaponNameParserConfiguration
{
public Server.Game Game { get; set; }
public char[] Delimiters { get; set; }
public string WeaponSuffix { get; set; }
}
}