From 273731dea146c00cec0686d4f090a431e29b0dd1 Mon Sep 17 00:00:00 2001 From: igorseabra4 Date: Wed, 13 May 2020 22:02:13 -0300 Subject: [PATCH] hotfix --- .../RenderableDynas/DynaGObjectTeleport.cs | 15 ++++++++------- IndustrialPark/MainForm/AboutBox.cs | 15 +-------------- IndustrialPark/Other/IPversion.cs | 2 +- IndustrialPark/Properties/AssemblyInfo.cs | 2 +- IndustrialPark/Resources/ip_version.json | 4 ++-- 5 files changed, 13 insertions(+), 25 deletions(-) diff --git a/IndustrialPark/Assets/DYNA/DynaTypes/RenderableDynas/DynaGObjectTeleport.cs b/IndustrialPark/Assets/DYNA/DynaTypes/RenderableDynas/DynaGObjectTeleport.cs index d9966d0e..e07ac2b5 100644 --- a/IndustrialPark/Assets/DYNA/DynaTypes/RenderableDynas/DynaGObjectTeleport.cs +++ b/IndustrialPark/Assets/DYNA/DynaTypes/RenderableDynas/DynaGObjectTeleport.cs @@ -87,13 +87,14 @@ public AssetID TargetDYNATeleportID private void ValidateMRKR() { - foreach (ArchiveEditor ae in Program.MainForm.archiveEditors) - if (ae.archive.ContainsAsset(MRKR_ID) && ae.archive.GetFromAssetID(MRKR_ID) is AssetMRKR MRKR) - { - this.MRKR = MRKR; - this.MRKR.isInvisible = true; - return; - } + if (Program.MainForm != null) + foreach (ArchiveEditor ae in Program.MainForm.archiveEditors) + if (ae.archive.ContainsAsset(MRKR_ID) && ae.archive.GetFromAssetID(MRKR_ID) is AssetMRKR MRKR) + { + this.MRKR = MRKR; + this.MRKR.isInvisible = true; + return; + } MRKR = null; } diff --git a/IndustrialPark/MainForm/AboutBox.cs b/IndustrialPark/MainForm/AboutBox.cs index ca84c762..759d1d3b 100644 --- a/IndustrialPark/MainForm/AboutBox.cs +++ b/IndustrialPark/MainForm/AboutBox.cs @@ -15,7 +15,7 @@ public AboutBox() this.labelCompanyName.Text = AssemblyCompany; ComponentResourceManager resources = new ComponentResourceManager(typeof(AboutBox)); this.textBoxDescription.Text = resources.GetString("textBoxDescription.Text"); - this.labelVersion.Text = AssemblyVersion; + this.labelVersion.Text = new IPversion().version; TopMost = true; } @@ -68,19 +68,6 @@ public string AssemblyCompany return ((AssemblyCompanyAttribute)attributes[0]).Company; } } - - public static string AssemblyVersion - { - get - { - object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyVersionAttribute), false); - if (attributes.Length == 0) - { - return ""; - } - return ((AssemblyVersionAttribute)attributes[0]).Version; - } - } #endregion private void button1_Click(object sender, EventArgs e) diff --git a/IndustrialPark/Other/IPversion.cs b/IndustrialPark/Other/IPversion.cs index 1c9b6936..bc974eae 100644 --- a/IndustrialPark/Other/IPversion.cs +++ b/IndustrialPark/Other/IPversion.cs @@ -2,7 +2,7 @@ { public class IPversion { - public string version = "0.1.4.0"; + public string version = "0.1.4.1"; public string versionName; } } diff --git a/IndustrialPark/Properties/AssemblyInfo.cs b/IndustrialPark/Properties/AssemblyInfo.cs index 450040d3..1c7261a0 100644 --- a/IndustrialPark/Properties/AssemblyInfo.cs +++ b/IndustrialPark/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ // É possível especificar todos os valores ou usar como padrão os Números de Build e da Revisão // utilizando o "*" como mostrado abaixo: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.1.4.0")] +[assembly: AssemblyVersion("0.1.4.1")] diff --git a/IndustrialPark/Resources/ip_version.json b/IndustrialPark/Resources/ip_version.json index 18323589..a6f360ca 100644 --- a/IndustrialPark/Resources/ip_version.json +++ b/IndustrialPark/Resources/ip_version.json @@ -1,4 +1,4 @@ { - "version": "0.1.4.0", - "versionName": "* Adds asset editors: DUPC, LOBM, SPLN, TPIK, TRCK (TRCK is just a copy of SIMP until we figure out more about it)\n* Enables previewing WIRE assets while selecting them.\n* Adds Incredibles and Rise of the Underminer DYNA types.\n* Adds DYNA type editors: effect_Rumble, effect_RumbleSphericalEmitter, effect:smoke_emitter, effect:spotlight, game_object:flame_emitter, game_object:IN_Pickup, game_object:RaceTimer, interaction:Launch, logic:reference, Incredibles:Icon\n* Adds Generic DYNA editor for types not supported yet.\n* Enables previewing Incredibles pickup DYNAs from the TPIK asset.\n* Improved rendering models with PIPT settings (now with per-mesh settings! no more transparent Duplotrons).\n* Slightly improved renderer.\n* Updates model importing with material settings importing.\n* Fixes loading of several Incredibles HOPs.\n* Fixes glitch on Import HIP (also Randomizer).\n* Fixes glitch on Material Effects Editor that could corrupt models.\n* Fixes glitch on Auto Updater.\n* Fixes location of Ledge Grab collision flag.\n* Adds DYNA Search Tool, under Research/Advanced." + "version": "0.1.4.1", + "versionName": "* Hotfix: fixes Randomizer crashing in some cases\n\n* Adds asset editors: DUPC, LOBM, SPLN, TPIK, TRCK (TRCK is just a copy of SIMP until we figure out more about it)\n* Enables previewing WIRE assets while selecting them.\n* Adds Incredibles and Rise of the Underminer DYNA types.\n* Adds DYNA type editors: effect_Rumble, effect_RumbleSphericalEmitter, effect:smoke_emitter, effect:spotlight, game_object:flame_emitter, game_object:IN_Pickup, game_object:RaceTimer, interaction:Launch, logic:reference, Incredibles:Icon\n* Adds Generic DYNA editor for types not supported yet.\n* Enables previewing Incredibles pickup DYNAs from the TPIK asset.\n* Improved rendering models with PIPT settings (now with per-mesh settings! no more transparent Duplotrons).\n* Slightly improved renderer.\n* Updates model importing with material settings importing.\n* Fixes loading of several Incredibles HOPs.\n* Fixes glitch on Import HIP (also Randomizer).\n* Fixes glitch on Material Effects Editor that could corrupt models.\n* Fixes glitch on Auto Updater.\n* Fixes location of Ledge Grab collision flag.\n* Adds DYNA Search Tool, under Research/Advanced." } \ No newline at end of file