diff --git a/AstroModLoader.csproj.user b/AstroModLoader.csproj.user index 680b7e8..d6c3c2d 100644 --- a/AstroModLoader.csproj.user +++ b/AstroModLoader.csproj.user @@ -3,7 +3,8 @@ - C:\Program Files %28x86%29\Steam\steamapps\common\ASTRONEER Dedicated Server\ + + diff --git a/Form1.Designer.cs b/Form1.Designer.cs index ef4480d..9ebfc95 100644 --- a/Form1.Designer.cs +++ b/Form1.Designer.cs @@ -29,7 +29,7 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.label1 = new System.Windows.Forms.Label(); this.modInfo = new System.Windows.Forms.LinkLabel(); this.footerPanel = new System.Windows.Forms.Panel(); @@ -163,14 +163,14 @@ private void InitializeComponent() this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None; this.dataGridView1.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(42)))), ((int)(((byte)(45))))); - dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(225)))), ((int)(((byte)(225))))); - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(85)))), ((int)(((byte)(85)))), ((int)(((byte)(85))))); - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(42)))), ((int)(((byte)(45))))); + dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(225)))), ((int)(((byte)(225))))); + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(85)))), ((int)(((byte)(85)))), ((int)(((byte)(85))))); + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.DefaultCellStyle = this.dataGridView1.ColumnHeadersDefaultCellStyle; this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter; @@ -254,7 +254,7 @@ private void InitializeComponent() this.Controls.Add(this.label1); this.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(225)))), ((int)(((byte)(225))))); this.MaximizeBox = false; - this.MaximumSize = new System.Drawing.Size(800, 580); + this.MaximumSize = new System.Drawing.Size(900, 580); this.MinimumSize = new System.Drawing.Size(485, 515); this.Name = "Form1"; this.Text = "Form1"; diff --git a/Form1.cs b/Form1.cs index b6b598c..b2f5a57 100644 --- a/Form1.cs +++ b/Form1.cs @@ -597,6 +597,11 @@ public void ForceResize() dataGridView1.Invalidate(); } + public void ForceTableToFit() + { + if (dataGridView1.PreferredSize.Width > dataGridView1.Size.Width) this.Size = new Size((int)((this.Width + (dataGridView1.PreferredSize.Width - dataGridView1.Size.Width)) * 1.1f), this.Height); + } + public void FullRefresh() { if (ModManager != null) @@ -661,8 +666,7 @@ private void Form1_Load(object sender, EventArgs e) ModManager.FullUpdate(); // Initial resize of the menu to fit the table if necessary - if (dataGridView1.PreferredSize.Width > dataGridView1.Size.Width) this.Size = new Size(this.Width + (dataGridView1.PreferredSize.Width - dataGridView1.Size.Width), this.Height); - + AMLUtils.InvokeUI(ForceTableToFit); AMLUtils.InvokeUI(ForceResize); AMLUtils.InvokeUI(ForceResize); } diff --git a/ModHandler.cs b/ModHandler.cs index 21df21e..a2d61dd 100644 --- a/ModHandler.cs +++ b/ModHandler.cs @@ -460,6 +460,7 @@ internal Metadata ExtractMetadataFromPath(string modPath) public void UpdateAvailableVersionsFromIndexFiles() { + Dictionary switchVersionInstructions = new Dictionary(); foreach (Mod mod in Mods) { Version latestVersion = null; @@ -474,7 +475,14 @@ public void UpdateAvailableVersionsFromIndexFiles() //if (indexMod.LatestVersion != null) latestVersion = indexMod.LatestVersion; } - if (mod.ForceLatest && latestVersion != null) BaseForm.SwitchVersionSync(mod, latestVersion); + if (mod.ForceLatest && latestVersion != null) switchVersionInstructions.Add(mod, latestVersion); + } + + AMLUtils.InvokeUI(BaseForm.TableManager.Refresh); + + foreach (KeyValuePair entry in switchVersionInstructions) + { + BaseForm.SwitchVersionSync(entry.Key, entry.Value); } } diff --git a/next_patch_notes.txt b/next_patch_notes.txt index 4528b06..bd7c46e 100644 --- a/next_patch_notes.txt +++ b/next_patch_notes.txt @@ -5,5 +5,6 @@ * Added an indicator that displays if a hash mismatch is detected with the Steam API DLL. This indicator does not affect usage of the mod loader itself. * Added more robust game and local data path correction and verification. * Fixed a bug where specific mods would fail to sync. +* Fixed a bug where the mod loader would not update to display downloadable mod versions until auto-updating is complete. * Fixed a bug where the current paths would not switch properly when the platform is changed in specific scenarios. * Fixed a bug where the mod loader would crash on switching versions in specific scenarios. \ No newline at end of file