diff --git a/src/state/editor_screen/upgrade_panel.rs b/src/state/editor_screen/upgrade_panel.rs index 8457d40..ea4e9f0 100644 --- a/src/state/editor_screen/upgrade_panel.rs +++ b/src/state/editor_screen/upgrade_panel.rs @@ -38,7 +38,12 @@ impl Plugin for UpgradePanelPlugin { .and_then(state_changed::().or_else(on_event::())), ), ) - .add_systems(Update, update_upgrade_button_disabled.in_set(AppSet::End)); + .add_systems( + Update, + update_upgrade_button_disabled + .in_set(AppSet::End) + .run_if(in_state(AppState::EditorScreen)), + ); } } diff --git a/src/upgrade.rs b/src/upgrade.rs index 8885d72..f2996b5 100644 --- a/src/upgrade.rs +++ b/src/upgrade.rs @@ -51,7 +51,7 @@ impl Plugin for UpgradePlugin { .add_systems( Update, ( - process_new_installed_upgrades, + process_new_installed_upgrades.run_if(on_event::()), install_upgrades.run_if(on_event::()), run_installed_upgrades, apply_deferred,