aboutsummaryrefslogtreecommitdiff
path: root/apps/fparkan-game/src
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-12-02 12:07:11 +0300
committerValentin Popov <valentin@popov.link>2026-12-02 12:07:11 +0300
commit7dd027fd5130daf532cd2214a6d9689293bb2c86 (patch)
tree16750c5f0652031a839d3e1563da73719a9c7afe /apps/fparkan-game/src
parentdc92ae05f97d84a1681995e0712b01053e48704c (diff)
downloadfparkan-7dd027fd5130daf532cd2214a6d9689293bb2c86.tar.xz
fparkan-7dd027fd5130daf532cd2214a6d9689293bb2c86.zip
feat(ui): assign search and destroy from the warbot panel
Show the native search status immediately without opening the map. Verify from the stock Two Fortresses start that the selected marker moves with the internal route hidden and that Stand cancels the search.
Diffstat (limited to 'apps/fparkan-game/src')
-rw-r--r--apps/fparkan-game/src/strategic_roster_hud.rs7
-rw-r--r--apps/fparkan-game/src/strategic_view.rs5
2 files changed, 9 insertions, 3 deletions
diff --git a/apps/fparkan-game/src/strategic_roster_hud.rs b/apps/fparkan-game/src/strategic_roster_hud.rs
index 37b5b1a5..1a57bc70 100644
--- a/apps/fparkan-game/src/strategic_roster_hud.rs
+++ b/apps/fparkan-game/src/strategic_roster_hud.rs
@@ -19,7 +19,7 @@ pub(super) struct StrategicRosterHud {
card: Option<WarbotStats>,
rows: Vec<WarbotRow>,
selected: Option<ObjectHandle>,
- order_labels: [String; 4],
+ order_labels: [String; 5],
orders: Option<Option<RosterOrder>>,
}
@@ -57,8 +57,9 @@ impl StrategicRosterHud {
[1.0; 3],
1.0,
)?;
- let [orders, stand, follow, patrol] = [0x13dc, 0x1388, 0x1389, 0x138e].map(localized);
- let order_labels = [orders?, stand?, follow?, patrol?];
+ let [orders, stand, follow, search, patrol] =
+ [0x13dc, 0x1388, 0x1389, 0x138b, 0x138e].map(localized);
+ let order_labels = [orders?, stand?, follow?, search?, patrol?];
Ok(Self {
range,
images,
diff --git a/apps/fparkan-game/src/strategic_view.rs b/apps/fparkan-game/src/strategic_view.rs
index b19de9d4..869b9d77 100644
--- a/apps/fparkan-game/src/strategic_view.rs
+++ b/apps/fparkan-game/src/strategic_view.rs
@@ -386,6 +386,11 @@ impl StaticVulkanApp {
view.order_input = Some(OrderInput::Route(Vec::new()));
return;
}
+ Some((actor, RosterOrder::SearchAndDestroy)) => {
+ strategic_orders::search_and_destroy(engine, cockpit, actor);
+ view.order_input = None;
+ return;
+ }
Some((_, RosterOrder::Patrol)) => {
view.order_input = Some(OrderInput::Patrol);
return;