aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/control_resources.rs
Commit message (Collapse)AuthorAgeFilesLines
* feat(control): replenish ammunition on repair padsValentin Popov4 days1-1/+1
|
* fix(control): repair damaged nodes on facility padsValentin Popov4 days1-1/+1
|
* fix(control): select authored drive states for mobile power demandValentin Popov4 days1-14/+19
|
* fix(combat): charge the drive before refilling weaponsValentin Popov5 days1-9/+26
| | | | Read the resource multiplier from CTL when all authored states agree and price the latest local motion in the existing Control budget. A licensed AutoDemo flyer charges its weapons more slowly when the drive is drawing from the same supply. Control.dll oracle vectors, the AutoDemo window, and all 29 mission startup sweeps pass.
* fix(fx): switch warbot smoke with the damage alarmValentin Popov5 days1-0/+6
| | | | 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.
* fix(combat): apply critical damage on the Control resource tickValentin Popov5 days1-8/+23
| | | | Use the alarm entry amount for sequential wear and disable the onboard repair device before recomputing motion limits. Match the Control.dll alarm and recovery vector. In the stock AutoDemo the affected warbot now loses its remaining movement instead of keeping its last limit. Alarm effects and the full native node cascade remain approximate.
* feat(repair): restore hull health on factory and hangar padsValentin Popov10 days1-3/+15
| | | | Check both authored Constructor volumes, ownership and departure in a licensed integration test. Validate Constructor in a window from stock start. Facility power, ammunition and the repair rate are open.
* feat(combat): feed weapon charge from Control energy budgetsValentin Popov10 days1-5/+41
| | | | | | | | | | | | | | | | | | | | | | | | | Keep factory-2/30 charge in the owner's Control table. AI and player banks read it before firing, debit completed shots and wait for regeneration. Preserve one charge across bank changes and accumulate energy waits by object, including an idle bank publishing after an active bank. Mobile owners now run the resource budget. Restore the shared factory-1 callbacks, factory-2/30 charging and factory-10 passive upkeep. Factory 30 uses the weapon constructor's native disabled default. Motion demand is still an explicit zero-rate stub; unsupported budgets disable charge limiting for that owner and record the reason. Execute unmodified GOG Control.dll callbacks at RVA 0x29a40/0x29a90, 0x264b0/0x26510 and 0x21860/0x21890; check the common constructor at 0x294c0. Rust golden vectors cover disabled refill, zero capacity, negative charge and x87 rounding at control word 0x007f. SHA-256: bcb86318089028548a178b03a21accdce15df0cc85ddd91674cf3c2f55012c6e. Validated fmt, workspace check/tests, release, licensed shared-bank charge exhaustion/recovery, stock combat and damaged-profile regressions. All 29 stock missions reached 900 seconds; the only mobile-budget stub was the known motion input. Observed stock window combat and replenishment. Full live native mission comparison and motion energy remain open.
* fix(control): refresh motion limits after node damageValentin Popov10 days1-10/+56
| | | | | | | | | | | | | | | | | | | | | | | Run the supported dirty Control profile branch on the resource clock, before the existing factory/laboratory budget pass. Mobile owners now participate in these clocks. Root hits reduce the drive's current E00 value and the next place-patrol speed request uses the updated limit. Keep mutable node-group means and publish profile words atomically. Move FCA0 projection into control_profile rather than extending lib.rs. Count clock checks, publications and unsupported updates per object; alarm damage, activation and mobile device budgets remain explicit gaps. Native Control.dll RVA 0x12a40 -> 0xfca0 confirms mean retention, clean-call behavior and the healthy-critical-group branch that bypasses the aggregate threshold. Golden outputs are covered by Rust tests. SHA-256: bcb86318089028548a178b03a21accdce15df0cc85ddd91674cf3c2f55012c6e. Validated fmt, workspace check/tests, release, licensed stock damage, combat and patrol regressions, plus all 29 stock missions for 900 seconds without new profile-update stops. Stock window AI hits change limits. The additional live native interception yielded no usable sample; its supported calculation branches were executed directly in the DLL.
* fix(research): advance laboratory Control energy budgetsValentin Popov10 days1-9/+18
| | | | | | | | | | | | | | | | | | | | Paid laboratory work read a work-device coefficient that never received a Control budget update. Run the recovered resource clock and budget for laboratories as well as factories, so energy work follows the actual device allocation. Generalize the state and report counters to control_resource_*. A licensed outage regression drains the lab reserve and removes external power: energy work stays fixed while task time advances, then resumes when the original generation is restored. Stock research for both AI clans, player free research and paid factory production still pass. The original laboratory task reaches its class-3 Control owner, whose native budget runs on the same quarter-second resource path as the factory. Verified this in the running stock mission through Behavior 0x2f76e and Control 0x2d340. Workspace fmt/check/tests and release build pass. All 29 stock missions run 900 seconds without script or resource-budget stops. A stock mission-28 window completes paid technologies and starts subsequent projects. Control initial phase, RNG seed, other owners and global ordering remain approximate.
* fix(production): use Control energy budgets for factory workValentin Popov10 days1-0/+172
Factories now run the recovered Control resource-budget pass on its own randomized clock before Behavior task updates. Paid production reads its current work-device E00 value, including the local power reserve and allocation, instead of gating full speed on any clan generation. The clock redraws jitter on every accepted frame and uses a separate Control RNG. Initial phase, seed and ordering with other owners remain explicit approximations. Budget failures preserve the table and are counted per owner. Original DLL calls verify the budget callbacks, strict deadline, per-call RNG, forced update and inactive baseline. A live class-3 factory executes the same budget with the default 250 ms setting. Licensed regressions cover an empty factory power reserve, subsequent generator capture, four completed paid orders, the Behavior task deadline and scripted warbot/transport/builder births. Workspace fmt/check/tests and release build pass. All 29 stock missions run 900 seconds without script or new budget stops. Stock mission 28 accepts and completes a free and then a paid player order in the Vulkan-validation window.