Rewrite ActorInit queries.

This commit is contained in:
Paul Chote
2020-05-24 22:28:16 +01:00
committed by teinarss
parent 626b40f31b
commit 7c6ec577dc
66 changed files with 332 additions and 265 deletions

View File

@@ -70,7 +70,7 @@ namespace OpenRA.Mods.Common.Lint
foreach (var kv in map.ActorDefinitions.Where(d => d.Value.Value == "mpspawn"))
{
var s = new ActorReference(kv.Value.Value, kv.Value.ToDictionary());
spawns.Add(s.InitDict.Get<LocationInit>().Value(null));
spawns.Add(s.InitDict.Get<LocationInit>().Value);
}
if (playerCount > spawns.Count)
@@ -93,7 +93,7 @@ namespace OpenRA.Mods.Common.Lint
emitError("Actor {0} is not owned by any player.".F(kv.Key));
else
{
var ownerName = ownerInit.PlayerName;
var ownerName = ownerInit.InternalName;
if (!playerNames.Contains(ownerName))
emitError("Actor {0} is owned by unknown player {1}.".F(kv.Key, ownerName));