Simplify collection initialization

This commit is contained in:
Eduardo Cáceres
2022-05-02 13:24:49 +02:00
committed by atlimit8
parent cae43808d9
commit aa998a46d9
9 changed files with 55 additions and 35 deletions

View File

@@ -35,9 +35,10 @@ namespace OpenRA.Mods.Common.Scripting
if (!Context.World.Map.Rules.Actors.TryGetValue(actorType, out var ai))
throw new LuaException($"Unknown actor type '{actorType}'");
var initDict = new TypeDictionary();
initDict.Add(new OwnerInit(owner));
var initDict = new TypeDictionary
{
new OwnerInit(owner)
};
if (entryLocation.HasValue)
{