ifengine 0.0.6

Interactive fiction library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::core::{PageHandle, game_state::InternalKey};

/// Adds an effect to a [`crate::view::Span`]
/// Spans with an action occlude their containing object (i.e. [`crate::view::Object::Choice`])
#[derive(Debug, Default, Clone)]
pub enum Action {
    #[default]
    None,
    SetBit(InternalKey, u8),
    Set(InternalKey, u64),
    Inc(InternalKey),
    Reset(InternalKey),
    /// The name of the handle here is just for debug, and NOT guaranteed to be the actual id of the page, see [`crate::core::PageState`]
    Next(PageHandle), // Arc for easy cloning
    Back(usize),
    Tunnel(PageHandle),
    Exit,
}