Remove runtime mod merging. Closes #3421.
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user