diff --git a/bot/cogs/commands/econ.py b/bot/cogs/commands/econ.py index 864b874a..93265796 100644 --- a/bot/cogs/commands/econ.py +++ b/bot/cogs/commands/econ.py @@ -2486,6 +2486,11 @@ async def item_info(self, ctx: Ctx, *, item_name: str): drop_rate_text = ctx.l.econ.item_bible.drop_rate.not_mineable_or_fishable trait_text = "" + rarity_text = ( + ctx.l.econ.item_bible.rarity.singular + if item_count == 1 + else ctx.l.econ.item_bible.rarity.plural.format(amount=item_count) + ) if db_item is not None and db_item.sellable: trait_text += f"💸 {ctx.l.econ.item_bible.traits.sellable}\n" @@ -2533,6 +2538,11 @@ async def item_info(self, ctx: Ctx, *, item_name: str): f"🛍️ {ctx.l.econ.item_bible.traits.purchaseable.format(prefix=ctx.prefix)}\n" ) + if db_item is not None: + rarity_text += ( + f"\n{ctx.l.econ.item_bible.rarity.owned_amount.format(amount=db_item.amount)}" + ) + if trait_text: embed.add_field(name=ctx.l.econ.item_bible.traits.title, value=trait_text) embed.add_field(name="\ufeff", value="\ufeff") @@ -2541,11 +2551,7 @@ async def item_info(self, ctx: Ctx, *, item_name: str): embed.add_field( name=ctx.l.econ.item_bible.rarity.title, - value=( - ctx.l.econ.item_bible.rarity.singular - if item_count == 1 - else ctx.l.econ.item_bible.rarity.plural.format(amount=item_count) - ), + value=rarity_text, inline=False, ) diff --git a/bot/cogs/core/quests.py b/bot/cogs/core/quests.py index 7b1422d0..3a0bb036 100644 --- a/bot/cogs/core/quests.py +++ b/bot/cogs/core/quests.py @@ -256,7 +256,9 @@ async def quest_completed( elif quest.reward_item == "Barrel": await self.db.add_item(user_id, "Barrel", 1024, quest.reward_amount) else: - raise NotImplementedError(f"Couldn't reward item {quest.reward_item} to user {user_id}") + raise NotImplementedError( + f"Couldn't reward item {quest.reward_item} to user {user_id}" + ) await self.db.update_lb(user_id, "daily_quests", 1) await self.db.update_lb(user_id, "week_daily_quests", 1) diff --git a/bot/data/text/en.json b/bot/data/text/en.json index 95f6c503..d10731e6 100644 --- a/bot/data/text/en.json +++ b/bot/data/text/en.json @@ -2448,11 +2448,6 @@ "You can plant a **Chorus Seed** using the `{prefix}farm plant Chorus Seed` command to grow `1-2` **Chorus Fruit**." ] }, - - - - - "Bone Meal": { "description": [ "Dropped from killing Skeletons with a chance of `1/20` (affected by looting enchantments). You can use this item with the `{prefix}use Bone Meal` command, which grows all crops by `67%` of the time they take to grow." @@ -2532,7 +2527,8 @@ "rarity": { "title": "Rarity", "singular": "*`1` person has this item*", - "plural": "*`{amount}` people have this item*" + "plural": "*`{amount}` people have this item*", + "owned_amount": "*You have `{amount}` of this item*" }, "season": { "title": "Event / Season", diff --git a/bot/data/text/es.json b/bot/data/text/es.json index 06d54bad..6bb7e585 100644 --- a/bot/data/text/es.json +++ b/bot/data/text/es.json @@ -2527,7 +2527,8 @@ "rarity": { "title": "Rareza", "singular": "*`1` persona posee este objeto*", - "plural": "*`{amount}` personas poseen este objeto*" + "plural": "*`{amount}` personas poseen este objeto*", + "owned_amount": "*Posees `{amount}` unidades de este objeto*" }, "season": { "title": "Evento / Temporada", diff --git a/bot/data/text/fr.json b/bot/data/text/fr.json index 9ae5ff0a..30c907fc 100644 --- a/bot/data/text/fr.json +++ b/bot/data/text/fr.json @@ -2527,7 +2527,8 @@ "rarity": { "title": "Rarity", "singular": "*`1` personne a cet objet*", - "plural": "*`{amount}` personnes ont cet objet*" + "plural": "*`{amount}` personnes ont cet objet*", + "owned_amount": "*Vous avez `{amount}` exemplaire(s) de cet objet*" }, "season": { "title": "Évenement / Saison", diff --git a/bot/data/text/pt.json b/bot/data/text/pt.json index 2717055e..e9243d34 100644 --- a/bot/data/text/pt.json +++ b/bot/data/text/pt.json @@ -2527,7 +2527,8 @@ "rarity": { "title": "Raridade", "singular": "*`1` pessoa tem esse item*", - "plural": "*`{amount}` pessoas têm esse item*" + "plural": "*`{amount}` pessoas têm esse item*", + "owned_amount": "*Você tem `{amount}` desse item*" }, "season": { "title": "Evento / Temporada", diff --git a/bot/models/translation.py b/bot/models/translation.py index 4444ea59..b74cd55f 100644 --- a/bot/models/translation.py +++ b/bot/models/translation.py @@ -802,6 +802,11 @@ class Econ_ItemBible_Rarity(ImmutableBaseModel): title: str singular: str plural: str + owned_amount: str + + +class Econ_ItemBible_Owned(ImmutableBaseModel): + text: str class Econ_ItemBible_Season(ImmutableBaseModel):