add + uncythonize format_required function to misc.py
@@ -91,3 +91,11 @@ def emojify_item(d, item: str):
return d.emojis[emoji_key]
except KeyError:
return d.emojis.air
+
+def format_required(d: object, shop_item: object, amount: int = 1):
+ base = f" {shop_item.buy_price * amount}{d.emojis.emerald}"
+
+ for req_item, req_amount in shop_item.requires.get("items", {}).items():
+ base += f" + {req_amount * amount}{d.emojis[d.emoji_items[req_item]]}"
+
+ return base
\ No newline at end of file
