Fix bear gate re-opening after Play Again
Clearing the arena's last wave set the DP debug flag "gate_unlocked_bear" to true as a side effect. That flag lives on the DP autoload, which survives scene reloads and isn't touched by Run.start_new_run() — so once cleared for real in a play session, it stayed true forever, permanently overriding the per-run Run.cleared-based gate check in lobby_underground.gd. Every later lobby load (including after Play Again reset the real run state) kept re-opening the gate. The DP flag is meant to be a manual designer override for testing the animation (per its own doc comment), not something gameplay code sets persistently — Run.bear_gate_open() is already the real per-run source of truth. Removed the stray set_value() call. Verified in isolation: clearing the arena's last wave no longer touches the DP flag (stays false), so the gate only opens through the run-scoped Run.cleared state, which already resets correctly on Play Again. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MXBNaEBmrYDSMcv4NgUWtV
This commit is contained in:
@@ -83,7 +83,6 @@ func _on_matador_killed() -> void:
|
|||||||
if _alive > 0 or _resolved:
|
if _alive > 0 or _resolved:
|
||||||
return
|
return
|
||||||
if _wave >= DP.f("mat_wave_size"):
|
if _wave >= DP.f("mat_wave_size"):
|
||||||
DP.set_value("gate_unlocked_bear", true)
|
|
||||||
_resolved = true
|
_resolved = true
|
||||||
all_defeated.emit()
|
all_defeated.emit()
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user