Struct tiger_lib::Everything
source · pub struct Everything { /* private fields */ }Expand description
A record of everything known about the game and mod being validated.
References to Everything are passed down through nearly all of the validation logic, so
that individual functions can access all the defined game items.
The validator has two main phases: parsing and validation.
- During parsing, the script files are read, parsed, and loaded into the various databases.
Everythingis mutable during this period. - During validation,
Everythingis immutable and cross-checking between item types can be done safely.
Implementations§
source§impl Everything
impl Everything
sourcepub fn new(
vanilla_dir: Option<&Path>,
mod_root: &Path,
replace_paths: Vec<PathBuf>
) -> Result<Self, FilesError>
pub fn new( vanilla_dir: Option<&Path>, mod_root: &Path, replace_paths: Vec<PathBuf> ) -> Result<Self, FilesError>
Create a new Everything instance, ready for validating a mod.
vanilla_dir is the path to the base game files. If it’s None, then no vanilla files
will be loaded. This will seriously affect validation, but it’s ok if you just want to load
and examine the mod files.
mod_root is the path to the mod files. The config file will also be looked for there.
replace_paths is from the similarly named field in the .mod file.
pub fn load_config_filtering_rules(&self)
pub fn load_output_settings(&self, default_colors: bool)
pub fn load_all(&mut self)
pub fn validate_all(&self)
pub fn check_rivers(&mut self)
pub fn check_pod(&mut self)
pub fn check_unused(&mut self)
pub fn iter_keys_ck3<'a>( &'a self, itype: Item ) -> Box<dyn Iterator<Item = &Token> + 'a>
pub fn iter_keys<'a>( &'a self, itype: Item ) -> Box<dyn Iterator<Item = &Token> + 'a>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Everything
impl Send for Everything
impl Sync for Everything
impl Unpin for Everything
impl !UnwindSafe for Everything
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more