2018-05-08 00:58:46 -04:00
|
|
|
|
using SharedLibraryCore;
|
2018-04-08 17:50:58 -04:00
|
|
|
|
using SharedLibraryCore.Interfaces;
|
2019-09-27 16:53:52 -04:00
|
|
|
|
using Stats.Config;
|
2018-03-18 22:25:11 -04:00
|
|
|
|
using System.Collections.Generic;
|
2019-09-27 16:53:52 -04:00
|
|
|
|
using static IW4MAdmin.Plugins.Stats.Cheat.Detection;
|
2018-03-18 22:25:11 -04:00
|
|
|
|
|
2018-04-08 17:50:58 -04:00
|
|
|
|
namespace IW4MAdmin.Plugins.Stats.Config
|
2018-03-18 22:25:11 -04:00
|
|
|
|
{
|
2018-05-28 21:30:31 -04:00
|
|
|
|
public class StatsConfiguration : IBaseConfiguration
|
2018-03-18 22:25:11 -04:00
|
|
|
|
{
|
|
|
|
|
public bool EnableAntiCheat { get; set; }
|
|
|
|
|
public List<StreakMessageConfiguration> KillstreakMessages { get; set; }
|
|
|
|
|
public List<StreakMessageConfiguration> DeathstreakMessages { get; set; }
|
2019-07-27 18:46:48 -04:00
|
|
|
|
public List<string> RecoilessWeapons { get; set; }
|
2018-08-22 21:25:34 -04:00
|
|
|
|
public int TopPlayersMinPlayTime { get; set; }
|
2018-09-16 16:34:16 -04:00
|
|
|
|
public bool StoreClientKills { get; set; }
|
2020-05-05 19:49:30 -04:00
|
|
|
|
public int MostKillsMaxInactivityDays { get; set; } = 30;
|
|
|
|
|
public int MostKillsClientLimit { get; set; } = 5;
|
2019-09-27 16:53:52 -04:00
|
|
|
|
public IDictionary<DetectionType, DistributionConfiguration> DetectionDistributions { get; set; }
|
2019-10-23 11:40:24 -04:00
|
|
|
|
public IDictionary<long, DetectionType[]> ServerDetectionTypes { get; set; }
|
2019-09-27 16:53:52 -04:00
|
|
|
|
|
2020-02-11 17:44:06 -05:00
|
|
|
|
public string Name() => "StatsPluginSettings";
|
2018-03-18 22:25:11 -04:00
|
|
|
|
public IBaseConfiguration Generate()
|
|
|
|
|
{
|
2018-05-08 00:58:46 -04:00
|
|
|
|
EnableAntiCheat = Utilities.PromptBool(Utilities.CurrentLocalization.LocalizationIndex["PLUGIN_STATS_SETUP_ENABLEAC"]);
|
|
|
|
|
KillstreakMessages = new List<StreakMessageConfiguration>()
|
2018-03-18 22:25:11 -04:00
|
|
|
|
{
|
|
|
|
|
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!"
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2018-05-08 00:58:46 -04:00
|
|
|
|
DeathstreakMessages = new List<StreakMessageConfiguration>()
|
2018-03-18 22:25:11 -04:00
|
|
|
|
{
|
|
|
|
|
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?"
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
2019-07-27 18:46:48 -04:00
|
|
|
|
RecoilessWeapons = new List<string>()
|
|
|
|
|
{
|
|
|
|
|
"ranger.*_mp",
|
|
|
|
|
"model1887.*_mp",
|
|
|
|
|
".+shotgun.*_mp"
|
|
|
|
|
};
|
2019-09-27 16:53:52 -04:00
|
|
|
|
|
2018-08-22 21:25:34 -04:00
|
|
|
|
TopPlayersMinPlayTime = 3600 * 3;
|
2018-09-16 16:34:16 -04:00
|
|
|
|
StoreClientKills = false;
|
2019-10-23 11:40:24 -04:00
|
|
|
|
|
2018-05-08 00:58:46 -04:00
|
|
|
|
return this;
|
2018-03-18 22:25:11 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|