diff --git a/CHANGELOG.md b/CHANGELOG.md index b1d6c6e..253ea53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -601,9 +601,7 @@ Released on 31 Jan 2023 at 20:50 GMT * The Digest section will now also be removed from TD / SS maps. * Upgraded the logic to detect missing rules for ant-related objects on RA maps, so it includes the Mandible weapon, and checks in triggers too. The check now also goes through the rules files, so when using a rules mod that does define these things, no warnings will be shown. * Added config option for the behaviour to recolor the classic DOS Einstein to RA95/remastered colors. -* Added code to filter out special houses (e.g. "None") by HouseTypeFlag rather than using hardcoded exceptions. * Fixed the alliances list in the house settings scrolling past the first selected alliance. -* The Alliances list now uses a specific list for alliance-houses, which is filtered and sorted to potentially include special houses. * Red Alert now allows the special grouping Houses "Allies" and "Soviet" in their alliances list. * Houses now always automatically add their own house name in their alliances list if it is missing. * Sole Survivor maps with all multi-Houses enabled will now have all those beyond Multi4 disabled on map load, to avoid needlessly expanding the ini. @@ -622,7 +620,7 @@ Released on 31 Jan 2023 at 20:50 GMT * Added an option to control the behaviour of allowing walls as structures, with an owner. Since this is a behavior tweaks option, and those are all enabled by default, it is called "DontAllowWallsAsBuildings". -### v1.5.1.0: +### v1.6.0.0: Unreleased. @@ -668,4 +666,5 @@ Unreleased. * Fixed an issue in the redo of drag-moving infantry, that created a ghost duplicate of the dragged infantry unit that could cause crashes. * Fixed an issue with the main editor window becoming hard to select if it was minimised during a load or save operation, because it would select the tool window instead of restoring the main window. To fix this, the tool window is now never shown if the main window is minimised. * Added an indicator to the building tool to indicate whether a building is capturable. -* Added support for C&C95 v1.06c's bib disabling and capturability rule tweaks. \ No newline at end of file +* Added support for C&C95 v1.06c's bib disabling and capturability rule tweaks. +* Fixed trigger changes on Terrain objects not immediately refreshing the map. diff --git a/CnCTDRAMapEditor/4point.fnt b/CnCTDRAMapEditor/4point.fnt deleted file mode 100644 index a0261a0..0000000 Binary files a/CnCTDRAMapEditor/4point.fnt and /dev/null differ diff --git a/CnCTDRAMapEditor/5pntthin.fnt b/CnCTDRAMapEditor/5pntthin.fnt new file mode 100644 index 0000000..b7a2899 Binary files /dev/null and b/CnCTDRAMapEditor/5pntthin.fnt differ diff --git a/CnCTDRAMapEditor/CnCTDRAMapEditor.csproj b/CnCTDRAMapEditor/CnCTDRAMapEditor.csproj index 3a865c8..bd27efe 100644 --- a/CnCTDRAMapEditor/CnCTDRAMapEditor.csproj +++ b/CnCTDRAMapEditor/CnCTDRAMapEditor.csproj @@ -1,4 +1,4 @@ - + @@ -792,7 +792,7 @@ WaypointsToolDialog.cs - + Always diff --git a/CnCTDRAMapEditor/Controls/ObjectProperties.cs b/CnCTDRAMapEditor/Controls/ObjectProperties.cs index 4299ea1..ce7d2a7 100644 --- a/CnCTDRAMapEditor/Controls/ObjectProperties.cs +++ b/CnCTDRAMapEditor/Controls/ObjectProperties.cs @@ -158,6 +158,38 @@ namespace MobiusEditor.Controls }; } + public void CleanUp() + { + Object = null; + HideToolTip(this, new EventArgs()); + lblTriggerTypesInfo.Image = null; + lblCapturable.Image = null; + if (triggerInfoImage != null) + { + try { triggerInfoImage.Dispose(); } + catch { /*ignore*/} + triggerInfoImage = null; + } + if (captureImage != null) + { + try { captureImage.Dispose(); } + catch { /*ignore*/} + captureImage = null; + } + if (captureDisabledImage != null) + { + try { captureDisabledImage.Dispose(); } + catch { /*ignore*/} + captureDisabledImage = null; + } + if (captureUnknownImage != null) + { + try { captureUnknownImage.Dispose(); } + catch { /*ignore*/} + captureUnknownImage = null; + } + } + private void Triggers_CollectionChanged(object sender, EventArgs e) { UpdateDataSource(); @@ -259,8 +291,12 @@ namespace MobiusEditor.Controls houseComboBox.DataBindings.Clear(); strengthNud.DataBindings.Clear(); directionComboBox.DataBindings.Clear(); + directionComboBox.DataSource = null; + directionComboBox.Items.Clear(); missionComboBox.DataBindings.Clear(); triggerComboBox.DataBindings.Clear(); + triggerComboBox.DataSource = null; + triggerComboBox.Items.Clear(); basePriorityNud.DataBindings.Clear(); prebuiltCheckBox.DataBindings.Clear(); sellableCheckBox.DataBindings.Clear(); @@ -583,7 +619,7 @@ namespace MobiusEditor.Controls this.tooltipShownOn = target; } - private void HideToolTip(object sender, EventArgs e) + public void HideToolTip(object sender, EventArgs e) { if (this.tooltipShownOn != null) { @@ -602,43 +638,20 @@ namespace MobiusEditor.Controls /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + // Remove all bindings to this control + Object = null; + if (disposing && components != null) { - lblTriggerTypesInfo.Image = null; - lblCapturable.Image = null; - if (triggerInfoImage != null) - { - try { triggerInfoImage.Dispose(); } - catch { /*ignore*/} - triggerInfoImage = null; - } - if (captureImage != null) - { - try { captureImage.Dispose(); } - catch { /*ignore*/} - captureImage = null; - } - if (captureDisabledImage != null) - { - try { captureDisabledImage.Dispose(); } - catch { /*ignore*/} - captureDisabledImage = null; - } - if (captureUnknownImage != null) - { - try { captureUnknownImage.Dispose(); } - catch { /*ignore*/} - captureUnknownImage = null; - } components.Dispose(); } + CleanUp(); base.Dispose(disposing); } } public class ObjectPropertiesPopup : ToolStripDropDown { - private readonly ToolStripControlHost host; + private ToolStripControlHost host; public ObjectProperties ObjectProperties { get; private set; } public ObjectPropertiesPopup(IGamePlugin plugin, INotifyPropertyChanged obj) @@ -657,18 +670,16 @@ namespace MobiusEditor.Controls Items.Add(host); ObjectProperties.Size = ObjectProperties.PreferredSize; Size = ObjectProperties.Size; - ObjectProperties.Disposed += (sender, e) => - { - ObjectProperties = null; - Dispose(true); - }; } protected override void OnClosed(ToolStripDropDownClosedEventArgs e) { + // Since dispose doesn't seem to auto-trigger, dispose and remove all this manually. + ObjectProperties = null; + Items.Remove(host); + host.Dispose(); + host = null; base.OnClosed(e); - - ObjectProperties.Object = null; } } } diff --git a/CnCTDRAMapEditor/Controls/SmudgeProperties.Designer.cs b/CnCTDRAMapEditor/Controls/SmudgeProperties.Designer.cs index 32ab99b..63f552d 100644 --- a/CnCTDRAMapEditor/Controls/SmudgeProperties.Designer.cs +++ b/CnCTDRAMapEditor/Controls/SmudgeProperties.Designer.cs @@ -21,19 +21,6 @@ namespace MobiusEditor.Controls /// private System.ComponentModel.IContainer components = null; - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - #region Component Designer generated code /// diff --git a/CnCTDRAMapEditor/Controls/SmudgeProperties.cs b/CnCTDRAMapEditor/Controls/SmudgeProperties.cs index 5408bf1..adaa7a7 100644 --- a/CnCTDRAMapEditor/Controls/SmudgeProperties.cs +++ b/CnCTDRAMapEditor/Controls/SmudgeProperties.cs @@ -52,15 +52,8 @@ namespace MobiusEditor.Controls public void Initialize(IGamePlugin plugin, bool isMockObject) { this.isMockObject = isMockObject; - Plugin = plugin; - UpdateDataSource(); - - Disposed += (sender, e) => - { - Smudge = null; - }; } private void UpdateDataSource() @@ -76,7 +69,8 @@ namespace MobiusEditor.Controls private void Rebind() { stateComboBox.DataBindings.Clear(); - + stateComboBox.DataSource = null; + stateComboBox.Items.Clear(); if (smudge == null) { return; @@ -109,11 +103,25 @@ namespace MobiusEditor.Controls binding.WriteValue(); } } + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + Smudge = null; + if (disposing && components != null) + { + components.Dispose(); + } + base.Dispose(disposing); + } } public class SmudgePropertiesPopup : ToolStripDropDown { - private readonly ToolStripControlHost host; + private ToolStripControlHost host; public SmudgeProperties SmudgeProperties { get; private set; } @@ -131,18 +139,17 @@ namespace MobiusEditor.Controls SmudgeProperties.MaximumSize = SmudgeProperties.Size; Size = SmudgeProperties.Size; Items.Add(host); - SmudgeProperties.Disposed += (sender, e) => - { - SmudgeProperties = null; - Dispose(true); - }; } protected override void OnClosed(ToolStripDropDownClosedEventArgs e) { - base.OnClosed(e); - + // Since dispose doesn't seem to auto-trigger, dispose and remove all this manually. SmudgeProperties.Smudge = null; + SmudgeProperties = null; + Items.Remove(host); + host.Dispose(); + host = null; + base.OnClosed(e); } } } diff --git a/CnCTDRAMapEditor/Controls/TerrainProperties.cs b/CnCTDRAMapEditor/Controls/TerrainProperties.cs index 6145e12..a7e7bf8 100644 --- a/CnCTDRAMapEditor/Controls/TerrainProperties.cs +++ b/CnCTDRAMapEditor/Controls/TerrainProperties.cs @@ -238,7 +238,7 @@ namespace MobiusEditor.Controls public class TerrainPropertiesPopup : ToolStripDropDown { - private readonly ToolStripControlHost host; + private ToolStripControlHost host; public TerrainProperties TerrainProperties { get; private set; } @@ -256,18 +256,17 @@ namespace MobiusEditor.Controls TerrainProperties.MaximumSize = TerrainProperties.Size; Size = TerrainProperties.Size; Items.Add(host); - TerrainProperties.Disposed += (sender, e) => - { - TerrainProperties = null; - Dispose(true); - }; } protected override void OnClosed(ToolStripDropDownClosedEventArgs e) { - base.OnClosed(e); - + // Since dispose doesn't seem to auto-trigger, dispose and remove all this manually. TerrainProperties.Terrain = null; + TerrainProperties = null; + Items.Remove(host); + host.Dispose(); + host = null; + base.OnClosed(e); } } } diff --git a/CnCTDRAMapEditor/Interface/ITechno.cs b/CnCTDRAMapEditor/Interface/ITechno.cs index 5830c81..bfd2088 100644 --- a/CnCTDRAMapEditor/Interface/ITechno.cs +++ b/CnCTDRAMapEditor/Interface/ITechno.cs @@ -33,7 +33,9 @@ namespace MobiusEditor.Interface string Trigger { get; set; } /// Direction that the object is facing. DirectionType Direction { get; set; } - /// Cached index of the order in which the object was painted. This provides a quick solution to complicated overlap checks. + /// Cached index of the order in which this object was painted along with other overlappers. This provides a quick solution to complicated overlap checks. int DrawOrderCache { get; set; } + /// Cached index of the frame of the object that was rendered. This is used for distinguishing outlines. + int DrawFrameCache { get; set; } } } diff --git a/CnCTDRAMapEditor/Model/Building.cs b/CnCTDRAMapEditor/Model/Building.cs index 6a410bd..46da156 100644 --- a/CnCTDRAMapEditor/Model/Building.cs +++ b/CnCTDRAMapEditor/Model/Building.cs @@ -37,6 +37,7 @@ namespace MobiusEditor.Model public bool[,] BaseOccupyMask => Type.BaseOccupyMask; public int ZOrder => Type.ZOrder; public int DrawOrderCache { get; set; } + public int DrawFrameCache { get; set; } public Size Size => type.Size; private HouseType house; diff --git a/CnCTDRAMapEditor/Model/Infantry.cs b/CnCTDRAMapEditor/Model/Infantry.cs index c501799..3706f5a 100644 --- a/CnCTDRAMapEditor/Model/Infantry.cs +++ b/CnCTDRAMapEditor/Model/Infantry.cs @@ -61,6 +61,7 @@ namespace MobiusEditor.Model public bool IsPreview { get; set; } public int DrawOrderCache { get; set; } + public int DrawFrameCache { get; set; } public Infantry(InfantryGroup infantryGroup) { diff --git a/CnCTDRAMapEditor/Model/Smudge.cs b/CnCTDRAMapEditor/Model/Smudge.cs index 1a18dc2..ee85edf 100644 --- a/CnCTDRAMapEditor/Model/Smudge.cs +++ b/CnCTDRAMapEditor/Model/Smudge.cs @@ -32,6 +32,7 @@ namespace MobiusEditor.Model private int icon; public int Icon { get => icon; set => SetField(ref icon, value); } + public bool IsAutoBib => this.AttachedTo != null; // TODO start using this and remove extra "autobib" smudge types. public Building AttachedTo { get; set; } public Rectangle OverlapBounds => new Rectangle(Point.Empty, Type.Size); diff --git a/CnCTDRAMapEditor/Model/Terrain.cs b/CnCTDRAMapEditor/Model/Terrain.cs index 2301a1a..83a2759 100644 --- a/CnCTDRAMapEditor/Model/Terrain.cs +++ b/CnCTDRAMapEditor/Model/Terrain.cs @@ -38,6 +38,7 @@ namespace MobiusEditor.Model public bool[,] BaseOccupyMask => Type.OccupyMask; public int ZOrder => Type.ZOrder; public int DrawOrderCache { get; set; } + public int DrawFrameCache { get; set; } private string trigger = Model.Trigger.None; public string Trigger { get => trigger; set => SetField(ref trigger, value); } diff --git a/CnCTDRAMapEditor/Model/Unit.cs b/CnCTDRAMapEditor/Model/Unit.cs index 4c889f0..6d2ea9e 100644 --- a/CnCTDRAMapEditor/Model/Unit.cs +++ b/CnCTDRAMapEditor/Model/Unit.cs @@ -38,6 +38,7 @@ namespace MobiusEditor.Model public bool[,] BaseOccupyMask => Type.OccupyMask; public int ZOrder => Type.ZOrder; public int DrawOrderCache { get; set; } + public int DrawFrameCache { get; set; } private HouseType house; public HouseType House { get => house; set => SetField(ref house, value); } diff --git a/CnCTDRAMapEditor/RedAlert/GameInfoRedAlert.cs b/CnCTDRAMapEditor/RedAlert/GameInfoRedAlert.cs index 4262756..e61acd9 100644 --- a/CnCTDRAMapEditor/RedAlert/GameInfoRedAlert.cs +++ b/CnCTDRAMapEditor/RedAlert/GameInfoRedAlert.cs @@ -272,7 +272,7 @@ namespace MobiusEditor.RedAlert break; case ClassicFont.TechnoTriggersSmall: crop = true; - fontName = "4point.fnt"; + fontName = "5pntthin.fnt"; if (!tsmc.TileExists(fontName)) { fontName = "3point.fnt"; diff --git a/CnCTDRAMapEditor/Render/MapRenderer.cs b/CnCTDRAMapEditor/Render/MapRenderer.cs index 7c1c0f7..40e43a8 100644 --- a/CnCTDRAMapEditor/Render/MapRenderer.cs +++ b/CnCTDRAMapEditor/Render/MapRenderer.cs @@ -615,6 +615,7 @@ namespace MobiusEditor.Render TerrainType type = terrain.Type; string tileName = type.GraphicsSource; bool succeeded = Globals.TheTilesetManager.GetTileData(tileName, type.DisplayIcon, out Tile tile, true, false); + terrain.DrawFrameCache = type.DisplayIcon; if (!succeeded && !string.Equals(type.GraphicsSource, type.Name, StringComparison.InvariantCultureIgnoreCase)) { succeeded = Globals.TheTilesetManager.GetTileData(type.Name, type.DisplayIcon, out tile, true, false); @@ -713,6 +714,7 @@ namespace MobiusEditor.Render } ITeamColor teamColor = building.Type.CanRemap ? Globals.TheTeamColorManager[building.House?.BuildingTeamColor] : null; bool succeeded = Globals.TheTilesetManager.GetTeamColorTileData(building.Type.GraphicsSource, icon, teamColor, out Tile tile, true, false); + building.DrawFrameCache = icon; Point location = new Point(topLeft.X * tileSize.Width, topLeft.Y * tileSize.Height); Size maxSize = new Size(building.Type.Size.Width * tileSize.Width, building.Type.Size.Height * tileSize.Height); @@ -972,6 +974,7 @@ namespace MobiusEditor.Render } // Get body frame Globals.TheTilesetManager.GetTeamColorTileData(unit.Type.Name, icon, teamColor, out Tile tile, true, false); + unit.DrawFrameCache = icon; if (tile == null || tile.Image == null) { Debug.Print(string.Format("Unit {0} ({1}) not found", unit.Type.Name, icon)); @@ -1653,7 +1656,7 @@ namespace MobiusEditor.Render { houseCol = Color.FromArgb(0x80, Globals.TheTeamColorManager.GetBaseColor(colorPick(placedObj.House))); } - string id = "outline_" + typeof(T).Name + "_" + placedObj.TechnoType.Name + '_' + (placedObj.Direction == null ? 0 : placedObj.Direction.ID).ToString() + "_" + tileSize.Width + "x" + tileSize.Height; + string id = "outline_" + typeof(T).Name + "_" + placedObj.TechnoType.Name + "_fr" + placedObj.DrawFrameCache + "_" + tileSize.Width + "x" + tileSize.Height; RegionData paintAreaRel = Globals.TheShapeCacheManager.GetShape(id); if (paintAreaRel == null) { @@ -2076,6 +2079,8 @@ namespace MobiusEditor.Render { continue; } + Size size = tileSize; + Size boundSize = Globals.OriginalTileSize; List<(string, Rectangle, int)> infantryTriggers = new List<(string, Rectangle, int)>(); for (int i = 0; i < infantryGroup.Infantry.Length; ++i) { @@ -2084,7 +2089,6 @@ namespace MobiusEditor.Render { continue; } - Size size = Globals.OriginalTileSize; Size offset = Size.Empty; switch ((InfantryStoppingType)i) { @@ -2105,7 +2109,7 @@ namespace MobiusEditor.Render offset.Height = size.Height / 4; break; } - Rectangle bounds = new Rectangle(location + offset, size); + Rectangle bounds = new Rectangle(location + offset, boundSize); infantryTriggers.Add((infantry.Trigger, bounds, infantry.IsPreview ? Globals.PreviewAlphaInt : 256)); } triggers = infantryTriggers.ToArray(); diff --git a/CnCTDRAMapEditor/TiberianDawn/GameInfoTibDawn.cs b/CnCTDRAMapEditor/TiberianDawn/GameInfoTibDawn.cs index 8b3a0a6..11e8df2 100644 --- a/CnCTDRAMapEditor/TiberianDawn/GameInfoTibDawn.cs +++ b/CnCTDRAMapEditor/TiberianDawn/GameInfoTibDawn.cs @@ -198,7 +198,7 @@ namespace MobiusEditor.TiberianDawn break; case ClassicFont.TechnoTriggersSmall: crop = true; - fontName = "4point.fnt"; + fontName = "5pntthin.fnt"; if (!tsmc.TileExists(fontName)) { fontName = "3point.fnt"; diff --git a/CnCTDRAMapEditor/Tools/BuildingTool.cs b/CnCTDRAMapEditor/Tools/BuildingTool.cs index b581795..fdceda0 100644 --- a/CnCTDRAMapEditor/Tools/BuildingTool.cs +++ b/CnCTDRAMapEditor/Tools/BuildingTool.cs @@ -159,6 +159,7 @@ namespace MobiusEditor.Tools selectedObjectProperties = null; navigationWidget.Refresh(); AddPropertiesUndoRedo(building, preEdit); + building.PropertyChanged -= SelectedBuilding_PropertyChanged; }; building.PropertyChanged += SelectedBuilding_PropertyChanged; selectedObjectProperties.Show(mapPanel, mapPanel.PointToClient(Control.MousePosition)); diff --git a/CnCTDRAMapEditor/Tools/InfantryTool.cs b/CnCTDRAMapEditor/Tools/InfantryTool.cs index b575ae4..f7465f9 100644 --- a/CnCTDRAMapEditor/Tools/InfantryTool.cs +++ b/CnCTDRAMapEditor/Tools/InfantryTool.cs @@ -193,6 +193,7 @@ namespace MobiusEditor.Tools selectedObjectProperties = null; navigationWidget.Refresh(); AddPropertiesUndoRedo(infantry, preEdit); + infantry.PropertyChanged -= SelectedInfantry_PropertyChanged; }; infantry.PropertyChanged += SelectedInfantry_PropertyChanged; selectedObjectProperties.Show(mapPanel, mapPanel.PointToClient(Control.MousePosition)); diff --git a/CnCTDRAMapEditor/Tools/SmudgeTool.cs b/CnCTDRAMapEditor/Tools/SmudgeTool.cs index 2521209..a5a7d3a 100644 --- a/CnCTDRAMapEditor/Tools/SmudgeTool.cs +++ b/CnCTDRAMapEditor/Tools/SmudgeTool.cs @@ -153,8 +153,10 @@ namespace MobiusEditor.Tools selectedSmudgeProperties = new SmudgePropertiesPopup(plugin, smudge); selectedSmudgeProperties.Closed += (cs, ce) => { + selectedSmudgeProperties = null; navigationWidget.Refresh(); AddPropertiesUndoRedo(smudge, preEdit); + smudge.PropertyChanged -= SelectedSmudge_PropertyChanged; }; smudge.PropertyChanged += SelectedSmudge_PropertyChanged; selectedSmudgeProperties.Show(mapPanel, mapPanel.PointToClient(Control.MousePosition)); diff --git a/CnCTDRAMapEditor/Tools/TerrainTool.cs b/CnCTDRAMapEditor/Tools/TerrainTool.cs index 7232fe0..fd7fcfc 100644 --- a/CnCTDRAMapEditor/Tools/TerrainTool.cs +++ b/CnCTDRAMapEditor/Tools/TerrainTool.cs @@ -154,16 +154,19 @@ namespace MobiusEditor.Tools startedDragging = false; mapPanel.Invalidate(); selectedTerrainProperties?.Close(); - // only TD supports triggers ("Attacked" type) on terrain types. + // Only open if current plugin supports any triggers on terrain types. if (plugin.Map.TerrainActionTypes.Count > 0 || plugin.Map.TerrainEventTypes.Count > 0) { Terrain preEdit = terrain.Clone(); selectedTerrainProperties = new TerrainPropertiesPopup(terrainProperties.Plugin, terrain); selectedTerrainProperties.Closed += (cs, ce) => { + selectedTerrainProperties = null; navigationWidget.Refresh(); AddPropertiesUndoRedo(terrain, preEdit); + terrain.PropertyChanged -= SelectedTerrain_PropertyChanged; }; + terrain.PropertyChanged += SelectedTerrain_PropertyChanged; selectedTerrainProperties.Show(mapPanel, mapPanel.PointToClient(Control.MousePosition)); } UpdateStatus(); @@ -218,6 +221,11 @@ namespace MobiusEditor.Tools RefreshPreviewPanel(); } + private void SelectedTerrain_PropertyChanged(object sender, PropertyChangedEventArgs e) + { + mapPanel.Invalidate(map, sender as Terrain); + } + private void TerrainTypeListBox_SelectedIndexChanged(object sender, EventArgs e) { SelectedTerrainType = terrainTypeListBox.SelectedValue as TerrainType; diff --git a/CnCTDRAMapEditor/Tools/UnitTool.cs b/CnCTDRAMapEditor/Tools/UnitTool.cs index 8da62ac..cedac19 100644 --- a/CnCTDRAMapEditor/Tools/UnitTool.cs +++ b/CnCTDRAMapEditor/Tools/UnitTool.cs @@ -191,6 +191,7 @@ namespace MobiusEditor.Tools selectedObjectProperties = null; navigationWidget.Refresh(); AddPropertiesUndoRedo(unit, preEdit); + unit.PropertyChanged -= SelectedUnit_PropertyChanged; }; unit.PropertyChanged += SelectedUnit_PropertyChanged; selectedObjectProperties.Show(mapPanel, mapPanel.PointToClient(Control.MousePosition)); diff --git a/README.md b/README.md index a7ef95a..5c0afa4 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,17 @@ Mobius Map Editor is an enhanced version of the map editor supplied with the Com The editor can edit maps for Command & Conquer Tiberian Dawn, Sole Survivor and Red Alert. The goal of the project is to improve the usability and convenience of the map editor, fix bugs, improve and clean its code-base, enhance compatibility with different kinds of systems and enhance the editor's support for mods. -As of v1.5.0.0, the editor does not require the C&C Remaster; if the C&C Remastered Collection is not installed on the PC, you can launch the editor in Classic mode instead, using the original 90's graphics. +As of v1.5.0.0, the editor no longer requires the C&C Remaster; if the C&C Remastered Collection is not installed on the PC, you can launch the editor in Classic mode instead, using the original 90's graphics. Updates are regularly posted on my little corner of [the C&C Mod Haven Discord server](https://discord.gg/fGbEYfxqkZ). ### Screenshots -![Editor running in Remastered mode](/readme_images/mobius_remastered.png "Editor running in Remastered mode") +Editing a Tiberian Dawn mission, in Remaster mode: + +![Editor running in Remaster mode](/readme_images/mobius_remastered.png "Editor running in Remaster mode") + +Editing a Red Alert mission, in Classic mode: ![Editor running in Classic mode](/readme_images/mobius_classic.png "Editor running in Classic mode") diff --git a/readme_images/mobius_classic.png b/readme_images/mobius_classic.png index 58231c9..d627e40 100644 Binary files a/readme_images/mobius_classic.png and b/readme_images/mobius_classic.png differ diff --git a/readme_images/mobius_remastered.png b/readme_images/mobius_remastered.png index 19ef04b..d33298b 100644 Binary files a/readme_images/mobius_remastered.png and b/readme_images/mobius_remastered.png differ