sc_gamerules_v1.read
Copy the client’s current server GameRules parameter snapshot into out (caller sets out->size). Read-only: values are what the server sent and the client applied for the current session; they cannot be written through this ABI. generation changes when a new parameter set is applied.
Signature
Section titled “Signature”sco_result (*)(sco_plugin *, sc_gamerules_state *)Service and availability
Section titled “Service and availability”| Property | Value |
|---|---|
| Symbol | sc_gamerules_v1.read |
| Record ID | sc-gamerules-v1-read |
| Service | game.gamerules |
| Table | sc_gamerules_v1 |
| Version macro | SC_GAMERULES_VERSION_1_1 |
| Packed table version | 65537 |
| Since / availability | size >= 16; 1.0 |
| Complete member extent (x64 bytes) | 16 |
| Table size (x64 bytes) | 24 |
Parameters and buffers
Section titled “Parameters and buffers”sco_result (*read)(sco_plugin* self, sc_gamerules_state* out);
Copy the client’s current server GameRules parameter snapshot into out (caller sets out->size). Read-only: values are what the server sent and the client applied for the current session; they cannot be written through this ABI. generation changes when a new parameter set is applied.
Results and failures
Section titled “Results and failures”OK snapshot copied, UNAVAILABLE service off, no backend bound, out null or out->size too small, BAD_ARG invalid self.
Absent capability
Section titled “Absent capability”game.gamerules.read defaults false; the table publishes UNAVAILABLE until a host binds a backend grounded on the build’s gamerules.params_sync row.
Ownership
Section titled “Ownership”Provider owns the snapshot storage; a plain copy crosses to the caller. No allocation, no engine pointer transfer, nothing retained from out.
Thread affinity
Section titled “Thread affinity”Game thread only.
Callback context
Section titled “Callback context”No plugin callback.
Reentrancy
Section titled “Reentrancy”Read-only snapshot copy; no engine re-entry.
Cleanup and cancellation
Section titled “Cleanup and cancellation”StopGameRules withdraws the service and clears the bound backend; no engine state to restore (read-only).
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_gamerules.h(*read) |
| cpp | typed-wrapper | include/scosdk/game/gamerules.hppreturn t_->read(self_, &out); |
| csharp | typed-wrapper | sdk/csharp/Sco.Sdk/Game/GameRules.csScoResult r = !Covers(8) || _t->read == null ? ScoResult.Unavailable : _t->read(Self, &s); |
| lua | typed-wrapper | plugins/lua/sco_lua_game.cconst sco_result r = GAME_MEMBER(g, sc_gamerules_v1, read) ? g->read(self, &s) : SCO_UNAVAILABLE; |
Examples
Section titled “Examples”None identified in the catalogue; this is not proof none can exist.
- tests/abi_game_gamerules.c
- tests/test_language_routes.cpp
- tests/test_lua.cpp
- tests/test_sdk.cpp
- sdk/csharp/Sco.Sdk.Tests/GameFakeHost.cs
ABI pins prove layout, not semantic behavior or a live game session.