Updated future testing logic.

This commit is contained in:
Henry Faber 2026-07-01 15:03:12 +01:00
parent da9f947788
commit 49a8913c14
3 changed files with 11 additions and 2 deletions

View file

@ -57,6 +57,13 @@ func _spawn_test_pickups() -> void:
func pickup_collected() -> void:
# Called by the player when a pickup is collected.
# Sync WeaponComponent's test_mode so tab cycling stays independent of
# pickups when in test mode, and normal behavior is restored otherwise.
var level: Node2D = get_parent() as Node2D
if level != null:
var wc: WeaponComponent = level.get_node_or_null("WeaponComponent")
if wc != null:
wc.test_mode = test_mode
# Decrement counter; resume timer once all pickups are gone.
_pickups_remaining = max(0, _pickups_remaining - 1)
if _pickups_remaining <= 0: