sc_loadout_v1.apply
Synchronous typed offline local-player equip: 1..16 unique slots (1.0 body slots 1..7; 1.1 adds weapon and multitool slots 8..21), fixed ASCII item classes, per-slot APPLIED/UNSUPPORTED/ITEM_MISSING/FAILED/UNAVAILABLE and applied count. Entire batch structural validation precedes engine calls; partial apply is not rolled back.
Signature
Section titled “Signature”sco_result (*)(sco_plugin *, const sc_loadout_request *, sc_loadout_report *)Service and availability
Section titled “Service and availability”| Property | Value |
|---|---|
| Symbol | sc_loadout_v1.apply |
| Record ID | sc-loadout-v1-apply |
| Service | game.loadout |
| Table | sc_loadout_v1 |
| Version macro | SC_LOADOUT_VERSION_1_1 |
| Packed table version | 65537 |
| Since / availability | size >= 16; 1.0 |
| Complete member extent (x64 bytes) | 16 |
| Table size (x64 bytes) | 16 |
Parameters and buffers
Section titled “Parameters and buffers”sco_result (*apply)(sco_plugin* self, const sc_loadout_request* request, sc_loadout_report* report);
Synchronous typed offline local-player equip: 1..16 unique slots (1.0 body slots 1..7; 1.1 adds weapon and multitool slots 8..21), fixed ASCII item classes, per-slot APPLIED/UNSUPPORTED/ITEM_MISSING/FAILED/UNAVAILABLE and applied count. Entire batch structural validation precedes engine calls; partial apply is not rolled back.
Results and failures
Section titled “Results and failures”BAD_ARG for null/foreign/released self, short structs, zero count, wrong stride, nonzero reserved fields, duplicate slots or malformed class; TOO_MANY above 16. Structural refusals leave report unchanged. UNAVAILABLE for missing engine/verification/capability/offline admission, with per-slot UNAVAILABLE. OK iff all applied; FAILED for partial/slot refusals or guarded backend fault.
Absent capability
Section titled “Absent capability”Absent table: query_service NOT_FOUND. Published table does not imply capability; production game.loadout.apply stays false.
Ownership
Section titled “Ownership”Caller owns full-size request/report and frozen item array (exact item_stride). No allocation transfer; inputs copied to bounded stack storage; pointers borrowed only during call. Only local player is targeted.
Thread affinity
Section titled “Thread affinity”Game thread only; WRONG_THREAD without output or engine access.
Callback context
Section titled “Callback context”No plugin callbacks. Internal game-pack backend callbacks are synchronous; caller pointers are not retained.
Reentrancy
Section titled “Reentrancy”Recursive apply returns UNAVAILABLE with per-slot UNAVAILABLE; no nested backend call. Backend Start returns Unavailable and Stop is ignored during apply.
Cleanup and cancellation
Section titled “Cleanup and cancellation”No pending requests, ownership tickets, persistence or unload rollback. Successful equip survives consumer unload. Table session-lifetime; stop withdraws after consumers unload. Backend fault disables apply until process restart; do not retry cached calls after shutdown.
Language mappings
Section titled “Language mappings”Status labels are copied verbatim from the catalogue: direct is native access; typed-wrapper is wrapper-backed; restricted is a subset/adaptation; unsupported means no supported route is established. No status implies universal safety.
| Language | Catalogue status | Source evidence / wrapper tokens |
|---|---|---|
| c | direct | include/sc_loadout.h(*apply) |
| cpp | typed-wrapper | include/scosdk/game/loadout.hppreturn table_->apply(self_, &request, &report); |
| csharp | unsupported | docs/game/loadout.mdC# is unsupported for loadout 1.0 |
| lua | unsupported | docs/game/loadout.mdLua mutation is unsupported |
Examples
Section titled “Examples”None identified in the catalogue; this is not proof none can exist.
- tests/abi_game_loadout.c
- tests/game_contracts/loadout/consumer.c
- tests/game_contracts/loadout/routes.cpp
- tests/game_contracts/loadout/test_loadout.cpp
- tests/game_contracts/loadout/native.cpp
- tests/game_contracts/loadout/test_metadata.py
ABI pins prove layout, not semantic behavior or a live game session.