world_snapshot/README.md

17 lines
691 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# world_snapshot 模块
世界状态快照模块聚合世界world、场景scene、实体entity当前状态生成快照支持查询与恢复。
## 功能
- 世界快照表 `world_snapshot` 的 CRUD
- `create_snapshot`:聚合 world/scene/entity 当前状态写入 `snapshot_json`
- `restore_snapshot`:读取并校验快照 JSON恢复状态基础实现校验 + 状态标记)
- 下拉接口:世界列表、快照类型、快照状态
## 数据表
- `world_snapshot`models/world_snapshot.json
## 集成
- 通过 `load_world_snapshot()` 挂载到宿主应用
- 库名经 `ServerEnv().get_module_dbname('world_snapshot')` 获取,禁止硬编码