From 91f1ffbbad9105cbb231e38848f4247312a34474 Mon Sep 17 00:00:00 2001 From: Milo Weinberg Date: Sat, 13 Jul 2024 18:59:52 -0400 Subject: [PATCH 1/6] Add more items to the item info command (missing french, spanish) --- bot/cogs/commands/econ.py | 12 ++++++++++-- bot/data/text/en.json | 30 ++++++++++++++++++++++++++++++ bot/data/text/pt.json | 23 +++++++++++++++++++++++ bot/models/translation.py | 3 +++ 4 files changed, 66 insertions(+), 2 deletions(-) diff --git a/bot/cogs/commands/econ.py b/bot/cogs/commands/econ.py index 16d8a476..c7e4b1c0 100644 --- a/bot/cogs/commands/econ.py +++ b/bot/cogs/commands/econ.py @@ -2590,9 +2590,17 @@ async def item_info(self, ctx: Ctx, *, item_name: str): ) if item_name in ctx.l.econ.item_bible.item_mapping: + item_info = ctx.l.econ.item_bible.item_mapping[item_name] + + prefix = "" + joiner = "" + if item_info.quoted: + prefix = "> " + joiner = "> \ufeff" + embed.description = ( - "\n> \ufeff\n".join([ - f"> {dl.format(prefix=ctx.prefix)}" + f"\n{joiner}\n".join([ + f"{prefix}{dl.format(prefix=ctx.prefix)}" for dl in ctx.l.econ.item_bible.item_mapping[item_name].description ]) + "\n\ufeff" diff --git a/bot/data/text/en.json b/bot/data/text/en.json index 8e832dca..8948a3f6 100644 --- a/bot/data/text/en.json +++ b/bot/data/text/en.json @@ -2500,6 +2500,36 @@ "Reduces the cooldown on the `{prefix}mine` command by `0.5 seconds`.", "This enchantment book is applied automatically as long as it remains in your inventory, and also transfers to all new pickaxes. This enchantment book does not stack." ] + }, + + "Luck Potion": { + "description": [ + "> When used with the `{prefix}chug Luck Potion` command you will experience the effects listed below for `4 minutes and 30 seconds`.", + "Significantly increases chances of:\n- Obtaining extra vault spaces while running economy commands.\n- Finding collectibles from mining.\n- Finding fishing bait when emptying the `{prefix}trashcan`.", + "Significantly decreases chances of:\n- Fishing up junk (instead of collectibles or fish).\n- Losing bees when using the `{prefix}honey` command." + ], + "quoted": false + }, + "Recycler": { + "description": [ + "When present in your inventory, it doubles the emerald reward from emptying your `{prefix}trashcan`." + ] + }, + "Slime Ball": { + "description": [ + "Dropped from killing Baby Slimes with a chance of `1/25` (affected by looting enchantments). This item can be used to purchase the **Slime Trophy** and can be traded using **Glass Beaker**s." + ] + }, + "Ender Pearl": { + "description": [ + "Dropped from killing Endermen with a chance of `1/30` (affected by looting enchantments). This item can be used to purchase various items in the `{prefix}shop`." + ] + }, + "Bane Of Pillagers Amulet": { + "description": [ + "When present in your inventory, it increases the emeralds won from gambling and aids in protecting you from successful pillages.", + "This item awards a special role in the Villager Bot Support Server" + ] } }, "item_tag_names": { diff --git a/bot/data/text/pt.json b/bot/data/text/pt.json index d93b1347..29f24c89 100644 --- a/bot/data/text/pt.json +++ b/bot/data/text/pt.json @@ -2500,6 +2500,29 @@ "Reduz o tempo de espera do comando `{prefix}mine` em `0,5 segundos`.", "Este livro de encantamentos é aplicado automaticamente enquanto permanecer em seu inventário e também é transferido para todas as novas picaretas. Este livro de encantamentos não acumula." ] + }, + "Luck Potion": { + "description": [ + "> Quando usada com o comando `{prefix}chug Luck Potion`, você irá experienciar os efeitos listados abaixo por `4 minutos e 30 segundos`.", + "Aumentar significativamente as chances de:\n- Obter espaços de cofre extras ao executar comandos de economia.\n- Encontrar itens colecionáveis ​​da mineração.", + "Diminuir significativamente as chances de:\n- Pescar lixo (em vez de itens colecionáveis ​​ou peixes).\n- Perder abelhas ao usar o comando `{prefix}honey`.\n- Encontrar isca de pesca ao esvaziar a `{prefix}trashcan`." + ], + "quoted": false + }, + "Recycler": { + "description": [ + "Quando presente em seu inventário, dobra a recompensa de esmeralda ao esvaziar sua `{prefix}trashcan`." + ] + }, + "Slime Ball": { + "description": [ + "Dropado ao matar Bebês Slime com uma chance de `1/25` (afetado por encantamentos de saque). Este item pode ser usado para comprar o **Slime Trophy** e pode ser negociado usando **Glass Beaker**s." + ] + }, + "Ender Pearl": { + "description": [ + "Dropado ao matar Endermen com uma chance de `1/30` (afetado por encantamentos de saque). Este item pode ser usado para comprar vários itens na `{prefix}shop`." + ] } }, "item_tag_names": { diff --git a/bot/models/translation.py b/bot/models/translation.py index 1935ad38..7608ab94 100644 --- a/bot/models/translation.py +++ b/bot/models/translation.py @@ -1,3 +1,5 @@ +from pydantic import Field + from common.models.base_model import ImmutableBaseModel @@ -782,6 +784,7 @@ class Econ_DailyQuests(ImmutableBaseModel): class Econ_ItemBible_MappingEntry(ImmutableBaseModel): description: list[str] + quoted: bool = Field(default=True) class Econ_ItemBible_DropRate(ImmutableBaseModel): From ed85c8e6ecb2b7e3a86c8012c328d4f7b8da5cea Mon Sep 17 00:00:00 2001 From: Milo Weinberg Date: Sat, 13 Jul 2024 19:30:40 -0400 Subject: [PATCH 2/6] Add spanish translation --- bot/data/text/es.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/bot/data/text/es.json b/bot/data/text/es.json index b3c38b82..d28e7042 100644 --- a/bot/data/text/es.json +++ b/bot/data/text/es.json @@ -2500,6 +2500,29 @@ "Reduce el tiempo de espera del comando `{prefix}mine` por `0.5 segundos`.", "Este libro de encantamientos es aplicado automáticamente mientras permanezca en el inventario a todos los picos. No es acumulable." ] + }, + "Luck Potion": { + "description": [ + "> Cuando se usa con el comando `{prefix}chug Luck Potion` serás afectado por `4 minutos y 30 segundos` con los efectos listados a continuación", + "Aumenta significativamente las probabilidades de:\n- Obtener espacios extra en tu baúl al usar comandos de economía.\n- Encontrar objetos coleccionables minando.\n- Encontrar cebo cuando se usa el comando `{prefix}trashcan`.", + "Reduce significativamente las probabilidades de: \n- Pescar basura (en vez de peces u objetos coleccionables).\n- Perder abejas cuando se usa el comando `{prefix}honey`." + ], + "quoted": false + }, + "Recycler": { + "description": [ + "Cuando está presente en el inventario, duplica las esmeraldas recibidas con el comando `{prefix}trashcan`." + ] + }, + "Slime Ball": { + "description": [ + "Obtenible al matar Bebés Slime con una probabilidad de`1/25` (variable con encantamientos de botín). Este objeto puede usarse para comprar el **Slime Trophy** e intercambiable al combinarlo con un **Glass Beaker**s." + ] + }, + "Ender Pearl": { + "description": [ + "Obtenible al matar Endermans con una probabilidad de `1/30` (variable con encantamientos de botín). Este objeto puede usarse para comprar varios productos en la `{prefix}shop`." + ] } }, "item_tag_names": { From 5cb4d9417c53c28098859e2b71fa6b0892f51fc4 Mon Sep 17 00:00:00 2001 From: Milo Weinberg Date: Sat, 13 Jul 2024 19:43:12 -0400 Subject: [PATCH 3/6] Add spanish for bane of pillagers amulet --- bot/data/text/es.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bot/data/text/es.json b/bot/data/text/es.json index d28e7042..23c0881d 100644 --- a/bot/data/text/es.json +++ b/bot/data/text/es.json @@ -2523,6 +2523,12 @@ "description": [ "Obtenible al matar Endermans con una probabilidad de `1/30` (variable con encantamientos de botín). Este objeto puede usarse para comprar varios productos en la `{prefix}shop`." ] + }, + "Bane Of Pillagers Amulet": { + "description": [ + "Cuando está presente en el inventario, aumenta las esmeradas ganadas apostando y ayuda a protegerte de los saqueos.", + "Este objeto te permite tener un rol especial en el servidor de soporte de Villager Bot." + ] } }, "item_tag_names": { From 4225267d87ad8a73b24d7f710cc0cc47b6cad7b9 Mon Sep 17 00:00:00 2001 From: Milo Weinberg Date: Sat, 13 Jul 2024 20:09:30 -0400 Subject: [PATCH 4/6] Add portuguese for bane of pillagers amulet --- bot/data/text/pt.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bot/data/text/pt.json b/bot/data/text/pt.json index 29f24c89..dfccecf2 100644 --- a/bot/data/text/pt.json +++ b/bot/data/text/pt.json @@ -2523,6 +2523,12 @@ "description": [ "Dropado ao matar Endermen com uma chance de `1/30` (afetado por encantamentos de saque). Este item pode ser usado para comprar vários itens na `{prefix}shop`." ] + }, + "Bane Of Pillagers Amulet": { + "description": [ + "Quando presente em seu inventário, aumenta as esmeraldas ganhas em apostas e ajuda a protegê-lo de saqueamentos bem-sucedidos.", + "Este item concede um cargo especial no servidor de suporte do Villager Bot" + ] } }, "item_tag_names": { From d95235c4dca6168629997cbaff8cc523b91f3474 Mon Sep 17 00:00:00 2001 From: Milo Weinberg Date: Mon, 15 Jul 2024 19:23:23 -0400 Subject: [PATCH 5/6] Add bopa for fr --- bot/data/text/fr.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bot/data/text/fr.json b/bot/data/text/fr.json index a58c0273..b1ccead6 100644 --- a/bot/data/text/fr.json +++ b/bot/data/text/fr.json @@ -2500,6 +2500,13 @@ "Reduit le cooldown de la commande `{prefix}mine` par `0.5 seconds`.", "Cet effet est appliqué automatiquement tant que l'objet se trouve dans votre inventaire, et s'applique à toutes vos pioches. Cet effet ne s'additionne pas." ] + }, + + "Bane Of Pillagers Amulet": { + "description": [ + "Lorsque cet objet est présent dans votre inventaire, il augmente les émeraudes obtenues dans les paris tout en aidant à vous protéger des pillages.", + "Cet objet vous offre un rôle spécial dans le Villager Bot Support Server" + ] } }, "item_tag_names": { From 28835745f2f25caf39827f62603f00cd86376462 Mon Sep 17 00:00:00 2001 From: Milo Weinberg Date: Mon, 15 Jul 2024 20:02:47 -0400 Subject: [PATCH 6/6] Finish french translation --- bot/data/text/fr.json | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/bot/data/text/fr.json b/bot/data/text/fr.json index b1ccead6..cc1d9140 100644 --- a/bot/data/text/fr.json +++ b/bot/data/text/fr.json @@ -2501,7 +2501,29 @@ "Cet effet est appliqué automatiquement tant que l'objet se trouve dans votre inventaire, et s'applique à toutes vos pioches. Cet effet ne s'additionne pas." ] }, - + "Luck Potion": { + "description": [ + "> Lorsqu'elle est utilisée avec la commande`{prefix}chug Luck Potion`, vous ressentirez les effets énumérés ci-dessous pendant `4 minutes et 30 secondes`.", + "Augmente grandement les chances de :\n- Obtenir des espaces de coffre supplémentaires lors de l'exécution des commandes économiques.\n- Trouver des objets de collection en minant.\n- Trouver des appâts de pêche en vidant la `{prefix}trashcan`.", + "Diminue grandement les chances de :\n- Pêcher des déchets (au lieu des objets de collection ou des poissons).\n- Perdre des abeilles lors de l'utilisation de la commande `{prefix}miel`." + ], + "quoted": false + }, + "Recycler": { + "description": [ + "Lorsqu'il est présent dans votre inventaire, il double la récompense en émeraudes lorsque vous videz votre `{prefix}poubelle`." + ] + }, + "Slime Ball": { + "description": [ + "Lachée en tuant des Bébés Slimes avec une chance de `1/25` (affectée par les enchantements de pillage). Cet objet peut être utilisé pour acheter le **Slime Trophy** et peut être échangé à l'aide de **Glass Beaker**s." + ] + }, + "Ender Pearl": { + "description": [ + "Lachée en tuant des Endermen avec une chance de `1/30` (affectée par les enchantements de pillage). Cet objet peut être utilisé pour acheter divers objets dans le `{prefix}magasin`." + ] + }, "Bane Of Pillagers Amulet": { "description": [ "Lorsque cet objet est présent dans votre inventaire, il augmente les émeraudes obtenues dans les paris tout en aidant à vous protéger des pillages.",