2022-03-28 19:05:18 -04:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using SharedLibraryCore.Interfaces;
|
2020-01-15 19:43:52 -05:00
|
|
|
|
using System.Globalization;
|
2021-06-03 11:51:03 -04:00
|
|
|
|
using SharedLibraryCore;
|
2022-03-28 19:05:18 -04:00
|
|
|
|
using SharedLibraryCore.Database.Models;
|
2019-01-26 21:33:37 -05:00
|
|
|
|
|
|
|
|
|
namespace IW4MAdmin.Application.EventParsers
|
|
|
|
|
{
|
2019-02-02 20:40:37 -05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// generic implementation of the IEventParserConfiguration
|
|
|
|
|
/// allows script plugins to generate dynamic configurations
|
|
|
|
|
/// </summary>
|
2022-03-12 14:38:33 -05:00
|
|
|
|
internal sealed class DynamicEventParserConfiguration : IEventParserConfiguration
|
2019-01-26 21:33:37 -05:00
|
|
|
|
{
|
|
|
|
|
public string GameDirectory { get; set; }
|
2020-04-01 15:11:56 -04:00
|
|
|
|
public ParserRegex Say { get; set; }
|
2022-11-03 20:58:29 -04:00
|
|
|
|
public string LocalizeText { get; set; }
|
2020-04-01 15:11:56 -04:00
|
|
|
|
public ParserRegex Join { get; set; }
|
2022-03-12 14:38:33 -05:00
|
|
|
|
public ParserRegex JoinTeam { get; set; }
|
2020-04-01 15:11:56 -04:00
|
|
|
|
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; }
|
2021-06-03 11:51:03 -04:00
|
|
|
|
public ParserRegex MapChange { get; set; }
|
|
|
|
|
public ParserRegex MapEnd { get; set; }
|
2020-01-15 19:43:52 -05:00
|
|
|
|
public NumberStyles GuidNumberStyle { get; set; } = NumberStyles.HexNumber;
|
2020-04-01 15:11:56 -04:00
|
|
|
|
|
2022-03-28 19:05:18 -04:00
|
|
|
|
public Dictionary<string, EFClient.TeamType> TeamMapping { get; set; } = new();
|
|
|
|
|
|
2020-04-01 15:11:56 -04:00
|
|
|
|
public DynamicEventParserConfiguration(IParserRegexFactory parserRegexFactory)
|
|
|
|
|
{
|
|
|
|
|
Say = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Join = parserRegexFactory.CreateParserRegex();
|
2022-03-12 14:38:33 -05:00
|
|
|
|
JoinTeam = parserRegexFactory.CreateParserRegex();
|
2020-04-01 15:11:56 -04:00
|
|
|
|
Quit = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Kill = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Damage = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Action = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Time = parserRegexFactory.CreateParserRegex();
|
2021-06-03 11:51:03 -04:00
|
|
|
|
MapChange = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
MapEnd = parserRegexFactory.CreateParserRegex();
|
2020-04-01 15:11:56 -04:00
|
|
|
|
}
|
2019-01-26 21:33:37 -05:00
|
|
|
|
}
|
|
|
|
|
}
|