diff options
| author | Valentin Popov <valentin@popov.link> | 2026-12-02 05:49:08 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-12-02 05:49:08 +0300 |
| commit | 0d8031eccad92190ea01c2c7f9a2cee28adecb62 (patch) | |
| tree | 2e391fbe4d92f5876641fe232363bdd6b30ab6d9 /apps/fparkan-game/src/mission_notices.rs | |
| parent | ca1828fc869aaeb72df00c642f918a7723c84df4 (diff) | |
| download | fparkan-0d8031eccad92190ea01c2c7f9a2cee28adecb62.tar.xz fparkan-0d8031eccad92190ea01c2c7f9a2cee28adecb62.zip | |
fix(ui): validate warbot designs on transfer
Keep the selected model open on a failed research check and post the original central-computer message to the shared pager and history. Verified rejection and corrected production order in the Field Camp window with Vulkan validation.
Diffstat (limited to 'apps/fparkan-game/src/mission_notices.rs')
| -rw-r--r-- | apps/fparkan-game/src/mission_notices.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/fparkan-game/src/mission_notices.rs b/apps/fparkan-game/src/mission_notices.rs index b633856c..048674fb 100644 --- a/apps/fparkan-game/src/mission_notices.rs +++ b/apps/fparkan-game/src/mission_notices.rs @@ -2,6 +2,25 @@ use crate::StaticVulkanApp; use fparkan_runtime::MissionNotice; impl StaticVulkanApp { + #[cfg(windows)] + pub(super) fn present_computer_notice(&mut self, id: u32, clock_ms: u32) { + let posted = self + .overlay + .hints + .as_mut() + .ok_or_else(|| "pager unavailable".to_string()) + .and_then(|hints| hints.post_computer(id, clock_ms)); + let result = posted.and_then(|(sender, body)| { + if let Some(help) = &mut self.overlay.help { + help.post(sender, body)?; + } + Ok(()) + }); + if let Err(error) = result { + eprintln!("computer_notice_unavailable id={id:#06x} reason={error}"); + } + } + pub(super) fn present_mission_notice(&mut self, notice: MissionNotice, clock_ms: u32) { match notice { MissionNotice::BuildingCaptured { .. } | MissionNotice::VehicleCaptured => {} |
