Refactor audio effect handling: remove cooldown logic and enhance sound playback functionality
This commit is contained in:
@@ -176,8 +176,19 @@ func run() -> void:
|
||||
world.state.amount.Met = 100
|
||||
world.state.auto_resources.H = 100
|
||||
world.evolute(E.of("0.1"))
|
||||
check((E.eq(world.state.amount.RD, 101) and E.eq(world.state.amount.H, 0)), "Automatic formation uses its resource budget")
|
||||
check(E.ge(world.state.binds.RD.HP, 1), "Automatic formation also creates planets")
|
||||
check((E.eq(world.state.amount.RD, 1) and E.eq(world.state.amount.H, 100)), "Automatic formation cannot spend hydrogen retained from an earlier cycle")
|
||||
check(E.eq(world.state.auto_resources.get("H", 0), 0), "Unused automatic hydrogen becomes an ordinary free resource")
|
||||
dispose(world)
|
||||
|
||||
world = fixture()
|
||||
world.catalog.entities.N.auto = 1
|
||||
world.state.amount.RD = 1
|
||||
world.state.amount.H = 100
|
||||
world.state.amount.Met = 100
|
||||
world.evolute(100)
|
||||
check(E.gt(world.state.amount.RD, 1), "Automatic formation can spend newly produced hydrogen")
|
||||
check(E.ge(world.state.amount.H, 100), "Automatic formation preserves hydrogen available before the cycle")
|
||||
check(E.ge(world.state.binds.get("RD", {}).get("HP", 0), 1), "Automatic formation also creates planets")
|
||||
dispose(world)
|
||||
|
||||
world = fixture()
|
||||
|
||||
Reference in New Issue
Block a user