Skip to main content

shuyi_core/
character.rs

1//! Who a game's characters are, by id: who speaks in a dialogue scene,
2//! who a piece on the board is.
3
4use alloc::string::String;
5
6use serde::{Deserialize, Serialize};
7
8/// String id of a named character, e.g. `"guard_captain"`. Serialised as
9/// the bare string, so files name a character as `"guard_captain"`.
10#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
11#[serde(transparent)]
12pub struct CharacterId(pub String);