Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
48 lines
3.1 KiB
Plaintext
48 lines
3.1 KiB
Plaintext
PROPOSAL ONLY; no target edits or native execution.
|
|
New leaf and actual-method test only. Parent registers test_infantry_mine_transfer.py.
|
|
|
|
API:
|
|
ERR_InfantryMineTransfer(mode, Vehicle truck, SCR_AIGroup truckGroup, IEntity actor,
|
|
SCR_AIGroup recipientGroup, IEntity incoming, ERR_FiniteMagazineReservation reservation,
|
|
ERR_HQStatusSampler originalRoster, int originalSlot)
|
|
Tick(now): ERR_InfantryAmmoTransferState (-1 failed,0 pending,1 succeeded).
|
|
Submitted(), Unresolved(), Stop(), Reason().
|
|
static ReadyMine(item): exact alive inactive native PMN4.
|
|
static Carrier(actor,group,exclude=null): exact sole usable PMN4, or null when
|
|
zero/multiple/unknown. Optional exclusion is internal after submission only.
|
|
|
|
Coordinator must pass same original roster slot and shared finite reservation
|
|
from captured mine originals + EXISTING spent ledger. Leaf pins driver, physical
|
|
records, managers, reciprocal original source slot and exact original carried mine
|
|
at construction. It never selects another carrier or swaps carrier entitlement.
|
|
One native Move submission only, Commit before call; callback identities are not
|
|
queried (GetItem unsupported for Move). Callback+exact reciprocal storage and
|
|
source absence prove delivery. Unknown/partial movement remains unresolved after
|
|
Stop or timeout; definitive callback-failure plus unchanged source can settle it.
|
|
Deleted incoming entity settles this one-item transaction; damage/capture does not.
|
|
No rollback, spawn, new capability at zero stock, placement-latch reset or refund.
|
|
|
|
Tests execute production constructor, Carrier, Context, Tick, Stop, Unresolved,
|
|
callbacks, custody and shared reservation with native doubles. They cover one/two/
|
|
zero/unknown carrier inventories, original actor/slot/driver/ledger/managers, native
|
|
capacity/access refusal, exact shared stock, inline callback with false return,
|
|
unknown false return, timeout/backwards clock, late proof, changed ownership and
|
|
exact deletion. Negative controls remove single-carrier or missing-damage guard;
|
|
both compile and assertion-fail. green.log passes.
|
|
|
|
No actual native inventory movement, pathfinding, multiplayer or Enforce lifetime
|
|
qualification claimed. Existing coordinator owns exclusive HQ reservations/radio.
|
|
|
|
Verified local SDK references:
|
|
- /tmp/erri-vanilla-stock/scripts/Game/generated/InventorySystem/InventoryStorageManagerComponent.c:
|
|
32 CanMoveItemToStorage,34 TryMoveItemToStorage(item,to,-1,callback),45 GetStorages,
|
|
47 GetItems,51 FindStorageForItem; GetOwner at14.
|
|
- /tmp/erri-vanilla-stock/scripts/Game/generated/InventorySystem/InventoryTask/ScriptedInventoryOperationCallback.c:
|
|
GetItem documentation explicitly excludes Move; all four callback signatures verified.
|
|
- /tmp/erri-vanilla-stock/scripts/Game/Weapon/Explosives/SCR_BaseTriggerComponent.c:
|
|
IsActivated22, IsActivatedByDefault29, both read-only native script state.
|
|
- Existing ERR_InfantryAmmoTransfer supplies verified group/driver/physics and
|
|
bounded StoredUnder ancestry patterns; actual StoredUnder extracted into test.
|
|
- ERR_Actors.Alive requires DamageManagerComponent (ERR_Actors.c:3-7); native
|
|
double matches this so unknown damage cannot masquerade as known unavailable stock.
|