aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/strategic_orders.rs
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 /crates/fparkan-runtime/src/strategic_orders.rs
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 'crates/fparkan-runtime/src/strategic_orders.rs')
-rw-r--r--crates/fparkan-runtime/src/strategic_orders.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/fparkan-runtime/src/strategic_orders.rs b/crates/fparkan-runtime/src/strategic_orders.rs
index d49fa963..a20153b0 100644
--- a/crates/fparkan-runtime/src/strategic_orders.rs
+++ b/crates/fparkan-runtime/src/strategic_orders.rs
@@ -50,6 +50,15 @@ pub fn stand(engine: &mut Engine, cockpit: StartingCockpit, actor: ObjectHandle)
issue(engine, cockpit, actor, UnitOrder::Stand)
}
+/// Orders the selected warbot to search for hostile mobile units.
+pub fn search_and_destroy(
+ engine: &mut Engine,
+ cockpit: StartingCockpit,
+ actor: ObjectHandle,
+) -> bool {
+ issue(engine, cockpit, actor, UnitOrder::SearchAndDestroy)
+}
+
/// Replaces the selected warbot's order with the confirmed sequence of world points.
pub fn follow_route(
engine: &mut Engine,