Merge AutoFishing's config

This commit is contained in:
BruceChen 2022-10-05 20:00:27 +08:00
parent 642a85661f
commit 48fcdce4ad
4 changed files with 16 additions and 7 deletions

View file

@ -56,8 +56,16 @@ namespace MinecraftClient.ChatBots
[TomlInlineComment("$config.ChatBot.AutoFishing.Log_Fish_Bobber$")]
public bool Log_Fish_Bobber = false;
[TomlInlineComment("$config.ChatBot.AutoFishing.Movements$")]
public LocationConfig[] Movements = Array.Empty<LocationConfig>();
[TomlInlineComment("$config.ChatBot.AutoFishing.Enable_Move$")]
public bool Enable_Move = false;
[TomlPrecedingComment("$config.ChatBot.AutoFishing.Movements$")]
public LocationConfig[] Movements = new LocationConfig[]
{
new LocationConfig(12.34f, -23.45f),
new LocationConfig(123.45, 64, -654.32, -25.14f, 36.25f),
new LocationConfig(-1245.63, 63.5, 1.2),
};
public void OnSettingUpdate()
{
@ -249,7 +257,7 @@ namespace MinecraftClient.ChatBots
case FishingState.StartMove:
if (--counter < 0)
{
if (Config.Movements.Length > 0)
if (Config.Enable_Move && Config.Movements.Length > 0)
{
if (GetTerrainEnabled())
{
@ -399,7 +407,7 @@ namespace MinecraftClient.ChatBots
public void OnCaughtFish()
{
++fishCount;
if (Config.Movements.Length > 0)
if (Config.Enable_Move && Config.Movements.Length > 0)
LogToConsole(GetTimestamp() + ": " + Translations.Get("bot.autoFish.caught_at",
fishingBobber!.Location.X, fishingBobber!.Location.Y, fishingBobber!.Location.Z, fishCount));
else

View file

@ -28,7 +28,7 @@ namespace MinecraftClient.ChatBots
[TomlInlineComment("$config.ChatBot.AutoRelog.Ignore_Kick_Message$")]
public bool Ignore_Kick_Message = false;
[TomlInlineComment("$config.ChatBot.AutoRelog.Kick_Messages$")]
[TomlPrecedingComment("$config.ChatBot.AutoRelog.Kick_Messages$")]
public string[] Kick_Messages = new string[] { "Connection has been lost", "Server is restarting", "Server is full", "Too Many people" };
public void OnSettingUpdate()

View file

@ -814,7 +814,8 @@ config.ChatBot.AutoFishing.Auto_Rod_Switch=Switch to a new rod from inventory af
config.ChatBot.AutoFishing.Stationary_Threshold=Hooks moving in the X and Z axes below this threshold will be considered stationary.
config.ChatBot.AutoFishing.Hook_Threshold=A stationary hook moving on the Y-axis above this threshold will be considered to have caught a fish.
config.ChatBot.AutoFishing.Log_Fish_Bobber=For debugging purposes, you can use this log to adjust the two thresholds mentioned above.
config.ChatBot.AutoFishing.Movements=This allows the player to change position/angle after each fish caught. Usage can be found in the Guide.
config.ChatBot.AutoFishing.Enable_Move=This allows the player to change position/angle after each fish caught.
config.ChatBot.AutoFishing.Movements=It will move in order "1->2->3->4->3->2->1->2->..." and can change position or angle or both each time. It is recommended to change the facing only.
# ChatBot.AutoRelog

View file

@ -543,6 +543,6 @@ config.Head=启动配置文件\n\n# 对 MCCMinecraft 命令行客户端)不
# Main.General
config.Main.General.account=Login请填写邮箱或玩家名称。若要以离线模式登录请使用"-"作为密码。若留空则使用交互式登录。
config.Main.General.login=游戏服务器的地址和端口可填入域名或IP地址。可删除端口字段解析SRV记录
config.Main.General.login=游戏服务器的地址和端口可填入域名或IP地址。可删除端口字段自动解析SRV记录
config.Main.General.server_info=帐户类型mojang 或是 microsoft。此项设置也会影响交互式登录。
config.Main.General.method=微软账户的登录方式mcc 或是 browser手动在网页上登录