Skip to content

Commit

Permalink
Add more items to the item info command (missing french, spanish)
Browse files Browse the repository at this point in the history
  • Loading branch information
Iapetus-11 committed Jul 13, 2024
1 parent 207a8d2 commit 8459e73
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 2 deletions.
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
23 changes: 23 additions & 0 deletions bot/data/text/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
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

0 comments on commit 8459e73

Please sign in to comment.