2019-01-26 20:33:37 -06:00
|
|
|
|
using SharedLibraryCore.Interfaces;
|
2020-01-15 18:43:52 -06:00
|
|
|
|
using System.Globalization;
|
2019-01-26 20:33:37 -06:00
|
|
|
|
|
|
|
|
|
namespace IW4MAdmin.Application.EventParsers
|
|
|
|
|
{
|
2019-02-02 19:40:37 -06:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// generic implementation of the IEventParserConfiguration
|
|
|
|
|
/// allows script plugins to generate dynamic configurations
|
|
|
|
|
/// </summary>
|
|
|
|
|
sealed internal class DynamicEventParserConfiguration : IEventParserConfiguration
|
2019-01-26 20:33:37 -06:00
|
|
|
|
{
|
|
|
|
|
public string GameDirectory { get; set; }
|
2020-04-01 14:11:56 -05:00
|
|
|
|
public ParserRegex Say { get; set; }
|
|
|
|
|
public ParserRegex Join { get; set; }
|
|
|
|
|
public ParserRegex Quit { get; set; }
|
|
|
|
|
public ParserRegex Kill { get; set; }
|
|
|
|
|
public ParserRegex Damage { get; set; }
|
|
|
|
|
public ParserRegex Action { get; set; }
|
|
|
|
|
public ParserRegex Time { get; set; }
|
2020-01-15 18:43:52 -06:00
|
|
|
|
public NumberStyles GuidNumberStyle { get; set; } = NumberStyles.HexNumber;
|
2020-04-01 14:11:56 -05:00
|
|
|
|
|
|
|
|
|
public DynamicEventParserConfiguration(IParserRegexFactory parserRegexFactory)
|
|
|
|
|
{
|
|
|
|
|
Say = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Join = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Quit = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Kill = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Damage = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Action = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Time = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
}
|
2019-01-26 20:33:37 -06:00
|
|
|
|
}
|
|
|
|
|
}
|