Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more items to the item info command #311

Merged
merged 6 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions bot/cogs/commands/econ.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
30 changes: 30 additions & 0 deletions bot/data/text/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
29 changes: 29 additions & 0 deletions bot/data/text/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2500,6 +2500,35 @@
"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`."
]
},
"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": {
Expand Down
29 changes: 29 additions & 0 deletions bot/data/text/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2500,6 +2500,35 @@
"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."
]
},
"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.",
"Cet objet vous offre un rôle spécial dans le Villager Bot Support Server"
]
}
},
"item_tag_names": {
Expand Down
29 changes: 29 additions & 0 deletions bot/data/text/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -2500,6 +2500,35 @@
"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`."
]
},
"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": {
Expand Down
3 changes: 3 additions & 0 deletions bot/models/translation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pydantic import Field

from common.models.base_model import ImmutableBaseModel


Expand Down Expand Up @@ -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):
Expand Down
Loading