tiger-lib 1.17.0

Library used by the tools ck3-tiger, vic3-tiger, and imperator-tiger. This library holds the bulk of the code for them. It can be built either for ck3-tiger with the feature ck3, or for vic3-tiger with the feature vic3, or for imperator-tiger with the feature imperator, but not both at the same time.
Documentation
//! [`DataContext`] tracks what we know about the GUI datamodels and datacontexts.
//! Currently it only tracks the `ScriptedGui` name.

use crate::token::Token;

#[derive(Debug, Clone)]
pub struct DataContext {
    sgui_name: Option<Token>,
}

impl DataContext {
    pub fn new() -> Self {
        Self { sgui_name: None }
    }

    pub fn set_sgui_name(&mut self, name: Token) {
        self.sgui_name = Some(name);
    }

    #[allow(dead_code)]
    pub fn sgui_name(&self) -> Option<&Token> {
        self.sgui_name.as_ref()
    }
}