diff options
| author | Valentin Popov <valentin@popov.link> | 2026-12-01 06:57:23 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-12-01 06:57:23 +0300 |
| commit | 31dd73cbf59f5c8fe58b77b373a75033dc5a037a (patch) | |
| tree | 7a20ada1d75679b61a6c6716ffe91a10faba4592 /crates/fparkan-runtime/src/control_resources.rs | |
| parent | 364f8a0984e5cd3b65e81f24e95fcf8cd92aec2d (diff) | |
| download | fparkan-31dd73cbf59f5c8fe58b77b373a75033dc5a037a.tar.xz fparkan-31dd73cbf59f5c8fe58b77b373a75033dc5a037a.zip | |
fix(fx): switch warbot smoke with the damage alarm
Resolve the matching enable and disable selectors from authored CTL alarm groups. Render node-attached smoke and light only while the live Control alarm is active. Verify the native selector against both DLLs and inspect two Vulkan frames around an ordinary AutoDemo alarm. Independent mode-14 triggers and the damage stage cascade remain open.
Diffstat (limited to 'crates/fparkan-runtime/src/control_resources.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/control_resources.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/fparkan-runtime/src/control_resources.rs b/crates/fparkan-runtime/src/control_resources.rs index b9958229..e34a3dfc 100644 --- a/crates/fparkan-runtime/src/control_resources.rs +++ b/crates/fparkan-runtime/src/control_resources.rs @@ -34,6 +34,12 @@ impl Default for Resources { } impl Resources { + pub(super) fn alarm_active(&self, handle: ObjectHandle) -> bool { + self.clocks + .iter() + .any(|(owner, clock)| *owner == handle && clock.alarm.active) + } + pub(super) fn energy_available(&self, handle: ObjectHandle) -> bool { !self.blocked_budgets.contains(&handle) } |
