Store the text resources of the setting file separately.

This commit is contained in:
BruceChen 2022-11-30 16:22:48 +08:00
parent 6c3bfb82ee
commit 2331590588
26 changed files with 8510 additions and 8446 deletions

View file

@ -19,28 +19,28 @@ namespace MinecraftClient.ChatBots
public bool Enabled = false;
[TomlInlineComment("$config.ChatBot.Alerts.Beep_Enabled$")]
[TomlInlineComment("$ChatBot.Alerts.Beep_Enabled$")]
public bool Beep_Enabled = true;
[TomlInlineComment("$config.ChatBot.Alerts.Trigger_By_Words$")]
[TomlInlineComment("$ChatBot.Alerts.Trigger_By_Words$")]
public bool Trigger_By_Words = false;
[TomlInlineComment("$config.ChatBot.Alerts.Trigger_By_Rain$")]
[TomlInlineComment("$ChatBot.Alerts.Trigger_By_Rain$")]
public bool Trigger_By_Rain = false;
[TomlInlineComment("$config.ChatBot.Alerts.Trigger_By_Thunderstorm$")]
[TomlInlineComment("$ChatBot.Alerts.Trigger_By_Thunderstorm$")]
public bool Trigger_By_Thunderstorm = false;
[TomlInlineComment("$config.ChatBot.Alerts.Log_To_File$")]
[TomlInlineComment("$ChatBot.Alerts.Log_To_File$")]
public bool Log_To_File = false;
[TomlInlineComment("$config.ChatBot.Alerts.Log_File$")]
[TomlInlineComment("$ChatBot.Alerts.Log_File$")]
public string Log_File = @"alerts-log.txt";
[TomlPrecedingComment("$config.ChatBot.Alerts.Matches$")]
[TomlPrecedingComment("$ChatBot.Alerts.Matches$")]
public string[] Matches = new string[] { "Yourname", " whispers ", "-> me", "admin", ".com" };
[TomlPrecedingComment("$config.ChatBot.Alerts.Excludes$")]
[TomlPrecedingComment("$ChatBot.Alerts.Excludes$")]
public string[] Excludes = new string[] { "myserver.com", "Yourname>:", "Player Yourname", "Yourname joined", "Yourname left", "[Lockette] (Admin)", " Yourname:", "Yourname is" };
public void OnSettingUpdate()

View file

@ -20,22 +20,22 @@ namespace MinecraftClient.ChatBots
public bool Enabled = false;
[TomlInlineComment("$config.ChatBot.AntiAfk.Delay$")]
[TomlInlineComment("$ChatBot.AntiAfk.Delay$")]
public Range Delay = new(60);
[TomlInlineComment("$config.ChatBot.AntiAfk.Command$")]
[TomlInlineComment("$ChatBot.AntiAfk.Command$")]
public string Command = "/ping";
[TomlInlineComment("$config.ChatBot.AntiAfk.Use_Sneak$")]
[TomlInlineComment("$ChatBot.AntiAfk.Use_Sneak$")]
public bool Use_Sneak = false;
[TomlInlineComment("$config.ChatBot.AntiAfk.Use_Terrain_Handling$")]
[TomlInlineComment("$ChatBot.AntiAfk.Use_Terrain_Handling$")]
public bool Use_Terrain_Handling = false;
[TomlInlineComment("$config.ChatBot.AntiAfk.Walk_Range$")]
[TomlInlineComment("$ChatBot.AntiAfk.Walk_Range$")]
public int Walk_Range = 5;
[TomlInlineComment("$config.ChatBot.AntiAfk.Walk_Retries$")]
[TomlInlineComment("$ChatBot.AntiAfk.Walk_Retries$")]
public int Walk_Retries = 20;
public void OnSettingUpdate()

View file

@ -20,28 +20,28 @@ namespace MinecraftClient.ChatBots
public bool Enabled = false;
[TomlInlineComment("$config.ChatBot.AutoAttack.Mode$")]
[TomlInlineComment("$ChatBot.AutoAttack.Mode$")]
public AttackMode Mode = AttackMode.single;
[TomlInlineComment("$config.ChatBot.AutoAttack.Priority$")]
[TomlInlineComment("$ChatBot.AutoAttack.Priority$")]
public PriorityType Priority = PriorityType.distance;
[TomlInlineComment("$config.ChatBot.AutoAttack.Cooldown_Time$")]
[TomlInlineComment("$ChatBot.AutoAttack.Cooldown_Time$")]
public CooldownConfig Cooldown_Time = new(false, 1.0);
[TomlInlineComment("$config.ChatBot.AutoAttack.Interaction$")]
[TomlInlineComment("$ChatBot.AutoAttack.Interaction$")]
public InteractType Interaction = InteractType.Attack;
[TomlInlineComment("$config.ChatBot.AutoAttack.Attack_Hostile$")]
[TomlInlineComment("$ChatBot.AutoAttack.Attack_Hostile$")]
public bool Attack_Hostile = true;
[TomlInlineComment("$config.ChatBot.AutoAttack.Attack_Passive$")]
[TomlInlineComment("$ChatBot.AutoAttack.Attack_Passive$")]
public bool Attack_Passive = false;
[TomlInlineComment("$config.ChatBot.AutoAttack.List_Mode$")]
[TomlInlineComment("$ChatBot.AutoAttack.List_Mode$")]
public ListType List_Mode = ListType.whitelist;
[TomlInlineComment("$config.ChatBot.AutoAttack.Entites_List$")]
[TomlInlineComment("$ChatBot.AutoAttack.Entites_List$")]
public List<EntityType> Entites_List = new() { EntityType.Zombie, EntityType.Cow };
public void OnSettingUpdate()

View file

@ -21,13 +21,13 @@ namespace MinecraftClient.ChatBots
public bool Enabled = false;
[TomlInlineComment("$config.ChatBot.AutoCraft.CraftingTable$")]
[TomlInlineComment("$ChatBot.AutoCraft.CraftingTable$")]
public LocationConfig CraftingTable = new(123, 65, 456);
[TomlInlineComment("$config.ChatBot.AutoCraft.OnFailure$")]
[TomlInlineComment("$ChatBot.AutoCraft.OnFailure$")]
public OnFailConfig OnFailure = OnFailConfig.abort;
[TomlPrecedingComment("$config.ChatBot.AutoCraft.Recipes$")]
[TomlPrecedingComment("$ChatBot.AutoCraft.Recipes$")]
public RecipeConfig[] Recipes = new RecipeConfig[]
{
new RecipeConfig(

View file

@ -19,36 +19,36 @@ namespace MinecraftClient.ChatBots
public bool Enabled = false;
[NonSerialized]
[TomlInlineComment("$config.ChatBot.AutoDig.Auto_Tool_Switch$")]
[TomlInlineComment("$ChatBot.AutoDig.Auto_Tool_Switch$")]
public bool Auto_Tool_Switch = false;
[NonSerialized]
[TomlInlineComment("$config.ChatBot.AutoDig.Durability_Limit$")]
[TomlInlineComment("$ChatBot.AutoDig.Durability_Limit$")]
public int Durability_Limit = 2;
[NonSerialized]
[TomlInlineComment("$config.ChatBot.AutoDig.Drop_Low_Durability_Tools$")]
[TomlInlineComment("$ChatBot.AutoDig.Drop_Low_Durability_Tools$")]
public bool Drop_Low_Durability_Tools = false;
[TomlInlineComment("$config.ChatBot.AutoDig.Mode$")]
[TomlInlineComment("$ChatBot.AutoDig.Mode$")]
public ModeType Mode = ModeType.lookat;
[TomlPrecedingComment("$config.ChatBot.AutoDig.Locations$")]
[TomlPrecedingComment("$ChatBot.AutoDig.Locations$")]
public Coordination[] Locations = new Coordination[] { new(123.5, 64, 234.5), new(124.5, 63, 235.5) };
[TomlInlineComment("$config.ChatBot.AutoDig.Location_Order$")]
[TomlInlineComment("$ChatBot.AutoDig.Location_Order$")]
public OrderType Location_Order = OrderType.distance;
[TomlInlineComment("$config.ChatBot.AutoDig.Auto_Start_Delay$")]
[TomlInlineComment("$ChatBot.AutoDig.Auto_Start_Delay$")]
public double Auto_Start_Delay = 3.0;
[TomlInlineComment("$config.ChatBot.AutoDig.Dig_Timeout$")]
[TomlInlineComment("$ChatBot.AutoDig.Dig_Timeout$")]
public double Dig_Timeout = 60.0;
[TomlInlineComment("$config.ChatBot.AutoDig.Log_Block_Dig$")]
[TomlInlineComment("$ChatBot.AutoDig.Log_Block_Dig$")]
public bool Log_Block_Dig = true;
[TomlInlineComment("$config.ChatBot.AutoDig.List_Type$")]
[TomlInlineComment("$ChatBot.AutoDig.List_Type$")]
public ListType List_Type = ListType.whitelist;
public List<Material> Blocks = new() { Material.Cobblestone, Material.Stone };

View file

@ -19,7 +19,7 @@ namespace MinecraftClient.ChatBots
public bool Enabled = false;
[TomlInlineComment("$config.ChatBot.AutoDrop.Mode$")]
[TomlInlineComment("$ChatBot.AutoDrop.Mode$")]
public DropMode Mode = DropMode.include;
public List<ItemType> Items = new() { ItemType.Cobblestone, ItemType.Dirt };

View file

@ -25,43 +25,43 @@ namespace MinecraftClient.ChatBots
public bool Enabled = false;
[TomlInlineComment("$config.ChatBot.AutoFishing.Antidespawn$")]
[TomlInlineComment("$ChatBot.AutoFishing.Antidespawn$")]
public bool Antidespawn = false;
[TomlInlineComment("$config.ChatBot.AutoFishing.Mainhand$")]
[TomlInlineComment("$ChatBot.AutoFishing.Mainhand$")]
public bool Mainhand = true;
[TomlInlineComment("$config.ChatBot.AutoFishing.Auto_Start$")]
[TomlInlineComment("$ChatBot.AutoFishing.Auto_Start$")]
public bool Auto_Start = true;
[TomlInlineComment("$config.ChatBot.AutoFishing.Cast_Delay$")]
[TomlInlineComment("$ChatBot.AutoFishing.Cast_Delay$")]
public double Cast_Delay = 0.4;
[TomlInlineComment("$config.ChatBot.AutoFishing.Fishing_Delay$")]
[TomlInlineComment("$ChatBot.AutoFishing.Fishing_Delay$")]
public double Fishing_Delay = 3.0;
[TomlInlineComment("$config.ChatBot.AutoFishing.Fishing_Timeout$")]
[TomlInlineComment("$ChatBot.AutoFishing.Fishing_Timeout$")]
public double Fishing_Timeout = 300.0;
[TomlInlineComment("$config.ChatBot.AutoFishing.Durability_Limit$")]
[TomlInlineComment("$ChatBot.AutoFishing.Durability_Limit$")]
public double Durability_Limit = 2;
[TomlInlineComment("$config.ChatBot.AutoFishing.Auto_Rod_Switch$")]
[TomlInlineComment("$ChatBot.AutoFishing.Auto_Rod_Switch$")]
public bool Auto_Rod_Switch = true;
[TomlInlineComment("$config.ChatBot.AutoFishing.Stationary_Threshold$")]
[TomlInlineComment("$ChatBot.AutoFishing.Stationary_Threshold$")]
public double Stationary_Threshold = 0.001;
[TomlInlineComment("$config.ChatBot.AutoFishing.Hook_Threshold$")]
[TomlInlineComment("$ChatBot.AutoFishing.Hook_Threshold$")]
public double Hook_Threshold = 0.2;
[TomlInlineComment("$config.ChatBot.AutoFishing.Log_Fish_Bobber$")]
[TomlInlineComment("$ChatBot.AutoFishing.Log_Fish_Bobber$")]
public bool Log_Fish_Bobber = false;
[TomlInlineComment("$config.ChatBot.AutoFishing.Enable_Move$")]
[TomlInlineComment("$ChatBot.AutoFishing.Enable_Move$")]
public bool Enable_Move = false;
[TomlPrecedingComment("$config.ChatBot.AutoFishing.Movements$")]
[TomlPrecedingComment("$ChatBot.AutoFishing.Movements$")]
public LocationConfig[] Movements = new LocationConfig[]
{
new LocationConfig(12.34, -23.45),

View file

@ -18,16 +18,16 @@ namespace MinecraftClient.ChatBots
public bool Enabled = false;
[TomlInlineComment("$config.ChatBot.AutoRelog.Delay$")]
[TomlInlineComment("$ChatBot.AutoRelog.Delay$")]
public Range Delay = new(3);
[TomlInlineComment("$config.ChatBot.AutoRelog.Retries$")]
[TomlInlineComment("$ChatBot.AutoRelog.Retries$")]
public int Retries = 3;
[TomlInlineComment("$config.ChatBot.AutoRelog.Ignore_Kick_Message$")]
[TomlInlineComment("$ChatBot.AutoRelog.Ignore_Kick_Message$")]
public bool Ignore_Kick_Message = false;
[TomlPrecedingComment("$config.ChatBot.AutoRelog.Kick_Messages$")]
[TomlPrecedingComment("$ChatBot.AutoRelog.Kick_Messages$")]
public string[] Kick_Messages = new string[] { "Connection has been lost", "Server is restarting", "Server is full", "Too Many people" };
[NonSerialized]

View file

@ -26,7 +26,7 @@ namespace MinecraftClient.ChatBots
public string Matches_File = @"matches.ini";
[TomlInlineComment("$config.ChatBot.AutoRespond.Match_Colors$")]
[TomlInlineComment("$ChatBot.AutoRespond.Match_Colors$")]
public bool Match_Colors = false;
public void OnSettingUpdate()

View file

@ -37,22 +37,22 @@ namespace MinecraftClient.ChatBots
public bool Enabled = false;
[TomlInlineComment("$config.ChatBot.DiscordBridge.Token$")]
[TomlInlineComment("$ChatBot.DiscordBridge.Token$")]
public string Token = "your bot token here";
[TomlInlineComment("$config.ChatBot.DiscordBridge.GuildId$")]
[TomlInlineComment("$ChatBot.DiscordBridge.GuildId$")]
public ulong GuildId = 1018553894831403028L;
[TomlInlineComment("$config.ChatBot.DiscordBridge.ChannelId$")]
[TomlInlineComment("$ChatBot.DiscordBridge.ChannelId$")]
public ulong ChannelId = 1018565295654326364L;
[TomlInlineComment("$config.ChatBot.DiscordBridge.OwnersIds$")]
[TomlInlineComment("$ChatBot.DiscordBridge.OwnersIds$")]
public ulong[] OwnersIds = new[] { 978757810781323276UL };
[TomlInlineComment("$config.ChatBot.DiscordBridge.MessageSendTimeout$")]
[TomlInlineComment("$ChatBot.DiscordBridge.MessageSendTimeout$")]
public int Message_Send_Timeout = 3;
[TomlPrecedingComment("$config.ChatBot.DiscordBridge.Formats$")]
[TomlPrecedingComment("$ChatBot.DiscordBridge.Formats$")]
public string PrivateMessageFormat = "**[Private Message]** {username}: {message}";
public string PublicMessageFormat = "{username}: {message}";
public string TeleportRequestMessageFormat = "A new Teleport Request from **{username}**!";

View file

@ -41,7 +41,7 @@ namespace MinecraftClient.ChatBots
public bool Enabled = false;
[TomlInlineComment("$config.ChatBot.Farmer.Delay_Between_Tasks$")]
[TomlInlineComment("$ChatBot.Farmer.Delay_Between_Tasks$")]
public int Delay_Between_Tasks = 1;
public void OnSettingUpdate()

View file

@ -17,10 +17,10 @@ namespace MinecraftClient.ChatBots
public bool Enabled = false;
[TomlInlineComment("$config.ChatBot.FollowPlayer.Update_Limit$")]
[TomlInlineComment("$ChatBot.FollowPlayer.Update_Limit$")]
public double Update_Limit = 1.5;
[TomlInlineComment("$config.ChatBot.FollowPlayer.Stop_At_Distance$")]
[TomlInlineComment("$ChatBot.FollowPlayer.Stop_At_Distance$")]
public double Stop_At_Distance = 3.0;
public void OnSettingUpdate()

View file

@ -29,28 +29,28 @@ namespace MinecraftClient.ChatBots
public bool Enabled = false;
[TomlInlineComment("$config.ChatBot.Map.Render_In_Console$")]
[TomlInlineComment("$ChatBot.Map.Render_In_Console$")]
public bool Render_In_Console = true;
[TomlInlineComment("$config.ChatBot.Map.Save_To_File$")]
[TomlInlineComment("$ChatBot.Map.Save_To_File$")]
public bool Save_To_File = false;
[TomlInlineComment("$config.ChatBot.Map.Auto_Render_On_Update$")]
[TomlInlineComment("$ChatBot.Map.Auto_Render_On_Update$")]
public bool Auto_Render_On_Update = false;
[TomlInlineComment("$config.ChatBot.Map.Delete_All_On_Unload$")]
[TomlInlineComment("$ChatBot.Map.Delete_All_On_Unload$")]
public bool Delete_All_On_Unload = true;
[TomlInlineComment("$config.ChatBot.Map.Notify_On_First_Update$")]
[TomlInlineComment("$ChatBot.Map.Notify_On_First_Update$")]
public bool Notify_On_First_Update = true;
[TomlInlineComment("$config.ChatBot.Map.Rasize_Rendered_Image$")]
[TomlInlineComment("$ChatBot.Map.Rasize_Rendered_Image$")]
public bool Rasize_Rendered_Image = false;
[TomlInlineComment("$config.ChatBot.Map.Resize_To$")]
[TomlInlineComment("$ChatBot.Map.Resize_To$")]
public int Resize_To = 512;
[TomlPrecedingComment("$config.ChatBot.Map.Send_Rendered_To_Bridges$")]
[TomlPrecedingComment("$ChatBot.Map.Send_Rendered_To_Bridges$")]
public bool Send_Rendered_To_Discord = false;
public bool Send_Rendered_To_Telegram = false;

View file

@ -22,7 +22,7 @@ namespace MinecraftClient.ChatBots
public string File = "playerlog.txt";
[TomlInlineComment("$config.ChatBot.PlayerListLogger.Delay$")]
[TomlInlineComment("$ChatBot.PlayerListLogger.Delay$")]
public double Delay = 60;
public void OnSettingUpdate()

View file

@ -20,7 +20,7 @@ namespace MinecraftClient.ChatBots
public bool Enabled = false;
[TomlInlineComment("$config.ChatBot.ReplayCapture.Backup_Interval$")]
[TomlInlineComment("$ChatBot.ReplayCapture.Backup_Interval$")]
public double Backup_Interval = 300.0;
public void OnSettingUpdate()

View file

@ -40,19 +40,19 @@ namespace MinecraftClient.ChatBots
public bool Enabled = false;
[TomlInlineComment("$config.ChatBot.TelegramBridge.Token$")]
[TomlInlineComment("$ChatBot.TelegramBridge.Token$")]
public string Token = "your bot token here";
[TomlInlineComment("$config.ChatBot.TelegramBridge.ChannelId$")]
[TomlInlineComment("$ChatBot.TelegramBridge.ChannelId$")]
public string ChannelId = "";
[TomlInlineComment("$config.ChatBot.TelegramBridge.Authorized_Chat_Ids$")]
[TomlInlineComment("$ChatBot.TelegramBridge.Authorized_Chat_Ids$")]
public long[] Authorized_Chat_Ids = Array.Empty<long>();
[TomlInlineComment("$config.ChatBot.TelegramBridge.MessageSendTimeout$")]
[TomlInlineComment("$ChatBot.TelegramBridge.MessageSendTimeout$")]
public int Message_Send_Timeout = 3;
[TomlPrecedingComment("$config.ChatBot.TelegramBridge.Formats$")]
[TomlPrecedingComment("$ChatBot.TelegramBridge.Formats$")]
public string PrivateMessageFormat = "*(Private Message)* {username}: {message}";
public string PublicMessageFormat = "{username}: {message}";
public string TeleportRequestMessageFormat = "A new Teleport Request from **{username}**!";