pub fn create_env<'a>(
internal: bool,
map_present: bool,
no_vis: bool,
data: &GameData,
) -> Environment<'a>
Expand description
§Environment creation
Create a new [Environment] with the filters and templates needed for the project. If the internal flag is set to true, it will use the internal templates, otherwise it will use the templates in the templates folder. If the templates folder does not exist, it will attempt use the internal templates regardless of the setting.
§Env specifics
The environment will have no html escaping, and will not permit undefined chicanery.
§Filters
The environment will have the following filters:
- render_ref - renders a reference to another object
- localize - localizes the provided string
§Globals
The environment will have the following globals:
- map_present - whether the map is present
- no_vis - whether the visualizations are disabled