aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-script/src/event_execution.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-25 21:01:53 +0300
committerValentin Popov <valentin@popov.link>2026-11-25 21:01:53 +0300
commit547a4b1386ae022ba3c5f918f0903410cfc3040e (patch)
tree55a5d0631e295b2c8e52764efd7e45a6cd7a8ba4 /crates/fparkan-script/src/event_execution.rs
parent0cd6359c4abc90b458a2b90daadccdb6aee8e2c4 (diff)
downloadfparkan-547a4b1386ae022ba3c5f918f0903410cfc3040e.tar.xz
fparkan-547a4b1386ae022ba3c5f918f0903410cfc3040e.zip
feat(ai): build requested builders from the clan catalog
Scripted builder requests could not reach production: Handler(15) only accepted warbots/transports, and the factory searched player prebuilds for a builder. Prepare a clan's unique qualified builder design alongside its transport design and allow that class through the factory order callback. Register the produced builder's logical ID and ore state so clan queries and construction tasks can use it. Rename the shared design module by its factory mechanic and retain the existing single-qualified-design boundary. Native evidence: GOG ai.dll SHA-256 c19cd6cd31cd2896f8c4ba0f0e700dd3408aec8182daaf4863d98a7d233a2abc, selector RVA 0x107c0, selects sml_bldr.dat for class 0x01004000 / SELECT_FASTEST from a captured stock Single.01 catalog; clearing its eligibility rejects the request. The same call still selects sml_cargo.dat for transport. Ore initialization reuses the previously executed Behavior RVA 0x8790 class initializer; this does not prove the full native factory lifecycle. Validated fmt, workspace check/tests, release build and all 29 stock --sim-report 900 runs. The licensed regression first exposed the missing scheme, then caught the remaining callback class gate. It now removes the starting builder as a debug casualty, lets the real scenario request its replacement, and checks its birth, owner, clan registration and ore state. The adapted transport regression also passes the joint player/AI queue, player scheme visibility and transport cargo checks with the shared list. Window checks: normal stock mission 28 ran with continuing research and production. A separate debug copy transferred the old builder and moved the hero near the factory; the scenario ordered and visibly produced sml_bldr.dat, then reached a construction request with the new builder. These debug conditions do not establish mission acceptance from stock start. Temporary roots were removed and the original probe's map restored. Handler(58) remains explicit: its candidate predicate still needs Control 0x209/0x20c, next-stage BuildDat lookup and builder order 0x18. Native AI priorities/full chronology, multi-design ranking/RNG and factory timing remain approximate. A live native sample yielded other unit births, so it is not evidence of native builder replacement timing or starting cargo.
Diffstat (limited to 'crates/fparkan-script/src/event_execution.rs')
0 files changed, 0 insertions, 0 deletions