theRAPTLab / gsgo

GEM-STEP Foundation repo migrated from GitLab June 2023
1 stars 1 forks source link

Bug: Always show "RESET STAGE" button - [merged] #746

Closed benloh closed 1 year ago

benloh commented 1 year ago

Merges dev-bl/always-show-reset-stage -> dev-next

Joshua reported that the "RESET STAGE" button is not shown if Round Looping is turned off and a round ends naturally.

The problem was that PanelPlayback was keeping track of the sim isRunning state by setting local state based on the round button presses (PREP ROUND, START ROUND, STOP ROUND, etc.). When a round runs out, there is no button press, so the isRunning state is never cleared.

api-sim aka SIMCTRL keeps track of IsRunning() with its own method. The fix is to actively rely on api-sim's isRunning state instead of trying to track it locally.

Now when the round ends, api-sim.IsRunning() will return false, and the "RESET STAGE" button will be shown.

benloh commented 1 year ago

requested review from @jdanish

benloh commented 1 year ago

mentioned in commit 0ab91f881c320bf95171de0687612bc36dcf4d0b