diff --git a/exts/banking.py b/exts/banking.py index 0282f91..54cb861 100644 --- a/exts/banking.py +++ b/exts/banking.py @@ -232,17 +232,17 @@ class Banking(commands.Cog): "steel40": 0 } for rd in resource_delta: - total["money"] += rd.get("money") - total["steel100"] += rd.get("steel100") - total["steel40"] += rd.get("steel40") - total["aluminum"] += rd.get("aluminum") - total["food"] += rd.get("food") - total["munitions"] += rd.get("munitions") - total["uranium"] += rd.get("uranium") - total["gasoline"] += rd.get("gasoline") + total["money"] += max(0, rd.get("money")) + total["steel100"] += max(0, rd.get("steel100")) + total["steel40"] += max(0, rd.get("steel40")) + total["aluminum"] += max(0, rd.get("aluminum")) + total["food"] +=max(0, rd.get("food")) + total["munitions"] += max(0, rd.get("munitions")) + total["uranium"] += max(0, rd.get("uranium")) + total["gasoline"] += max(0, rd.get("gasoline")) e.description += ( - "\n# Total warchest to transfer" + "\n **Total warchest to transfer**\n" f"{Emojis.money} {total.get('money'):,}\n" f"{Emojis.food} {total.get('food'):,}\n" f"{Emojis.uranium} {total.get('uranium'):,}\n"