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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user