A bit more cleaning up of the gui and fsm, probaby done.

This commit is contained in:
Zed A. Shaw 2025-02-21 01:04:32 -05:00
parent dd4f77a106
commit 6c1d851e85
3 changed files with 12 additions and 5 deletions

View file

@ -77,8 +77,8 @@ namespace gui {
void FSM::MOVING(Event ) {
// this should be an optional that returns a point
if($main_ui.play_move()) {
System::plan_motion(*$level.world, {size_t($main_ui.$camera.target_x), size_t($main_ui.$camera.target_y)});
if(auto move_to = $main_ui.play_move()) {
System::plan_motion(*$level.world, *move_to);
run_systems();
state(State::IDLE);
}