X2CommunityCore / xcom2-launcher

The Alternative Mod Launcher (AML) is a replacement for the default game launchers from XCOM 2 and XCOM Chimera Squad.
GNU General Public License v3.0
350 stars 52 forks source link

Loading an exported modlist with only NOT subscribed items doesn't let you download them #334

Open BinaryTiger opened 1 year ago

BinaryTiger commented 1 year ago

AML Version: 1.5.0

Description Profile Tab > Load button

If using a list that contains only mods that aren't in the active mod list, the load button will show a "No mods found, bad profile?" dialog. If at least one item in the .txt is in the active mod list, it will show a dialog prompting to download the missing mods.

I'm expecting the "download missing mod?" dialog to appear, even when all mod in the .txt are missing. This scenario occurs when installing AML and xcom2 on an account without any subscribed mods in steam.

Workaround Subscribe and download at least one of the mod from the list manually, then redo the load process.

Fix breadcrumbs https://github.com/X2CommunityCore/xcom2-launcher/blob/d23f80acfeb7f556c79d8853dda8ed311b8a43f0/xcom2-launcher/xcom2-launcher/Forms/MainForm.Events.cs#L538

This happens because there's a check for activeMods that can stop the whole process before the check for missing mods is done.

RevZero commented 1 year ago

Thanks for reporting. The import/export stuff is all legacy code that I barely looked at before. But from a quick glance it should suffice to move the if (activeMods.Count == 0) check below the if (missingMods.Count > 0) section, as you already pointed out.