remove the WinForms map editor
This commit is contained in:
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
|
||||
[Desc("Render trait fundament that won't work without additional With* render traits.")]
|
||||
public class RenderSpritesInfo : IRenderActorPreviewInfo, ITraitInfo, ILegacyEditorRenderInfo
|
||||
public class RenderSpritesInfo : IRenderActorPreviewInfo, ITraitInfo
|
||||
{
|
||||
[Desc("The sequence name that defines the actor sprites. Defaults to the actor name.")]
|
||||
public readonly string Image = null;
|
||||
@@ -91,9 +91,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
return (Image ?? actor.Name).ToLowerInvariant();
|
||||
}
|
||||
|
||||
public string EditorPalette { get { return Palette; } }
|
||||
public string EditorImage(ActorInfo actor, SequenceProvider sequenceProvider, string race) { return GetImage(actor, sequenceProvider, race); }
|
||||
}
|
||||
|
||||
public class RenderSprites : IRender, ITick, INotifyOwnerChanged, INotifyEffectiveOwnerChanged
|
||||
|
||||
@@ -1175,6 +1175,20 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
Console.WriteLine("See RA and C&C bridge huts or crates for reference.");
|
||||
}
|
||||
|
||||
// WinForms editor was removed
|
||||
if (engineVersion < 20150620)
|
||||
{
|
||||
if (depth == 0 && node.Value.Nodes.Exists(n => n.Key == "EditorAppearance"))
|
||||
node.Value.Nodes.RemoveAll(n => n.Key == "EditorAppearance");
|
||||
|
||||
if (depth == 1 && node.Value.Nodes.Exists(n => n.Key == "ResourceType"))
|
||||
{
|
||||
var editorSprite = node.Value.Nodes.FirstOrDefault(n => n.Key == "EditorSprite");
|
||||
if (editorSprite != null)
|
||||
node.Value.Nodes.Remove(editorSprite);
|
||||
}
|
||||
}
|
||||
|
||||
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user