Remove runtime mod merging. Closes #3421.

This commit is contained in:
Paul Chote
2013-10-06 12:44:20 +13:00
parent 4d893cb1f2
commit 6d6d1e230b
35 changed files with 143 additions and 186 deletions

View File

@@ -26,10 +26,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic
var modList = panel.Get<ScrollPanelWidget>("MOD_LIST");
var loadButton = panel.Get<ButtonWidget>("LOAD_BUTTON");
loadButton.OnClick = () => LoadMod(currentMod.Id, onSwitch);
loadButton.IsDisabled = () => currentMod.Id == Game.CurrentMods.Keys.First();
loadButton.IsDisabled = () => currentMod.Id == Game.modData.Manifest.Mod.Id;
panel.Get<ButtonWidget>("BACK_BUTTON").OnClick = () => { Ui.CloseWindow(); onExit(); };
currentMod = Mod.AllMods[Game.modData.Manifest.Mods[0]];
currentMod = Game.modData.Manifest.Mod;
// Mod list
var modTemplate = modList.Get<ScrollItemWidget>("MOD_TEMPLATE");
@@ -47,13 +47,11 @@ namespace OpenRA.Mods.RA.Widgets.Logic
void LoadMod(string mod, Action onSwitch)
{
var mods = Mod.AllMods[mod].WithPrerequisites();
Game.RunAfterTick(() =>
{
Ui.CloseWindow();
onSwitch();
Game.InitializeWithMods(mods);
Game.InitializeWithMod(mod);
});
}
}