pub fn discover_mods(storage: &GameStorage) -> Vec<LoadedMod>Expand description
Scans .supreme/mods/, loads every mod’s mod.json, and pairs each one
with its current values from the active configuration in
mods.json.
Ordering: ModsPreset::order (of the active configuration) is the
single, stable source of list position, toggling a mod’s enabled state
never changes it. A mod folder found on disk but not yet in order
(new install, or a mod a just-applied preset didn’t mention, see
supreme_hook_config::ModsState::apply_preset) is appended at the
end, alphabetically among any other new-this-scan folders; a name in
order no longer found on disk is dropped. The reconciled order is
written straight back so order never drifts from what’s actually on
disk between scans. For the active configuration, display order and
DLL merge priority are the same list, order filtered to what’s
enabled (see ModsPreset::priority_order), so there’s nothing else
to reconcile. A mod that fails to load or validate still gets a row,
see LoadedMod::load_error, rather than disappearing from the list.