Module game_library::data_loader
source · Expand description
Data loading module
This module contains all of the data loading code for the game. This includes loading the game data files and sending events with the loaded data.
Modules
- Events that are fired when data is loaded.
- The storage module contains the resources that store the data that has been loaded into the game.
Structs
- A generic data file which can be loaded into the game.
- Each data file includes header information about the data in the file.
- A generic data file which only loads the header.
- The plugin for the data loader.
Constants
- The directory where the game data files are stored
Functions
- Reading in the directory of ingestible files:
- Read in an ingestible file and return it. This is generic because all ingestible files are the same, they only differ in the struct that is returned.
- Read in an ingestible file and return the header information from it. This will return None if the file is un-readable or ill-formatted. What this does return on success is the
FileHeader
, mainly the unique ID for the file, the version info, the system it has data for, author, and description.