feat!: client storage is read-only, storage.save and storage.delete removed
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user