Refactor audio effect handling: remove cooldown logic and enhance sound playback functionality

This commit is contained in:
Kirill
2026-10-03 13:36:33 +03:00
parent 9e13c8bbe3
commit 6f6a1be3bd
8 changed files with 58 additions and 22 deletions
+4 -2
View File
@@ -58,8 +58,10 @@ func produce_for_period(previous: Dictionary, target: Dictionary, quantities: Di
amount = world.ledger.credit(target, id, amount)
world.batches.append_batch(target, id, amount, from_year, to_year)
# Keep unused automatic resources across cycles; they are part of free amounts.
var budget: Dictionary = previous.get("auto_resources", {}).duplicate(true)
# Automation may spend only the automatic output produced during this cycle.
# Any unused part becomes an ordinary free resource on the next cycle instead
# of remaining eligible for later automatic production.
var budget: Dictionary = {}
for id in automatic:
budget[id] = E.add(budget.get(id, 0), automatic[id])
for id in budget: