Translated

This commit is contained in:
Anon 2023-05-21 12:11:58 +02:00
parent 3a0b32ec68
commit cfc2baa4e7
5 changed files with 1333 additions and 1879 deletions

View file

@ -98,7 +98,7 @@ public class ItemsCollector : ChatBot
return r.SetAndReturn(cmd switch
{
#pragma warning disable format // @formatter:off
_ => Translations.cmd_follow_desc + ": " + Translations.cmd_follow_usage
_ => Translations.cmd_items_collector_desc + ": " + Translations.cmd_items_collector_usage
+ '\n' + McClient.dispatcher.GetAllUsageString(CommandName, false),
#pragma warning restore format // @formatter:on
});
@ -107,19 +107,19 @@ public class ItemsCollector : ChatBot
private int OnCommandStart(CmdResult r)
{
if (running)
return r.SetAndReturn(CmdResult.Status.Fail, "Already collecting items!");
return r.SetAndReturn(CmdResult.Status.Fail, Translations.cmd_items_collector_already_collecting);
StartTheMainProcess();
return r.SetAndReturn(CmdResult.Status.Done, "Started collecting items!");
return r.SetAndReturn(CmdResult.Status.Done, Translations.cmd_items_collector_started);
}
private int OnCommandStop(CmdResult r)
{
if (!running)
return r.SetAndReturn(CmdResult.Status.Fail, "Already not collecting items!");
return r.SetAndReturn(CmdResult.Status.Fail, Translations.cmd_items_collector_already_not_collecting);
StopTheMainProcess();
return r.SetAndReturn(CmdResult.Status.Done, "Stopping collecting items...");
return r.SetAndReturn(CmdResult.Status.Done, Translations.cmd_items_collector_stopping);
}
private void StartTheMainProcess()
@ -173,7 +173,7 @@ public class ItemsCollector : ChatBot
}
else
{
if (Config.Always_Return_To_Start)
if (startingLocation.Distance(currentLocation) > 2f && Config.Always_Return_To_Start)
WaitForMoveToLocation(startingLocation);
}
@ -183,7 +183,7 @@ public class ItemsCollector : ChatBot
Thread.Sleep(Config.Delay_Between_Tasks);
}
LogToConsole("Stopped collecting items!");
LogToConsole(Translations.cmd_items_collector_stopped);
}
public override void AfterGameJoined()

File diff suppressed because it is too large Load diff

View file

@ -807,4 +807,25 @@ If the connection to the Minecraft game server is blocked by the firewall, set E
<data name="Signature.SignMessageInCommand" xml:space="preserve">
<value>Whether to sign the messages contained in the commands sent by MCC. For example, the message in "/msg" and "/me"</value>
</data>
<data name="ChatBot.ItemsCollector.Collect_All_Item_Types" xml:space="preserve">
<value>If set to true, the bot will collect all items, regardless of their type. If you want to use the whitelisted item types, disable this by setting it to false</value>
</data>
<data name="ChatBot.ItemsCollector.Items_Whitelist" xml:space="preserve">
<value>In this list you can specify which items the bot will collect. To enable this, set the Collect_All_Item_Types to false. (NOTE: This does not prevent the bot from accidentally picking up other items, it only goes to positions where it finds the whitelisted items)\nYou can see the list of item types here: https://raw.githubusercontent.com/MCCTeam/Minecraft-Console-Client/master/MinecraftClient/Inventory/ItemType.cs</value>
</data>
<data name="ChatBot.ItemsCollector.Delay_Between_Tasks" xml:space="preserve">
<value>Delay in milliseconds between bot scanning items (Recommended: 300-500)</value>
</data>
<data name="ChatBot.ItemsCollector.Collection_Radius" xml:space="preserve">
<value>The radius in which bot will look for items to collect (Default: 30)</value>
</data>
<data name="ChatBot.ItemsCollector.Always_Return_To_Start" xml:space="preserve">
<value>If set to true, the bot will return to it's starting position after there are no items to collect</value>
</data>
<data name="ChatBot.ItemsCollector.Prioritize_Clusters" xml:space="preserve">
<value>If set to true, the bot will go after clustered items instead for the closest ones</value>
</data>
<data name="ChatBot.ItemsCollector" xml:space="preserve">
<value>A Chat Bot that collects items on the ground</value>
</data>
</root>

View file

@ -3812,5 +3812,47 @@ namespace MinecraftClient {
return ResourceManager.GetString("bot.TelegramBridge.quit_disabled", resourceCulture);
}
}
internal static string cmd_items_collector_desc {
get {
return ResourceManager.GetString("cmd.items.collector.desc", resourceCulture);
}
}
internal static string cmd_items_collector_usage {
get {
return ResourceManager.GetString("cmd.items.collector.usage", resourceCulture);
}
}
internal static string cmd_items_collector_already_collecting {
get {
return ResourceManager.GetString("cmd.items.collector.already.collecting", resourceCulture);
}
}
internal static string cmd_items_collector_started {
get {
return ResourceManager.GetString("cmd.items.collector.started", resourceCulture);
}
}
internal static string cmd_items_collector_already_not_collecting {
get {
return ResourceManager.GetString("cmd.items.collector.already.not.collecting", resourceCulture);
}
}
internal static string cmd_items_collector_stopping {
get {
return ResourceManager.GetString("cmd.items.collector.stopping", resourceCulture);
}
}
internal static string cmd_items_collector_stopped {
get {
return ResourceManager.GetString("cmd.items.collector.stopped", resourceCulture);
}
}
}
}

View file

@ -2037,4 +2037,25 @@ Logging in...</value>
<data name="bot.TelegramBridge.quit_disabled" xml:space="preserve">
<value>This command has been disabled due to Telegram caching causing issues, please stop your client manually.</value>
</data>
<data name="cmd.items.collector.desc" xml:space="preserve">
<value>Collect items on the ground</value>
</data>
<data name="cmd.items.collector.usage" xml:space="preserve">
<value>itemscollector &lt;start/stop&gt;</value>
</data>
<data name="cmd.items.collector.already.collecting" xml:space="preserve">
<value>Already collecting items!</value>
</data>
<data name="cmd.items.collector.started" xml:space="preserve">
<value>Started collecting items!</value>
</data>
<data name="cmd.items.collector.already.not.collecting" xml:space="preserve">
<value>Already not collecting items!</value>
</data>
<data name="cmd.items.collector.stopping" xml:space="preserve">
<value>Stopping item collection...</value>
</data>
<data name="cmd.items.collector.stopped" xml:space="preserve">
<value>Stopped collecting items.</value>
</data>
</root>