yog-event 0.9.5

Yog event system — pub/sub for game/server events.
Documentation
//! Items' services: what a mod says about its items' stacks.

use yog_data::Schema;

/// A stack's own name and tooltip, from its custom data (a written
/// blueprint shows its design) — keyed by the item, answered by its mod;
/// `None`: the item's own.
#[derive(Debug, Clone, Schema)]
pub struct Text {
    pub item: String,
    /// The stack's custom data, as SNBT.
    pub snbt: String,
}

/// What a stack shows instead of its item's own name and description.
#[derive(Debug, Clone, PartialEq, Schema)]
pub struct Shown {
    /// Its name; `None`: the item's own.
    pub name: Option<String>,
    /// The tooltip lines that stand instead of its description.
    pub lines: Vec<String>,
}

/// Whether a stack gets a picture under its tooltip (Hex Casting's scrolls
/// show their pattern), and its size in GUI pixels — keyed by the item,
/// answered by its mod; drawn on `client::render::Tooltip`.
#[derive(Debug, Clone, Schema)]
pub struct Picture {
    pub item: String,
    /// The stack's custom data, as SNBT.
    pub snbt: String,
}

mod actions;
pub use actions::*;