diff options
| author | Valentin Popov <valentin@popov.link> | 2026-12-02 15:28:59 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-12-02 15:28:59 +0300 |
| commit | aafdd0c398923f51625b632789ff0c7948b006e8 (patch) | |
| tree | 34717d5b9750e5d0ccf7e11ff91de66b09cb762c /apps/fparkan-game/src/strategic_view.rs | |
| parent | cc6bbdfa4aebf844ec7be2e8eb01b7fd1c69d24b (diff) | |
| download | fparkan-aafdd0c398923f51625b632789ff0c7948b006e8.tar.xz fparkan-aafdd0c398923f51625b632789ff0c7948b006e8.zip | |
feat(ui): stop an active strategic factory order
Diffstat (limited to 'apps/fparkan-game/src/strategic_view.rs')
| -rw-r--r-- | apps/fparkan-game/src/strategic_view.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/fparkan-game/src/strategic_view.rs b/apps/fparkan-game/src/strategic_view.rs index 94c1006d..7c32f6bc 100644 --- a/apps/fparkan-game/src/strategic_view.rs +++ b/apps/fparkan-game/src/strategic_view.rs @@ -507,7 +507,7 @@ impl StaticVulkanApp { xy, frame.plants.len(), plant.projects.len(), - plant.progress.is_none() && plant.free_minds > 0, + frame.order_button(), ) { Some(FactoryAction::Close) => view.factory = None, Some(FactoryAction::Plant(index)) => { @@ -534,6 +534,15 @@ impl StaticVulkanApp { } } } + Some(FactoryAction::Cancel) => { + if let Err(error) = fparkan_runtime::cancel_clan_factory_order( + engine, + cockpit, + plant.handle, + ) { + eprintln!("strategic_factory_cancel_rejected reason={error}"); + } + } None => {} } } |
