Support map-defined AI in the lobby.
This commit is contained in:
@@ -210,6 +210,9 @@ namespace OpenRA
|
||||
Status = MapStatus.Unavailable;
|
||||
}
|
||||
|
||||
// Note: multiple threads may try to access the value at the same time
|
||||
// We rely on the thread-safety guarantees given by Lazy<T> to prevent race conitions.
|
||||
// If you're thinking about replacing this, then you must be careful to keep this safe.
|
||||
rules = Exts.Lazy(() =>
|
||||
{
|
||||
try
|
||||
|
||||
@@ -249,8 +249,6 @@ namespace OpenRA.Widgets
|
||||
return trimmed;
|
||||
}
|
||||
|
||||
public static Action Once(Action a) { return () => { if (a != null) { a(); a = null; } }; }
|
||||
|
||||
public static string ChooseInitialMap(string initialUid)
|
||||
{
|
||||
if (string.IsNullOrEmpty(initialUid) || Game.ModData.MapCache[initialUid].Status != MapStatus.Available)
|
||||
|
||||
Reference in New Issue
Block a user