aboutsummaryrefslogtreecommitdiff
path: root/docs/appendices/script-vm.md
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-25 14:20:46 +0300
committerValentin Popov <valentin@popov.link>2026-11-25 14:20:46 +0300
commit27d6ea19b0206b71ef6c309142e0875275882bf0 (patch)
tree2d99974f970ab652ec8fd799e26a0af4909b52bf /docs/appendices/script-vm.md
parent44320618ae750da0ab10e50439bf74405b9eacba (diff)
downloadfparkan-27d6ea19b0206b71ef6c309142e0875275882bf0.tar.xz
fparkan-27d6ea19b0206b71ef6c309142e0875275882bf0.zip
fix(ai): account for pending construction in class limits
Implement Handler(11) limits for the original class set, including hangar and laboratory counters. Keep owned-object caps separate from pending thresholds; medium and large towers allow three and one active builds. Record the ordered class on construction tasks and count queries by clan, class and result. Execute ai.dll RVA 0xc5e7 with the GOG hash guard and compare owned counts, maxima, pending counts and unknown classes. Preserve these native vectors in a Rust test. Extend the licensed construction test to require pending count before registration, owner isolation and reset after completion. Validate fmt, workspace check/tests, licensed construction, release build and stock mission 29 in simulation and its window. This removes the Handler(11) coverage blocker for the following construction work; generic building orders and Handler(40) are still open. Pending counter sources and lifecycle beyond active FParkan Construction tasks remain approximate.
Diffstat (limited to 'docs/appendices/script-vm.md')
-rw-r--r--docs/appendices/script-vm.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/appendices/script-vm.md b/docs/appendices/script-vm.md
index defc74d0..37abdb78 100644
--- a/docs/appendices/script-vm.md
+++ b/docs/appendices/script-vm.md
@@ -2565,6 +2565,21 @@ FParkan вызывает числовой префикс этой секции Ñ
число шахт клана с текущим `dMaxMine`. Обработчик оригинала также
учитывает счётчики незавершённых построек.
+Та же команда ограничивает другие классы. Для шахты, склада и завода
+достаточно одной незавершённой стройки, чтобы вернуть 1 и снять повторную
+заявку. Для башен класса `0x80100000` порог равен трём, для `0x80200000` —
+одной. Дополнительно проверяется количество готовых объектов против
+текущего максимума из varset. Строители и транспорты проверяются только
+по этому максимуму.
+
+Ангар и лаборатория используют только порог одной незавершённой стройки:
+число готовых зданий здесь не задаёт общего потолка. Неизвестный класс
+возвращает 0. Прямой вызов GOG `ai.dll` по RVA `0xc5e7` подтвердил эти
+ветви, включая ангар и лабораторию при ненулевом числе готовых зданий.
+SHA-256 DLL: `c19cd6cd31cd2896f8c4ba0f0e700dd3408aec8182daaf4863d98a7d233a2abc`.
+FParkan связывает незавершённые постройки с активными задачами строительства
+своего клана; после регистрации здания такая задача перестаёт учитываться.
+
`Handler(56)` по RVA `0xe430` проверяет байт разрешения исследований
`AI+0x431`. Сценарий использует ответ при выборе действия для лаборатории.
Условный переход (control `3`, RVA `0x12258`) использует индекс инструкции