aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/clan_research.rs
Commit message (Collapse)AuthorAgeFilesLines
* fix(ai): exclude light designs from assault research queryValentin Popov9 days1-2/+95
| | | | | | | | | | Use the registered root chassis size and candidate research status to complete the negative Handler(65) branch. Keep the coverage stub when a researched candidate still requires weapon rating and AI priority. The initial native catalog matches the Rust exclusions. The stock Two Fortresses window and 900-second simulation keep the capture branch, and all 29 missions still reach 900 seconds.
* fix(ai): expose the native research catalog scan statusValentin Popov9 days1-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | Handler(56) returned a constant zero and was described as an automatic research permission flag. It actually normalizes the cached candidate scan byte. Read ResearchCandidateSet.status without refreshing the catalog and report queries by clan and result instead of counting them as stubs. GOG ai.dll SHA-256 c19cd6cd31cd2896f8c4ba0f0e700dd3408aec8182daaf4863d98a7d233a2abc: Handler(56), RVA 0xe430, reads AI+0x431. Native calls to this getter and the chooser at 0x10f90 confirm that finishing the last candidate preserves the old scan flag until the next refresh. Empty/processed sets, missing pending candidates, stale flags, and noncanonical nonzero bytes were exercised. A live stock Single.01 query also returned zero from the same cached byte. The shipped scream.scr condition suppresses the laboratory request for a nonzero result. An ignored resource test executes that original condition and request for cached bytes 0, 1 and 255; an ordinary Rust test covers the cached-state semantics and missing catalog. This isolated branch check does not establish that an entire mission has exhausted all research naturally. Validated fmt, workspace check/tests, the licensed scenario-branch test and the release build. All 29 stock missions pass --sim-report 900 without new script stops; stock mission 28 also runs in the window with ongoing research and the native zero result. None of these stock runs reached a nonzero scan flag. Handler(58) upgrades and Handler(65) candidate power remain explicit stubs, and full timed AI/mission parity remains open.
* feat(ai): execute laboratory research from clan scriptsValentin Popov10 days1-6/+16
| | | | | | | | | | | | | | | | Clan laboratories accept the selected DAT project, request power and ore, accumulate native research progress, and publish learned technologies to construction and production. Research requests wait for the live laboratory; newly built objects are no longer mistaken for destroyed targets. Behavior.dll task 0x2f730 was called with paid and free work under x87 0x007f. The stock Single.02 regression checks both completed technologies and keeps the request pending while the laboratory is busy. Workspace fmt/check/tests, the 29-mission 900-second corpus, and the Vulkan window check pass. Dependent availability and free child propagation remain explicit script_research_unlock_stub counters; candidate properties 65 and policy 69 remain open. This does not close G7 or establish live AI chronology parity.
* feat(ai): load clan research candidates during InitValentin Popov10 days1-0/+190
Handle the no-result Handler(43) by loading direct AI DAT candidates and running the recovered selector against the clan's TRF. Keep the catalog and its context alive per clan. Share catalog enumeration with transport selection. Match the stock NTFS name order, including underscore placement. A fresh Single.02 run of the original supplied 77 ordered entries, status bytes and selected index 60 (swelbld1.dat); the licensed regression matches that state. Both captured and installed ai.dll match the documented GOG SHA-256. Keep paid laboratory work, extended candidate metadata and Handler(69) explicitly stubbed. The report exposes loaded catalogs separately from those remaining gaps. A loading failure retains an indexed Init stub. Validate workspace fmt/check/tests, licensed live-catalog comparison, all 29 stock missions at 900 seconds without stops or Handler(43) load failures, and mission 29 in a Vulkan-validation window.