Whitespace and changelog fixes

This commit is contained in:
Nyerguds 2023-06-09 11:44:39 +02:00
parent 58be2ebd90
commit 996de77eb7
189 changed files with 1476 additions and 1514 deletions

View File

@ -17,7 +17,7 @@ Released on 08 Jul 2022 at 21:37 UTC
* Fixed overlay height overflow bug in Rampa's new UI.
* Fixed map tiles list duplicating every time the "Map" tool window is opened in Rampa's version.
* Split off internal overlay type "decoration", used for pavements and civilian buildings.
* Added CONC and ROAD pavement. They have no graphics, but at least now they are accepted by the editor and not discarded as errors.
* Added CONC and ROAD pavement to TD. They have no graphics, but at least now they are accepted by the editor and not discarded as errors.
* Sorted all items in the lists (except map tiles) by key, which is usually a lot more straightforward.
* Split off specific separate list for techno types usable in teamtypes.
* Removed the Aircraft from the placeable units in TD. [NOTE: made into a setting in v1.4.3.0]
@ -43,8 +43,8 @@ Released on 13 Jul 2022 at 07:35 UTC
* Added "All supported types (\*.ini;\*.bin;\*.mpr)" as default filter when opening files.
* Added Drag & Drop support for opening map files.
* Added command line file argument support, which allows setting the editor as application for opening ini/mpr files.
* Changed the order of the choices for the "Edge" setting of the Houses to a more logical North, East, South, West.
* House Edge reading now corrects values with case differences so they show up in the dropdown.
* Centralised the House Edge array on the House class, and changed its order to a more logical North, East, South, West.
* Fixed order of the Multi-House colors. It seems the error is not in the editor, but in bizarre mixed-up team color names in the remastered game itself.
* Remapped Neutral (TD only) and Special as yellow, as they are in the game.
* All tool windows will now save their position.
@ -84,9 +84,9 @@ Released on 14 Jul 2022 at 20:22 UTC
* Damaged states now work correctly on all buildings, with a vastly simpler and more general internal logic.
* Using the mouse wheel will now change the strength of objects in increments of 4.
* IQ of all Houses in RA now defaults to 0.
* Fixed Gunboat facing and damage states logic.
* Fixed TD Gunboat facing and damage states logic.
* Fixed bug causing bad refresh when previewing the placement of a single cell selected from a template with an empty top right corner cell.
* The "clear1" tile is now explicitly shown in the tiles list. It acts as eraser.
* The "clear1" tile is now explicitly shown in the tiles list. It acts as 1x1 eraser.
* Teamtype "Priority" value (recruit priority) is now capped at 15. [NOTE: reverted in v1.4.0.3]
### v1.4.0.3:
@ -443,7 +443,7 @@ Released on 03 Apr 2023 at 19:20 GMT
* Added character count to the briefing screen. if WriteClassicBriefing is enabled a warning wil be given if the amount exceeds the maximum the classic game can handle. If the warning is ignored, the classic briefing will truncated on the maximum it can handle, to prevent game crashes.
* Fixed saving of Red Alert's classic briefing, to also obey the classic internal maximum, and to correctly split on line break @ characters.
### v1.4.5.1:
### v1.4.6.0:
Unreleased
@ -456,11 +456,12 @@ Unreleased
* Fixed mixup between actions and events in the TD trigger reading checks.
* Resources outside the map are now always shown at their minimum size, and tinted red, to indicate they don't really have any impact on the map. This also updates on the fly when changing the map bounds.
* The Resources tool no longer evaluates resources placed outside the map bounds.
* Fixed a bug in the resource value calculation for gems.
* Rule errors that occur after closing the Map settings dialog will now show in a window with scrollable area, just like the errors shown when opening a maps.
* Added missing overlap checks to buildings on the rebuild-list.
* Added missing overlap checks to buildings on the rebuild-list, so they can no longer disappear on map load without any warning.
* Fixed bug in Team Types window where the amount of added classes and orders would not unlock when maxed out on the previously selected item.
* Added names to Overlay, Terrain, Smudge and Resources.
* Migrated resource randomisation from the map renderer to the density-update logic, so the actual objects don't always show as "TI01" / "GOLD01" / "GEM01".
* Migrated resource randomisation from the map renderer to the density-update logic, so the actual objects don't always show as "TI01" / "GOLD01" / "GEM01" if that's not the graphics they're showing.
* Changed TD Technology Center to its real name, instead of "Prison".
* Added reference to GraphicsFixesRA mod.
* Added "EnforceObjectMaximums" setting that can be disabled to remove save checks on object maximums.

View File

@ -23,7 +23,6 @@ namespace MobiusEditor.Controls
public MissionItemControl()
:this(null, null, null, null, 0, null)
{
}
public MissionItemControl(TeamTypeMission info, ListedControlController<TeamTypeMission> controller, IEnumerable<TeamMission> missions, IEnumerable<ListItem<int>> waypoints, int mapSize, ToolTip tooltip)

View File

@ -418,8 +418,8 @@ namespace MobiusEditor.Controls
ShowToolTip(target, tooltip);
}
private void ShowToolTip(Control target, string message) {
private void ShowToolTip(Control target, string message)
{
if (target == null || message == null)
{
this.toolTip1.Hide(target);

View File

@ -19,7 +19,6 @@ namespace MobiusEditor.Controls
public TeamItemControl()
:this(null, null, null)
{
}
public TeamItemControl(TeamTypeClass info, ListedControlController<TeamTypeClass> controller, IEnumerable<ITechnoType> technos)

View File

@ -305,7 +305,6 @@ namespace MobiusEditor.Dialogs
this.DialogResult = DialogResult.OK;
}
}
}
private void EnableControls(Boolean enabled, String processingLabel)

View File

@ -312,7 +312,6 @@ namespace MobiusEditor.Dialogs
e.Cancel = true;
}
}
}
}
}

View File

@ -175,9 +175,7 @@ namespace MobiusEditor.Dialogs
public NewFromImageDialog(IGamePlugin plugin, int width, int height, byte[] imageData, Dictionary<int, string> mappings)
{
this.plugin = plugin;
InitializeComponent();
foreach (KeyValuePair<int, string> kvp in mappings)
{
string tileType = kvp.Value;
@ -421,7 +419,6 @@ namespace MobiusEditor.Dialogs
}
String col = String.Format("#{0:X6} ", selected.Value.ToArgb() & 0xFFFFFF);
int mappings = lstMappings.Items.Count;
for (int i = 0; i < mappings; i++)
{
String entry = (lstMappings.Items[i] ?? String.Empty).ToString();
@ -552,8 +549,6 @@ namespace MobiusEditor.Dialogs
var rect = new Rectangle(new Point(padX + selectedIcon.X * cellSize.Width, padY + selectedIcon.Y * cellSize.Height), cellSize);
e.Graphics.DrawRectangle(selectedIconPen, rect);
}
}
private void templateTypeMapPanel_MouseDown(Object sender, MouseEventArgs e)

View File

@ -124,10 +124,8 @@ namespace MobiusEditor.Dialogs
HashSet<string> allowedTriggers = new HashSet<string>(items);
items = Trigger.None.Yield().Concat(plugin.Map.Triggers.Select(t => t.Name).Where(t => allowedTriggers.Contains(t)).Distinct()).ToArray();
cmbTrigger.DataSource = items;
defaultTeam = technoTypes.FirstOrDefault();
// Fix for case sensitivity issue in teamtype missions
TeamMission[] missions = plugin.Map.TeamMissionTypes;
this.teamMissionTypes = missions.ToArray();
this.defaultMission = missions.FirstOrDefault();
@ -589,7 +587,6 @@ namespace MobiusEditor.Dialogs
}
btnAddTeam.Enabled = SelectedTeamType.Classes.Count < Globals.MaxTeamClasses;
tilTeams.TabStop = SelectedTeamType.Classes.Count > 0;
}
}

View File

@ -1,12 +1,4 @@
//
// Copyright 2020 Electronic Arts Inc.
//
// The Command & Conquer Map Editor and corresponding source code is free
// software: you can redistribute it and/or modify it under the terms of
// the GNU General Public License as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
using System.Drawing;
using System.Drawing;
namespace MobiusEditor.Interface
{

View File

@ -1,12 +1,4 @@
//
// Copyright 2020 Electronic Arts Inc.
//
// The Command & Conquer Map Editor and corresponding source code is free
// software: you can redistribute it and/or modify it under the terms of
// the GNU General Public License as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
using MobiusEditor.Model;
using MobiusEditor.Model;
using System.Drawing;
namespace MobiusEditor.Interface

View File

@ -975,7 +975,6 @@ namespace MobiusEditor
MessageBox.Show(string.Format("Error loading {0}: the file was not found.", e.Name), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
mru.Remove(e);
}
}
private void MapPanel_MouseMove(object sender, MouseEventArgs e)

View File

@ -125,7 +125,6 @@ namespace MobiusEditor.Model
if (!metrics.GetLocation(cell, out Point location))
{
return default;
}
return metrics.Adjacent(location, facing, out Point adjacent) ? this[adjacent] : default;
}

View File

@ -158,7 +158,6 @@ namespace MobiusEditor.Model
public Rectangle OverlapBounds => new Rectangle(-1, -1, 3, 3);
public bool[,] OpaqueMask => new bool[1, 1] { { true } };
public bool[,] OccupyMask => new bool[1, 1] { { true } };
public readonly Infantry[] Infantry = new Infantry[Globals.NumInfantryStops];

View File

@ -1339,7 +1339,6 @@ namespace MobiusEditor.Model
blockingCell = -1;
return null;
}
ICellOccupier techno = this.Technos[targetCell];
ICellOccupier b = this.Buildings[targetCell];
if (techno != null || b != null)

View File

@ -156,7 +156,6 @@ namespace MobiusEditor.Model
break;
}
}
}
}

View File

@ -49,7 +49,6 @@ namespace MobiusEditor
{
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US");
}
Version version = Assembly.GetExecutingAssembly().GetName().Version;
if (!Version.TryParse(Properties.Settings.Default.ApplicationVersion, out Version oldVersion) || oldVersion < version)
{
@ -490,7 +489,6 @@ namespace MobiusEditor
break;
}
}
string previousVersionConfigFile = previousSettingsDir == null ? null : string.Concat(previousSettingsDir.FullName, @"\", userConfigFileName);
string currentVersionConfigFile = string.Concat(currentVersionConfigFileDir.FullName, @"\", userConfigFileName);
if (!currentVersionConfigFileDir.Exists)

View File

@ -693,7 +693,6 @@ namespace MobiusEditor.Render
if (unit.Strength < 64)
icon += 32;
}
}
else if (gameType == GameType.RedAlert)
{
@ -1333,7 +1332,6 @@ namespace MobiusEditor.Render
}
}
public static void RenderAllFakeBuildingLabels(Graphics graphics, Map map, Size tileSize, double tileScale)
{
foreach (var (topLeft, building) in map.Buildings.OfType<Building>())

View File

@ -54,7 +54,6 @@ namespace MobiusEditor.SoleSurvivor
(from field in typeof(OverlayTypes).GetFields(BindingFlags.Static | BindingFlags.Public)
where field.IsInitOnly && typeof(OverlayType).IsAssignableFrom(field.FieldType)
select field.GetValue(null) as OverlayType).Where(t => t.ID != 19).OrderBy(t => t.ID).ToArray();
}
public static IEnumerable<OverlayType> GetTypes()

View File

@ -2303,7 +2303,6 @@ namespace MobiusEditor.TiberianDawn
briefingSection["Text"] = briefText.Replace("\n", "@");
if (Globals.WriteClassicBriefing)
{
if (briefText.Length > maxBriefLengthClassic)
{
briefText = briefText.Substring(0, maxBriefLengthClassic);

View File

@ -65,7 +65,6 @@ namespace MobiusEditor.TiberianDawn
(from field in typeof(OverlayTypes).GetFields(BindingFlags.Static | BindingFlags.Public)
where field.IsInitOnly && typeof(OverlayType).IsAssignableFrom(field.FieldType)
select field.GetValue(null) as OverlayType).OrderBy(t => t.ID).ToArray();
}
public static IEnumerable<OverlayType> GetTypes()

View File

@ -396,7 +396,6 @@ namespace MobiusEditor.Utility
transColors.Add(i);
}
}
data = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadWrite, dataFormat);
var bytes = new byte[data.Stride * data.Height];
Marshal.Copy(data.Scan0, bytes, 0, bytes.Length);

View File

@ -171,7 +171,9 @@ namespace MobiusEditor.Widgets
startScrollMouseLocation = (Size)mapPanel.PointToClient(Control.MousePosition);
startScrollFromLocation = mapPanel.AutoScrollPosition;
if (mapPanel != null)
{
mapPanel.Cursor = Cursors.SizeAll;
}
// Only return true if already dragging, not when initialising.
return false;
}