aboutsummaryrefslogtreecommitdiff
path: root/apps/fparkan-game/src/main.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-12-02 05:38:48 +0300
committerValentin Popov <valentin@popov.link>2026-12-02 05:38:48 +0300
commitca1828fc869aaeb72df00c642f918a7723c84df4 (patch)
tree1a16cb74faad26cc652dec2dce2efc64bda3f2ad /apps/fparkan-game/src/main.rs
parent6fde1faa1dfed89007566b3373114a89139390b9 (diff)
downloadfparkan-ca1828fc869aaeb72df00c642f918a7723c84df4.tar.xz
fparkan-ca1828fc869aaeb72df00c642f918a7723c84df4.zip
feat(ui): save and reopen warbot projects
Use original designer art and names for named Unit DAT files. Restore researched designs onto the prepared mounts of a compatible factory scheme. Verified saving, restoring and ordering from the Field Camp window, and production after decoding the saved design in the Constructor.
Diffstat (limited to 'apps/fparkan-game/src/main.rs')
-rw-r--r--apps/fparkan-game/src/main.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/fparkan-game/src/main.rs b/apps/fparkan-game/src/main.rs
index f4c20e58..475ed8b3 100644
--- a/apps/fparkan-game/src/main.rs
+++ b/apps/fparkan-game/src/main.rs
@@ -16,6 +16,7 @@ mod control_effects;
use control_effects::advance_control_effect_instances;
mod damage_visibility;
mod debris;
+mod designer_projects;
mod destruction_effects;
mod factory_menu;
use factory_menu::{FactoryChoice, FactoryMenu};
@@ -12382,6 +12383,14 @@ impl ApplicationHandler for StaticVulkanApp {
}
return;
}
+ if self.handle_designer_project_key(
+ event.physical_key,
+ event.text.as_deref(),
+ event.state,
+ event.repeat,
+ ) {
+ return;
+ }
let key = if self.cockpit.is_some() && self.demo_camera.is_none() {
player_movement_key(event.physical_key, &event.logical_key)
.map_or(event.physical_key, PhysicalKey::Code)