aboutsummaryrefslogtreecommitdiff
path: root/apps/fparkan-game/src/strategic_view.rs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/fparkan-game/src/strategic_view.rs')
-rw-r--r--apps/fparkan-game/src/strategic_view.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/apps/fparkan-game/src/strategic_view.rs b/apps/fparkan-game/src/strategic_view.rs
index a6719c84..2d6d86a5 100644
--- a/apps/fparkan-game/src/strategic_view.rs
+++ b/apps/fparkan-game/src/strategic_view.rs
@@ -652,6 +652,23 @@ impl StaticVulkanApp {
view.focus_bunker(engine, cockpit, row.handle);
Some(row)
}
+ Some(BuildingHit::Manual(index)) => {
+ let row = rows[index];
+ let selected = view.select_building(row);
+ if let Some(vehicle) = fparkan_runtime::bunker_control::enter(
+ engine, cockpit, row.handle,
+ ) {
+ self.enter_remote_cockpit(
+ cockpit,
+ vehicle,
+ RemoteWarbotControl::Manual,
+ );
+ }
+ if let Some(row) = selected {
+ self.play_building_selection(row);
+ }
+ return;
+ }
Some(BuildingHit::Row(index)) => rows.get(index).copied(),
None => rows.into_iter().find(|row| Some(row.handle) == map_hit),
};
@@ -833,6 +850,15 @@ impl StaticVulkanApp {
else {
return;
};
+ self.enter_remote_cockpit(hero, vehicle, mode);
+ }
+
+ fn enter_remote_cockpit(
+ &mut self,
+ hero: super::StartingCockpit,
+ vehicle: super::StartingCockpit,
+ mode: RemoteWarbotControl,
+ ) {
self.remote_command_view = self.command_view.take();
if let Some(view) = &mut self.remote_command_view {
view.order_input = None;