2025-01-14 19:03:59 +13:00
|
|
|
|
using EllieBot.Common.Configs;
|
|
|
|
|
|
|
|
|
|
namespace EllieBot.Modules.Games;
|
|
|
|
|
|
|
|
|
|
public sealed class FishConfigService : ConfigServiceBase<FishConfig>
|
|
|
|
|
{
|
|
|
|
|
private static string FILE_PATH = "data/fish.yml";
|
|
|
|
|
private static readonly TypedKey<FishConfig> _changeKey = new("config.fish.updated");
|
|
|
|
|
|
|
|
|
|
public override string Name
|
|
|
|
|
=> "fishing";
|
|
|
|
|
|
|
|
|
|
public FishConfigService(
|
|
|
|
|
IConfigSeria serializer,
|
|
|
|
|
IPubSub pubSub)
|
|
|
|
|
: base(FILE_PATH, serializer, pubSub, _changeKey)
|
|
|
|
|
{
|
2025-03-23 14:25:41 +13:00
|
|
|
|
Migrate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Migrate()
|
|
|
|
|
{
|
|
|
|
|
ModifyConfig(c =>
|
|
|
|
|
{
|
|
|
|
|
c.Version = 2;
|
|
|
|
|
c.RequireCaptcha = true;
|
|
|
|
|
});
|
2025-01-14 19:03:59 +13:00
|
|
|
|
}
|
|
|
|
|
}
|