Fix duplicate ActorIDs
This commit is contained in:
@@ -328,7 +328,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public EditorActorPreview this[string id]
|
||||
{
|
||||
get { return previews.FirstOrDefault(p => p.ID.ToLowerInvariant() == id); }
|
||||
get { return previews.FirstOrDefault(p => p.ID.Equals(id, StringComparison.OrdinalIgnoreCase)); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,11 +126,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
}
|
||||
|
||||
// Check for duplicate actor ID
|
||||
if (CurrentActor.ID.Equals(actorId, StringComparison.OrdinalIgnoreCase))
|
||||
if (!CurrentActor.ID.Equals(actorId, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (editorActorLayer[actorId] != null)
|
||||
{
|
||||
nextActorIDStatus = ActorIDStatus.Duplicate;
|
||||
actorIDErrorLabel.Text = "Duplicate ActorID";
|
||||
actorIDErrorLabel.Visible = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user