Skip to main content

Module mod_config

Module mod_config 

Source
Expand description

The per-mod authored shape: ModConfig (one mod’s mod.json, metadata, conditional/templated rules, and the parameters it exposes), plus the ${param_id} substitution/gating logic that turns it into the plain crate::hook_config::RedirectionRules crate::hook_config::HookConfig::load_from_mods_dir merges across mods.

Structs§

ModConfig
The on-disk shape of a single mod’s mod.json: metadata, the mod’s authored (possibly conditional/templated) rules, the parameters it exposes for configuration, and default values for some or all of them. Holds no per-user values, though, those live separately in crate::mods_state::ModConfigurations, keyed by mod directory name, layered on top of these defaults at resolution time (see ModConfig::effective_configuration). That split means re-installing or updating a mod (replacing this whole file, defaults included) can never take a person’s own overrides for it along with it.
ModParameter
One configurable setting a mod exposes to the launcher’s Mods page.

Enums§

ParameterKind
The type of control a ModParameter is edited with, and the data that type needs. Serializes flat alongside id/name/help_text via #[serde(flatten)] on ModParameter::kind, tagged by a "type" field, e.g.: