Ignore nonexistent actors in D2k importer code instead of crashing.
This commit is contained in:
committed by
Paul Chote
parent
6083eb4ac8
commit
c15af9f68a
@@ -371,8 +371,9 @@ namespace OpenRA.Mods.D2k.UtilityCommands
|
||||
{
|
||||
var kvp = ActorDataByActorCode[tileSpecialInfo];
|
||||
if (!rules.Actors.ContainsKey(kvp.Actor.ToLowerInvariant()))
|
||||
throw new InvalidOperationException($"Actor with name {kvp.Actor} could not be found in the rules YAML file!");
|
||||
|
||||
Console.WriteLine($"Ignoring unknown actor type: `{kvp.Actor.ToLowerInvariant()}`");
|
||||
else
|
||||
{
|
||||
var a = new ActorReference(kvp.Actor)
|
||||
{
|
||||
new LocationInit(locationOnMap),
|
||||
@@ -402,6 +403,7 @@ namespace OpenRA.Mods.D2k.UtilityCommands
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CPos GetCurrentTilePositionOnMap()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user