1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! 
//!
//! intfic is a framework that allows you to write a branching story with minimal code.
//!
//! It uses story files with a custom markup syntax that allows for the following:
//!
//! * Write text or specific quotes of text with different colors
//! * Display options that trigger different Story Blocks or Story Files
//! * Set flags or add to counters in the GameState
//! * Check flags or counters in the GameState and conditionally display text or options
//!
//! Additionally, I've included some basic functions for asking yes-no questions and traveling in the cardinal directions, should you prefer to take a more "text adventure" approach with code.
//!
//! 
//!
//! ## Getting Started
//!
//! 1. Run the example with "cargo run"
//! 2. Examine the example story files and read up on the [intfic Story File Markup Specification](parse_file/index.html#story-file-markup-specification)
//! 3. Write you own story, and update main.rs to start it!
//!
//! ## License
//!
//! This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/tjhaskel/rust_intfic/blob/master/LICENSE.md) file for details
use time;
/// Stores, saves, and loads an environment that can be changed and referenced by your story.
/// Parses story files and constructs a list of StoryBlock's.
/// Sanitizes and parses input, checking for system keywords.
/// Represents an atomic chunk of story with text, effects, and options.
/// Writes text with a typewriter effect and a variety of possible colors.
/// If enabled, various debug info will be printed during gameplay
pub const DEBUG: bool = true;
/// If enabled, the typewriter effect of write_out is made instantaneous.
pub const FASTMODE: bool = true;
/// The base amount of time before the next line of a block is started, if FASTMODE is disabled.
pub const LINETIME: Duration = from_millis;
/// The base amount of time before the next charater of a line is typed, if FASTMODE is disabled.
pub const TYPETIME: Duration = from_millis;
/// Prints a string if DEBUG is enabled.