BurntToast/BurntToast/Configuration.cs

37 lines
981 B
C#
Raw Normal View History

2021-04-12 16:51:46 +00:00
using System;
using System.Collections.Generic;
2021-04-06 14:47:32 +00:00
using System.Text.RegularExpressions;
using Dalamud.Configuration;
namespace BurntToast {
2021-04-12 16:51:46 +00:00
[Serializable]
2021-04-06 14:47:32 +00:00
public class Configuration : IPluginConfiguration {
private BurntToast Plugin { get; set; } = null!;
public int Version { get; set; } = 1;
2021-04-12 16:51:46 +00:00
public List<Regex> Patterns { get; set; } = new();
public List<BattleTalkPattern> BattleTalkPatterns { get; set; } = new();
2021-04-06 14:47:32 +00:00
internal void Initialise(BurntToast plugin) {
this.Plugin = plugin;
}
internal void Save() {
this.Plugin.Interface.SavePluginConfig(this);
}
}
2021-04-12 16:51:46 +00:00
[Serializable]
public class BattleTalkPattern {
public Regex Pattern { get; set; }
public bool ShowMessage { get; set; }
public BattleTalkPattern(Regex pattern, bool showMessage) {
this.Pattern = pattern;
this.ShowMessage = showMessage;
}
}
2021-04-06 14:47:32 +00:00
}