feat!: client storage is read-only, storage.save and storage.delete removed

This commit is contained in:
edmand46
2026-09-29 16:43:15 +03:00
parent b115450715
commit 17a55888a5
11 changed files with 28 additions and 104 deletions
+3 -6
View File
@@ -5,8 +5,7 @@ Per-player storage, one item per `type`. `StorageDomain`, revision key
```ts
client.storage.value // GetStorageResponse | undefined
await client.storage.save(type, data);
await client.storage.delete(type);
await client.storage.reload();
```
```ts
@@ -21,10 +20,8 @@ interface StorageItem {
}
```
- `save(type: string, data: string): Promise<void>`: upserts the item of
`type` (the server keeps one item per player and type), then invalidates.
- `delete(type: string): Promise<void>`: deletes the item of `type`, then
invalidates.
- The client cannot write storage. Module functions (kernel `Storage.Set`) and
the batch admin API write it; call `reload()` after a module call that saved.
## Limits and notes