Refactor server-rs runtime and update related docs
This commit is contained in:
@@ -3298,7 +3298,7 @@ fn upsert_generated_entity_card(
|
||||
.unwrap_or_else(|| "新角色".to_string())
|
||||
}
|
||||
RpgAgentDraftCardKind::Landmark => {
|
||||
read_optional_text_field(entity_object, &["purpose", "mood", "dangerLevel"])
|
||||
read_optional_text_field(entity_object, &["purpose", "mood"])
|
||||
.unwrap_or_else(|| "新地点".to_string())
|
||||
}
|
||||
_ => "新增对象".to_string(),
|
||||
@@ -3820,7 +3820,7 @@ fn upsert_asset_role_card(ctx: &ReducerContext, session_id: &str, role_id: &str,
|
||||
fn upsert_asset_scene_card(ctx: &ReducerContext, session_id: &str, scene_id: &str, scene_kind: &str, scene: &JsonMap<String, JsonValue>, updated_at_micros: i64) -> Result<(), String> {
|
||||
let kind = if scene_kind == "camp" { RpgAgentDraftCardKind::Camp } else { RpgAgentDraftCardKind::Landmark };
|
||||
let title = read_optional_text_field(scene, &["name"]).unwrap_or_else(|| if scene_kind == "camp" { "开局营地" } else { "场景" }.to_string());
|
||||
let subtitle = read_optional_text_field(scene, &["purpose", "mood", "dangerLevel"]).unwrap_or_else(|| "场景资产已就绪".to_string());
|
||||
let subtitle = read_optional_text_field(scene, &["purpose", "mood"]).unwrap_or_else(|| "场景资产已就绪".to_string());
|
||||
let summary = read_optional_text_field(scene, &["summary", "description", "publicMask"]).unwrap_or_else(|| "场景图已写回草稿。".to_string());
|
||||
upsert_asset_card(ctx, session_id, scene_id, kind, &title, &subtitle, &summary, None, Some("场景图已就绪"), updated_at_micros)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user