mirror of
https://gitea.shironeko-all.duckdns.org/shironeko/Hytale-F2P-2.git
synced 2026-02-26 10:41:46 -03:00
Improve comments in saveModsToConfig function
Refactor comments in saveModsToConfig function for clarity.
This commit is contained in:
@@ -151,14 +151,10 @@ function saveModsToConfig(mods) {
|
|||||||
try {
|
try {
|
||||||
const config = loadConfig();
|
const config = loadConfig();
|
||||||
|
|
||||||
// Config migration to profiles handles the structure,
|
// Config migration handles structure, but mod saves must go to the ACTIVE profile.
|
||||||
// but here we ensure that if we are saving mods, we save them to the ACTIVE profile
|
// Global installedMods is kept mainly for reference/migration.
|
||||||
// OR we save to the global pool if that's the design.
|
// The profile is the source of truth for enabled mods.
|
||||||
// Based on the plan: Profile has "Enabled Mods".
|
|
||||||
// This function seems to be used to save the list of *Installed* mods.
|
|
||||||
|
|
||||||
// We'll update the global config for "installedMods" mostly for reference/migration,
|
|
||||||
// but primarily we should be updating the active profile's mod list.
|
|
||||||
|
|
||||||
if (config.activeProfileId && config.profiles && config.profiles[config.activeProfileId]) {
|
if (config.activeProfileId && config.profiles && config.profiles[config.activeProfileId]) {
|
||||||
config.profiles[config.activeProfileId].mods = mods;
|
config.profiles[config.activeProfileId].mods = mods;
|
||||||
|
|||||||
Reference in New Issue
Block a user