Require an explicit launch path for mod registrations.

This also removes a workaround that allowed the current mod to be
registered even if it defined a bogus path. Uses of Game.ExternalMods
should therefore always use TryGetValue and correctly handle it
returning false.
This commit is contained in:
Paul Chote
2021-09-25 11:23:51 +01:00
committed by teinarss
parent 4275e87c57
commit 5d83706eae
3 changed files with 9 additions and 25 deletions

View File

@@ -32,11 +32,7 @@ namespace OpenRA.UtilityCommands
if (args[1] == "user" || args[1] == "both")
type |= ModRegistration.User;
var mods = new ExternalMods();
ExternalMod activeMod = null;
mods.TryGetValue(ExternalMod.MakeKey(utility.ModData.Manifest), out activeMod);
mods.ClearInvalidRegistrations(activeMod, type);
new ExternalMods().ClearInvalidRegistrations(type);
}
}
}