76 lines
2.0 KiB
Rust
76 lines
2.0 KiB
Rust
/// Raw world information is information generated by the LLM, which
|
|
/// needs to be filled in with extra information to be fully complete.
|
|
/// Raw information does not have db IDs, or most of the other info an
|
|
/// entity might want.
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct World {
|
|
pub name: String,
|
|
}
|
|
|
|
/// Contains everything needed to generate a DB-backed scene. The info
|
|
/// here is a seed for the full creation, which spiders out like a
|
|
/// tree structure.
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct SceneSeed {
|
|
pub name: String,
|
|
pub region: String,
|
|
pub description: String,
|
|
pub people: Vec<PersonSeed>,
|
|
pub items: Vec<ItemSeed>,
|
|
pub props: Vec<PropSeed>,
|
|
pub exits: Vec<ExitSeed>,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug, Clone)]
|
|
pub struct ExitSeed {
|
|
pub name: String,
|
|
pub region: String,
|
|
pub direction: String,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug, Clone)]
|
|
pub struct PersonSeed {
|
|
pub name: String,
|
|
pub occupation: String,
|
|
pub race: String,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct PersonDetails {
|
|
pub description: String,
|
|
pub sex: String,
|
|
pub gender: String,
|
|
pub age: u32,
|
|
pub residence: String,
|
|
pub items: Vec<ItemSeed>,
|
|
pub current_activity: String,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct ItemSeed {
|
|
pub name: String,
|
|
pub category: String,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct ItemDetails {
|
|
pub description: String,
|
|
// Attribtues are interesting features that set this item apart
|
|
// from others, and can be useful in commands or actions or
|
|
// certain situations.
|
|
pub attributes: Vec<String>,
|
|
pub secret_attributes: Vec<String>,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct PropSeed {
|
|
pub name: String,
|
|
pub description: String,
|
|
pub features: Vec<String>,
|
|
pub possible_interactions: Vec<String>,
|
|
}
|