mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-07-16 14:12:47 +00:00
Update CTLD.lua
- Added C-130 DynamicCargo auto-build adapter inside CTLD core. - New CTLD options: - `UseC130DynamicCargoAutoBuild = false` (default off) - `C130DynamicCargoAutoBuildMergeSeconds = 10` - Hooked C-130 set registration into CTLD `Get Crates` flow (buildable cargo only: `VEHICLE` / `FOB`). - Added CTLD internal set/entry tracking for C-130 crates: - map crate spawn -> dynamic cargo loaded/unloaded -> landed. - Wired DynamicCargo event handling in CTLD: - on loaded: map to the correct CTLD set entry. - on unloaded: mark landed and create/rebind CTLD cargo proxy for build handoff. - on removed before landed: mark set failed and clean it. - Added set completion logic: - build starts only when all crates in set are landed. - helper infantry is spawned and CTLD engineer build path is used. - Added merge window batching by owner: - close drops from same C-130 can be processed together (one handoff window). - Added scoped filtering in `_BuildCrates` for this path: - prevents counting unrelated nearby crates during engineer auto-build. - Added cleanup paths for completed/failed/stale sets and stop lifecycle cleanup. - Added/updated docs in section `2.2` for: - what the feature does, - required settings, - usage example, - and the important note that this applies to CTLD `Get Crates` cargo (not C-130 Loadsheet cargo). **Behavior note** - Default behavior is unchanged unless `UseC130DynamicCargoAutoBuild` is enabled.
This commit is contained in: