Make contracts scale again
authorJoann Mõndresku <joann@cernodile.com>
Sun, 19 May 2024 11:32:00 +0000 (14:32 +0300)
committerJoann Mõndresku <joann@cernodile.com>
Sun, 19 May 2024 11:32:00 +0000 (14:32 +0300)
contracts.py

index 2cbf1b9e4ed39e7a8078a3a2f572587deeeb9f1f..7cef4e0878cce26d95e83ca42d366651dd39488d 100644 (file)
@@ -48,6 +48,9 @@ def __convert_contract_to_proto(obj):
                scale_factor = contract.max_coop_size * 0.35
                if scale_factor > 1.0:
                        scaler = 1.0 / scale_factor
+                       for goalset in contract.goal_sets:
+                               for goal in goalset.goals:
+                                       goal.target_amount *= scale_factor
        return contract
 
 def load_contracts():