Rework MapCache API.
This clarifies the ownership of the underlying IReadOnlyPackage objects, and avoids passing around some unnecessary state.
This commit is contained in:
committed by
Gustas Kažukauskas
parent
5c0b82e65b
commit
e186dc428e
@@ -978,7 +978,7 @@ namespace OpenRA
|
||||
Order.Command($"state {Session.ClientState.Ready}")
|
||||
};
|
||||
|
||||
var map = ModData.MapCache.SingleOrDefault(m => m.Uid == launchMap || Path.GetFileName(m.PackageName) == launchMap);
|
||||
var map = ModData.MapCache.SingleOrDefault(m => m.Uid == launchMap || Path.GetFileName(m.Path) == launchMap);
|
||||
if (map == null)
|
||||
throw new ArgumentException($"Could not find map '{launchMap}'.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user