From 24d6b3672e06a0dbcb5e467f034a0efebf1b7cc7 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 4 Feb 2024 17:43:37 +0100 Subject: [PATCH 01/32] debugging with default settings --- ARKBreedingStats/Form1.cs | 4 ++++ ARKBreedingStats/Form1.library.cs | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index fec1eac8..614d54b8 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -121,6 +121,10 @@ public Form1() Properties.Settings.Default.Save(); } + // #if DEBUG + // Properties.Settings.Default.Reset(); + // #endif + // the eol is changed during the loading of the settings, the \r is removed. re-add it. var namingPatterns = Properties.Settings.Default.NamingPatterns; if (namingPatterns != null) diff --git a/ARKBreedingStats/Form1.library.cs b/ARKBreedingStats/Form1.library.cs index 9fc5029a..132d056b 100644 --- a/ARKBreedingStats/Form1.library.cs +++ b/ARKBreedingStats/Form1.library.cs @@ -12,7 +12,6 @@ using System.IO; using System.Text; using System.Text.RegularExpressions; -using ARKBreedingStats.importExportGun; using ARKBreedingStats.library; using ARKBreedingStats.settings; From 4b2f34956581c37964121a1e69710e0e9db83fef Mon Sep 17 00:00:00 2001 From: cadon Date: Mon, 5 Feb 2024 21:25:12 +0100 Subject: [PATCH 02/32] fix top level calculation for analysis if no default weighting is saved --- ARKBreedingStats/library/LevelStatusFlags.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ARKBreedingStats/library/LevelStatusFlags.cs b/ARKBreedingStats/library/LevelStatusFlags.cs index a253c752..5509347e 100644 --- a/ARKBreedingStats/library/LevelStatusFlags.cs +++ b/ARKBreedingStats/library/LevelStatusFlags.cs @@ -56,10 +56,11 @@ public static void DetermineLevelStatus(Species species, int[] highSpeciesLevels var statName = Utils.StatName(s, false, species.statNames); var statNameAbb = Utils.StatName(s, true, species.statNames); - var weighting = statWeights.Item1 == null || statWeights.Item1[s] == 0 + var statWeight = statWeights.Item1?[s] ?? 1; + var weighting = statWeight == 0 ? StatWeighting.StatValuePreference.Indifferent - : statWeights.Item1[s] > 0 ? StatWeighting.StatValuePreference.High - : StatWeighting.StatValuePreference.Low; + : statWeight > 0 ? StatWeighting.StatValuePreference.High + : StatWeighting.StatValuePreference.Low; sbStatInfoText?.Append($"{statNameAbb}: {levelsWild[s]} | {levelsMutated[s]} ({valuesBreeding[s]})"); From 9c7cacc11ed3626a6bface19d4369e089f95f3ac Mon Sep 17 00:00:00 2001 From: cadon Date: Mon, 5 Feb 2024 21:38:02 +0100 Subject: [PATCH 03/32] clarified option name --- .../settings/Settings.Designer.cs | 54 +++++++++---------- ARKBreedingStats/settings/Settings.cs | 6 +-- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ARKBreedingStats/settings/Settings.Designer.cs b/ARKBreedingStats/settings/Settings.Designer.cs index 497fdd26..d8664508 100644 --- a/ARKBreedingStats/settings/Settings.Designer.cs +++ b/ARKBreedingStats/settings/Settings.Designer.cs @@ -185,6 +185,7 @@ private void InitializeComponent() this.CbbLanguage2 = new System.Windows.Forms.ComboBox(); this.CbbLanguage = new System.Windows.Forms.ComboBox(); this.groupBox9 = new System.Windows.Forms.GroupBox(); + this.CbLibraryDisplayZeroMutationLevels = new System.Windows.Forms.CheckBox(); this.CbDisplayLibraryCreatureIndex = new System.Windows.Forms.CheckBox(); this.CbNaturalSortIgnoreSpaces = new System.Windows.Forms.CheckBox(); this.CbNaturalSorting = new System.Windows.Forms.CheckBox(); @@ -211,7 +212,7 @@ private void InitializeComponent() this.CbInfoGraphicStatValues = new System.Windows.Forms.CheckBox(); this.CbInfoGraphicAddRegionNames = new System.Windows.Forms.CheckBox(); this.CbInfoGraphicCreatureName = new System.Windows.Forms.CheckBox(); - this.CbInfoGraphicMutations = new System.Windows.Forms.CheckBox(); + this.CbInfoGraphicMutationCounter = new System.Windows.Forms.CheckBox(); this.CbInfoGraphicGenerations = new System.Windows.Forms.CheckBox(); this.CbInfoGraphicDomLevels = new System.Windows.Forms.CheckBox(); this.CbInfoGraphicDisplayMaxWildLevel = new System.Windows.Forms.CheckBox(); @@ -354,7 +355,6 @@ private void InitializeComponent() this.label1 = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); this.colorDialog1 = new System.Windows.Forms.ColorDialog(); - this.CbLibraryDisplayZeroMutationLevels = new System.Windows.Forms.CheckBox(); this.groupBoxMultiplier.SuspendLayout(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudTamedDinoCharacterFoodDrain)).BeginInit(); @@ -2567,6 +2567,16 @@ private void InitializeComponent() this.groupBox9.TabStop = false; this.groupBox9.Text = "Library"; // + // CbLibraryDisplayZeroMutationLevels + // + this.CbLibraryDisplayZeroMutationLevels.AutoSize = true; + this.CbLibraryDisplayZeroMutationLevels.Location = new System.Drawing.Point(6, 203); + this.CbLibraryDisplayZeroMutationLevels.Name = "CbLibraryDisplayZeroMutationLevels"; + this.CbLibraryDisplayZeroMutationLevels.Size = new System.Drawing.Size(156, 17); + this.CbLibraryDisplayZeroMutationLevels.TabIndex = 9; + this.CbLibraryDisplayZeroMutationLevels.Text = "Display zero mutation levels"; + this.CbLibraryDisplayZeroMutationLevels.UseVisualStyleBackColor = true; + // // CbDisplayLibraryCreatureIndex // this.CbDisplayLibraryCreatureIndex.AutoSize = true; @@ -2810,7 +2820,7 @@ private void InitializeComponent() this.groupBox28.Controls.Add(this.CbInfoGraphicStatValues); this.groupBox28.Controls.Add(this.CbInfoGraphicAddRegionNames); this.groupBox28.Controls.Add(this.CbInfoGraphicCreatureName); - this.groupBox28.Controls.Add(this.CbInfoGraphicMutations); + this.groupBox28.Controls.Add(this.CbInfoGraphicMutationCounter); this.groupBox28.Controls.Add(this.CbInfoGraphicGenerations); this.groupBox28.Controls.Add(this.CbInfoGraphicDomLevels); this.groupBox28.Controls.Add(this.CbInfoGraphicDisplayMaxWildLevel); @@ -2865,16 +2875,16 @@ private void InitializeComponent() this.CbInfoGraphicCreatureName.UseVisualStyleBackColor = true; this.CbInfoGraphicCreatureName.CheckedChanged += new System.EventHandler(this.CbInfoGraphicCheckBoxChanged); // - // CbInfoGraphicMutations + // CbInfoGraphicMutationCounter // - this.CbInfoGraphicMutations.AutoSize = true; - this.CbInfoGraphicMutations.Location = new System.Drawing.Point(6, 88); - this.CbInfoGraphicMutations.Name = "CbInfoGraphicMutations"; - this.CbInfoGraphicMutations.Size = new System.Drawing.Size(71, 17); - this.CbInfoGraphicMutations.TabIndex = 5; - this.CbInfoGraphicMutations.Text = "mutations"; - this.CbInfoGraphicMutations.UseVisualStyleBackColor = true; - this.CbInfoGraphicMutations.CheckedChanged += new System.EventHandler(this.CbInfoGraphicCheckBoxChanged); + this.CbInfoGraphicMutationCounter.AutoSize = true; + this.CbInfoGraphicMutationCounter.Location = new System.Drawing.Point(6, 88); + this.CbInfoGraphicMutationCounter.Name = "CbInfoGraphicMutationCounter"; + this.CbInfoGraphicMutationCounter.Size = new System.Drawing.Size(105, 17); + this.CbInfoGraphicMutationCounter.TabIndex = 5; + this.CbInfoGraphicMutationCounter.Text = "mutation counter"; + this.CbInfoGraphicMutationCounter.UseVisualStyleBackColor = true; + this.CbInfoGraphicMutationCounter.CheckedChanged += new System.EventHandler(this.CbInfoGraphicCheckBoxChanged); // // CbInfoGraphicGenerations // @@ -3777,7 +3787,7 @@ private void InitializeComponent() this.customSCCustom.Location = new System.Drawing.Point(6, 139); this.customSCCustom.Name = "customSCCustom"; this.customSCCustom.Size = new System.Drawing.Size(401, 23); - this.customSCCustom.SoundFile = ""; + this.customSCCustom.SoundFile = null; this.customSCCustom.TabIndex = 4; // // customSCWakeup @@ -3785,7 +3795,7 @@ private void InitializeComponent() this.customSCWakeup.Location = new System.Drawing.Point(6, 81); this.customSCWakeup.Name = "customSCWakeup"; this.customSCWakeup.Size = new System.Drawing.Size(401, 23); - this.customSCWakeup.SoundFile = null; + this.customSCWakeup.SoundFile = ""; this.customSCWakeup.TabIndex = 2; // // customSCBirth @@ -3793,7 +3803,7 @@ private void InitializeComponent() this.customSCBirth.Location = new System.Drawing.Point(6, 110); this.customSCBirth.Name = "customSCBirth"; this.customSCBirth.Size = new System.Drawing.Size(401, 23); - this.customSCBirth.SoundFile = null; + this.customSCBirth.SoundFile = ""; this.customSCBirth.TabIndex = 3; // // customSCStarving @@ -3801,7 +3811,7 @@ private void InitializeComponent() this.customSCStarving.Location = new System.Drawing.Point(6, 52); this.customSCStarving.Name = "customSCStarving"; this.customSCStarving.Size = new System.Drawing.Size(401, 23); - this.customSCStarving.SoundFile = ""; + this.customSCStarving.SoundFile = null; this.customSCStarving.TabIndex = 1; // // label20 @@ -4520,16 +4530,6 @@ private void InitializeComponent() this.panel1.Size = new System.Drawing.Size(758, 30); this.panel1.TabIndex = 12; // - // CbLibraryDisplayZeroMutationLevels - // - this.CbLibraryDisplayZeroMutationLevels.AutoSize = true; - this.CbLibraryDisplayZeroMutationLevels.Location = new System.Drawing.Point(6, 203); - this.CbLibraryDisplayZeroMutationLevels.Name = "CbLibraryDisplayZeroMutationLevels"; - this.CbLibraryDisplayZeroMutationLevels.Size = new System.Drawing.Size(156, 17); - this.CbLibraryDisplayZeroMutationLevels.TabIndex = 9; - this.CbLibraryDisplayZeroMutationLevels.Text = "Display zero mutation levels"; - this.CbLibraryDisplayZeroMutationLevels.UseVisualStyleBackColor = true; - // // Settings // this.AcceptButton = this.buttonOK; @@ -4970,7 +4970,7 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox CbInfoGraphicStatValues; private System.Windows.Forms.CheckBox CbInfoGraphicAddRegionNames; private System.Windows.Forms.CheckBox CbInfoGraphicCreatureName; - private System.Windows.Forms.CheckBox CbInfoGraphicMutations; + private System.Windows.Forms.CheckBox CbInfoGraphicMutationCounter; private System.Windows.Forms.CheckBox CbInfoGraphicGenerations; private System.Windows.Forms.CheckBox CbInfoGraphicDomLevels; private System.Windows.Forms.Button BtInfoGraphicBorderColor; diff --git a/ARKBreedingStats/settings/Settings.cs b/ARKBreedingStats/settings/Settings.cs index 48034979..6778044e 100644 --- a/ARKBreedingStats/settings/Settings.cs +++ b/ARKBreedingStats/settings/Settings.cs @@ -342,7 +342,7 @@ private void LoadSettings(CreatureCollection cc) CbInfoGraphicDisplayMaxWildLevel.Checked = Properties.Settings.Default.InfoGraphicShowMaxWildLevel; CbInfoGraphicDomLevels.Checked = Properties.Settings.Default.InfoGraphicWithDomLevels; CbbInfoGraphicFontName.Text = Properties.Settings.Default.InfoGraphicFontName; - CbInfoGraphicMutations.Checked = Properties.Settings.Default.InfoGraphicDisplayMutations; + CbInfoGraphicMutationCounter.Checked = Properties.Settings.Default.InfoGraphicDisplayMutations; CbInfoGraphicGenerations.Checked = Properties.Settings.Default.InfoGraphicDisplayGeneration; CbInfoGraphicCreatureName.Checked = Properties.Settings.Default.InfoGraphicDisplayName; BtInfoGraphicBackColor.SetBackColorAndAccordingForeColor(Properties.Settings.Default.InfoGraphicBackColor); @@ -599,7 +599,7 @@ private void SaveSettings() Properties.Settings.Default.InfoGraphicShowMaxWildLevel = CbInfoGraphicDisplayMaxWildLevel.Checked; Properties.Settings.Default.InfoGraphicWithDomLevels = CbInfoGraphicDomLevels.Checked; Properties.Settings.Default.InfoGraphicFontName = CbbInfoGraphicFontName.Text; - Properties.Settings.Default.InfoGraphicDisplayMutations = CbInfoGraphicMutations.Checked; + Properties.Settings.Default.InfoGraphicDisplayMutations = CbInfoGraphicMutationCounter.Checked; Properties.Settings.Default.InfoGraphicDisplayGeneration = CbInfoGraphicGenerations.Checked; Properties.Settings.Default.InfoGraphicDisplayName = CbInfoGraphicCreatureName.Checked; Properties.Settings.Default.InfoGraphicBackColor = BtInfoGraphicBackColor.BackColor; @@ -1617,7 +1617,7 @@ private void ShowInfoGraphicPreview() BtInfoGraphicBorderColor.BackColor, CbInfoGraphicCreatureName.Checked, CbInfoGraphicDomLevels.Checked, - CbInfoGraphicMutations.Checked, + CbInfoGraphicMutationCounter.Checked, CbInfoGraphicGenerations.Checked, CbInfoGraphicStatValues.Checked, CbInfoGraphicDisplayMaxWildLevel.Checked, From 731c01547756cbd5edac884e5691d4168b55f4a4 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 10 Feb 2024 19:56:02 +0100 Subject: [PATCH 04/32] ask for game version on new library --- ARKBreedingStats/ARKBreedingStats.csproj | 3 + ARKBreedingStats/App.config | 3 + ARKBreedingStats/Ark.cs | 9 +- ARKBreedingStats/Form1.collection.cs | 26 +- .../Properties/Settings.Designer.cs | 2175 ++++++----------- ARKBreedingStats/Properties/Settings.settings | 11 +- .../settings/Settings.Designer.cs | 73 +- ARKBreedingStats/settings/Settings.cs | 16 +- .../uiControls/ArkVersionDialog.cs | 74 + ARKBreedingStats/utils/ArkInstallationPath.cs | 12 +- 10 files changed, 1010 insertions(+), 1392 deletions(-) create mode 100644 ARKBreedingStats/uiControls/ArkVersionDialog.cs diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj index 792d0881..c12aea3f 100644 --- a/ARKBreedingStats/ARKBreedingStats.csproj +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -110,6 +110,9 @@ + + Form + UserControl diff --git a/ARKBreedingStats/App.config b/ARKBreedingStats/App.config index b4c3c000..0421a5e0 100644 --- a/ARKBreedingStats/App.config +++ b/ARKBreedingStats/App.config @@ -520,6 +520,9 @@ + + 0 + diff --git a/ARKBreedingStats/Ark.cs b/ARKBreedingStats/Ark.cs index ec557a32..c774cfd3 100644 --- a/ARKBreedingStats/Ark.cs +++ b/ARKBreedingStats/Ark.cs @@ -126,14 +126,19 @@ public static class Ark public enum Game { + Unknown, /// /// ARK: Survival Evolved (2015) /// - ASE, + Ase, /// /// ARK: Survival Ascended (2023) /// - ASA + Asa, + /// + /// Use the same version that was already loaded + /// + SameAsBefore } /// diff --git a/ARKBreedingStats/Form1.collection.cs b/ARKBreedingStats/Form1.collection.cs index d2f3af6a..86f21673 100644 --- a/ARKBreedingStats/Form1.collection.cs +++ b/ARKBreedingStats/Form1.collection.cs @@ -16,7 +16,6 @@ using ARKBreedingStats.uiControls; using ARKBreedingStats.utils; using ARKBreedingStats.AsbServer; -using Newtonsoft.Json.Linq; namespace ARKBreedingStats { @@ -57,8 +56,25 @@ private void NewCollection(bool resetCollection = false) if (!Properties.Settings.Default.KeepMultipliersForNewLibrary) { - oldMultipliers = null; - asaMode = true; // default to ASA + oldMultipliers = null; // use default + } + + // ask which game version if no default is set + switch (Properties.Settings.Default.NewLibraryGame) + { + case Ark.Game.Unknown: + var gameVersionDialog = new ArkVersionDialog(this); + gameVersionDialog.ShowDialog(); + if (gameVersionDialog.UseSelectionAsDefault) + Properties.Settings.Default.NewLibraryGame = gameVersionDialog.GameVersion; + asaMode = gameVersionDialog.GameVersion == Ark.Game.Asa; + break; + case Ark.Game.Ase: + asaMode = false; + break; + case Ark.Game.Asa: + asaMode = true; + break; } if (oldMultipliers == null) @@ -77,6 +93,10 @@ private void NewCollection(bool resetCollection = false) _creatureCollection.Game = Ark.Asa; ReloadModValuesOfCollectionIfNeeded(true, false, false, false); } + else + { + UpdateAsaIndicator(); + } pedigree1.Clear(); breedingPlan1.Clear(); diff --git a/ARKBreedingStats/Properties/Settings.Designer.cs b/ARKBreedingStats/Properties/Settings.Designer.cs index 34b57f99..a998578b 100644 --- a/ARKBreedingStats/Properties/Settings.Designer.cs +++ b/ARKBreedingStats/Properties/Settings.Designer.cs @@ -8,2895 +8,2322 @@ // //------------------------------------------------------------------------------ -using ARKBreedingStats.uiControls; - -namespace ARKBreedingStats.Properties -{ - - +namespace ARKBreedingStats.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string LastSaveFile - { - get - { + public string LastSaveFile { + get { return ((string)(this["LastSaveFile"])); } - set - { + set { this["LastSaveFile"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("387")] - public int consideredStats - { - get - { + public int consideredStats { + get { return ((int)(this["consideredStats"])); } - set - { + set { this["consideredStats"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("100, 100, 1400, 1000")] - public global::System.Drawing.Rectangle MainWindowRect - { - get - { + public global::System.Drawing.Rectangle MainWindowRect { + get { return ((global::System.Drawing.Rectangle)(this["MainWindowRect"])); } - set - { + set { this["MainWindowRect"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public int[] columnWidths - { - get - { + public int[] columnWidths { + get { return ((int[])(this["columnWidths"])); } - set - { + set { this["columnWidths"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool autosave - { - get - { + public bool autosave { + get { return ((bool)(this["autosave"])); } - set - { + set { this["autosave"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("5")] - public int BackupEveryMinutes - { - get - { + public int BackupEveryMinutes { + get { return ((int)(this["BackupEveryMinutes"])); } - set - { + set { this["BackupEveryMinutes"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public double[][] customStatWeights - { - get - { + public double[][] customStatWeights { + get { return ((double[][])(this["customStatWeights"])); } - set - { + set { this["customStatWeights"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string[] customStatWeightNames - { - get - { + public string[] customStatWeightNames { + get { return ((string[])(this["customStatWeightNames"])); } - set - { + set { this["customStatWeightNames"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int listViewSortCol - { - get - { + public int listViewSortCol { + get { return ((int)(this["listViewSortCol"])); } - set - { + set { this["listViewSortCol"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool listViewSortAsc - { - get - { + public bool listViewSortAsc { + get { return ((bool)(this["listViewSortAsc"])); } - set - { + set { this["listViewSortAsc"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("2000-01-01")] - public global::System.DateTime lastUpdateCheck - { - get - { + public global::System.DateTime lastUpdateCheck { + get { return ((global::System.DateTime)(this["lastUpdateCheck"])); } - set - { + set { this["lastUpdateCheck"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool syncCollection - { - get - { + public bool syncCollection { + get { return ((bool)(this["syncCollection"])); } - set - { + set { this["syncCollection"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool celsius - { - get - { + public bool celsius { + get { return ((bool)(this["celsius"])); } - set - { + set { this["celsius"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string[] lastSpecies - { - get - { + public string[] lastSpecies { + get { return ((string[])(this["lastSpecies"])); } - set - { + set { this["lastSpecies"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool DisplayHiddenStats - { - get - { + public bool DisplayHiddenStats { + get { return ((bool)(this["DisplayHiddenStats"])); } - set - { + set { this["DisplayHiddenStats"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("ArkAscended")] - public string OCRApp - { - get - { + public string OCRApp { + get { return ((string)(this["OCRApp"])); } - set - { + set { this["OCRApp"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public double[] weaponDamages - { - get - { + public double[] weaponDamages { + get { return ((double[])(this["weaponDamages"])); } - set - { + set { this["weaponDamages"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string soundStarving - { - get - { + public string soundStarving { + get { return ((string)(this["soundStarving"])); } - set - { + set { this["soundStarving"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string soundWakeup - { - get - { + public string soundWakeup { + get { return ((string)(this["soundWakeup"])); } - set - { + set { this["soundWakeup"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string soundBirth - { - get - { + public string soundBirth { + get { return ((string)(this["soundBirth"])); } - set - { + set { this["soundBirth"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool SpeechRecognition - { - get - { + public bool SpeechRecognition { + get { return ((bool)(this["SpeechRecognition"])); } - set - { + set { this["SpeechRecognition"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("63")] - public int weaponDamagesEnabled - { - get - { + public int weaponDamagesEnabled { + get { return ((int)(this["weaponDamagesEnabled"])); } - set - { + set { this["weaponDamagesEnabled"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("10")] - public int OverlayInfoDuration - { - get - { + public int OverlayInfoDuration { + get { return ((int)(this["OverlayInfoDuration"])); } - set - { + set { this["OverlayInfoDuration"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("160")] - public byte OCRWhiteThreshold - { - get - { + public byte OCRWhiteThreshold { + get { return ((byte)(this["OCRWhiteThreshold"])); } - set - { + set { this["OCRWhiteThreshold"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ocrFile - { - get - { + public string ocrFile { + get { return ((string)(this["ocrFile"])); } - set - { + set { this["ocrFile"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("500")] - public int waitBeforeScreenCapture - { - get - { + public int waitBeforeScreenCapture { + get { return ((int)(this["waitBeforeScreenCapture"])); } - set - { + set { this["waitBeforeScreenCapture"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("{species} {sex_short}{n}")] - public string sequentialUniqueNamePattern - { - get - { + public string sequentialUniqueNamePattern { + get { return ((string)(this["sequentialUniqueNamePattern"])); } - set - { + set { this["sequentialUniqueNamePattern"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string soundCustom - { - get - { + public string soundCustom { + get { return ((string)(this["soundCustom"])); } - set - { + set { this["soundCustom"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("60,0")] - public string playAlarmTimes - { - get - { + public string playAlarmTimes { + get { return ((string)(this["playAlarmTimes"])); } - set - { + set { this["playAlarmTimes"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool inventoryCheckTimer - { - get - { + public bool inventoryCheckTimer { + get { return ((bool)(this["inventoryCheckTimer"])); } - set - { + set { this["inventoryCheckTimer"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool showColorsInLibrary - { - get - { + public bool showColorsInLibrary { + get { return ((bool)(this["showColorsInLibrary"])); } - set - { + set { this["showColorsInLibrary"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string[] arkSavegamePaths - { - get - { + public string[] arkSavegamePaths { + get { return ((string[])(this["arkSavegamePaths"])); } - set - { + set { this["arkSavegamePaths"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string savegameExtractionPath - { - get - { + public string savegameExtractionPath { + get { return ((string)(this["savegameExtractionPath"])); } - set - { + set { this["savegameExtractionPath"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("20")] - public int MutationLimitBreedingPlanner - { - get - { + public int MutationLimitBreedingPlanner { + get { return ((int)(this["MutationLimitBreedingPlanner"])); } - set - { + set { this["MutationLimitBreedingPlanner"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool DevTools - { - get - { + public bool DevTools { + get { return ((bool)(this["DevTools"])); } - set - { + set { this["DevTools"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string LastSaveFileTestCases - { - get - { + public string LastSaveFileTestCases { + get { return ((string)(this["LastSaveFileTestCases"])); } - set - { + set { this["LastSaveFileTestCases"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string[] ExportCreatureFolders - { - get - { + public string[] ExportCreatureFolders { + get { return ((string[])(this["ExportCreatureFolders"])); } - set - { + set { this["ExportCreatureFolders"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool IgnoreSexInBreedingPlan - { - get - { + public bool IgnoreSexInBreedingPlan { + get { return ((bool)(this["IgnoreSexInBreedingPlan"])); } - set - { + set { this["IgnoreSexInBreedingPlan"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string DefaultOwnerName - { - get - { + public string DefaultOwnerName { + get { return ((string)(this["DefaultOwnerName"])); } - set - { + set { this["DefaultOwnerName"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool OwnerNameLocked - { - get - { + public bool OwnerNameLocked { + get { return ((bool)(this["OwnerNameLocked"])); } - set - { + set { this["OwnerNameLocked"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string DefaultTribeName - { - get - { + public string DefaultTribeName { + get { return ((string)(this["DefaultTribeName"])); } - set - { + set { this["DefaultTribeName"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool TribeNameLocked - { - get - { + public bool TribeNameLocked { + get { return ((bool)(this["TribeNameLocked"])); } - set - { + set { this["TribeNameLocked"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ServerNameLocked - { - get - { + public bool ServerNameLocked { + get { return ((bool)(this["ServerNameLocked"])); } - set - { + set { this["ServerNameLocked"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string DefaultServerName - { - get - { + public string DefaultServerName { + get { return ((string)(this["DefaultServerName"])); } - set - { + set { this["DefaultServerName"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool showOCRButton - { - get - { + public bool showOCRButton { + get { return ((bool)(this["showOCRButton"])); } - set - { + set { this["showOCRButton"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string language - { - get - { + public string language { + get { return ((string)(this["language"])); } - set - { + set { this["language"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool UpgradeRequired - { - get - { + public bool UpgradeRequired { + get { return ((bool)(this["UpgradeRequired"])); } - set - { + set { this["UpgradeRequired"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ImportTribeNameFilter - { - get - { + public string ImportTribeNameFilter { + get { return ((string)(this["ImportTribeNameFilter"])); } - set - { + set { this["ImportTribeNameFilter"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool UseServerFilterForBreedingPlan - { - get - { + public bool UseServerFilterForBreedingPlan { + get { return ((bool)(this["UseServerFilterForBreedingPlan"])); } - set - { + set { this["UseServerFilterForBreedingPlan"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0, 0, 700, 700")] - public global::System.Drawing.Rectangle ImportExportedFormRectangle - { - get - { + public global::System.Drawing.Rectangle ImportExportedFormRectangle { + get { return ((global::System.Drawing.Rectangle)(this["ImportExportedFormRectangle"])); } - set - { + set { this["ImportExportedFormRectangle"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ApplyGlobalSpeciesToLibrary - { - get - { + public bool ApplyGlobalSpeciesToLibrary { + get { return ((bool)(this["ApplyGlobalSpeciesToLibrary"])); } - set - { + set { this["ApplyGlobalSpeciesToLibrary"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool UseOwnerFilterForBreedingPlan - { - get - { + public bool UseOwnerFilterForBreedingPlan { + get { return ((bool)(this["UseOwnerFilterForBreedingPlan"])); } - set - { + set { this["UseOwnerFilterForBreedingPlan"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool OCRIgnoresImprintValue - { - get - { + public bool OCRIgnoresImprintValue { + get { return ((bool)(this["OCRIgnoresImprintValue"])); } - set - { + set { this["OCRIgnoresImprintValue"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool IncludeCooldownsInBreedingPlan - { - get - { + public bool IncludeCooldownsInBreedingPlan { + get { return ((bool)(this["IncludeCooldownsInBreedingPlan"])); } - set - { + set { this["IncludeCooldownsInBreedingPlan"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool IncludeCryoedInBreedingPlan - { - get - { + public bool IncludeCryoedInBreedingPlan { + get { return ((bool)(this["IncludeCryoedInBreedingPlan"])); } - set - { + set { this["IncludeCryoedInBreedingPlan"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("50")] - public int WarnWhenImportingMoreCreaturesThan - { - get - { + public int WarnWhenImportingMoreCreaturesThan { + get { return ((int)(this["WarnWhenImportingMoreCreaturesThan"])); } - set - { + set { this["WarnWhenImportingMoreCreaturesThan"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string SavedFtpCredentials - { - get - { + public string SavedFtpCredentials { + get { return ((string)(this["SavedFtpCredentials"])); } - set - { + set { this["SavedFtpCredentials"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool prettifyCollectionJson - { - get - { + public bool prettifyCollectionJson { + get { return ((bool)(this["prettifyCollectionJson"])); } - set - { + set { this["prettifyCollectionJson"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool applyNamePatternOnImportIfEmptyName - { - get - { + public bool applyNamePatternOnImportIfEmptyName { + get { return ((bool)(this["applyNamePatternOnImportIfEmptyName"])); } - set - { + set { this["applyNamePatternOnImportIfEmptyName"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool copyNameToClipboardOnImportWhenAutoNameApplied - { - get - { + public bool copyNameToClipboardOnImportWhenAutoNameApplied { + get { return ((bool)(this["copyNameToClipboardOnImportWhenAutoNameApplied"])); } - set - { + set { this["copyNameToClipboardOnImportWhenAutoNameApplied"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool AutoImportExportedCreatures - { - get - { + public bool AutoImportExportedCreatures { + get { return ((bool)(this["AutoImportExportedCreatures"])); } - set - { + set { this["AutoImportExportedCreatures"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool MoveAutoImportedFileToSubFolder - { - get - { + public bool MoveAutoImportedFileToSubFolder { + get { return ((bool)(this["MoveAutoImportedFileToSubFolder"])); } - set - { + set { this["MoveAutoImportedFileToSubFolder"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool DeleteAutoImportedFile - { - get - { + public bool DeleteAutoImportedFile { + get { return ((bool)(this["DeleteAutoImportedFile"])); } - set - { + set { this["DeleteAutoImportedFile"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool PlaySoundOnAutoImport - { - get - { + public bool PlaySoundOnAutoImport { + get { return ((bool)(this["PlaySoundOnAutoImport"])); } - set - { + set { this["PlaySoundOnAutoImport"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("50, 50, 700, 700")] - public global::System.Drawing.Rectangle PatternEditorFormRectangle - { - get - { + public global::System.Drawing.Rectangle PatternEditorFormRectangle { + get { return ((global::System.Drawing.Rectangle)(this["PatternEditorFormRectangle"])); } - set - { + set { this["PatternEditorFormRectangle"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("40")] - public int PatternEditorSplitterDistance - { - get - { + public int PatternEditorSplitterDistance { + get { return ((int)(this["PatternEditorSplitterDistance"])); } - set - { + set { this["PatternEditorSplitterDistance"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] - public double ImportLowerBoundTE - { - get - { + public double ImportLowerBoundTE { + get { return ((double)(this["ImportLowerBoundTE"])); } - set - { + set { this["ImportLowerBoundTE"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool DisplayTimersInOverlayAutomatically - { - get - { + public bool DisplayTimersInOverlayAutomatically { + get { return ((bool)(this["DisplayTimersInOverlayAutomatically"])); } - set - { + set { this["DisplayTimersInOverlayAutomatically"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool DeleteExpiredTimersOnSaving - { - get - { + public bool DeleteExpiredTimersOnSaving { + get { return ((bool)(this["DeleteExpiredTimersOnSaving"])); } - set - { + set { this["DeleteExpiredTimersOnSaving"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool DisplayNonDomesticableSpecies - { - get - { + public bool DisplayNonDomesticableSpecies { + get { return ((bool)(this["DisplayNonDomesticableSpecies"])); } - set - { + set { this["DisplayNonDomesticableSpecies"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Microsoft Sans Serif")] - public string DefaultFontName - { - get - { + public string DefaultFontName { + get { return ((string)(this["DefaultFontName"])); } - set - { + set { this["DefaultFontName"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("8.25")] - public float DefaultFontSize - { - get - { + public float DefaultFontSize { + get { return ((float)(this["DefaultFontSize"])); } - set - { + set { this["DefaultFontSize"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("500")] - public int SpeciesSelectorVerticalSplitterDistance - { - get - { + public int SpeciesSelectorVerticalSplitterDistance { + get { return ((int)(this["SpeciesSelectorVerticalSplitterDistance"])); } - set - { + set { this["SpeciesSelectorVerticalSplitterDistance"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool IgnoreUnknownBlueprintsOnSaveImport - { - get - { + public bool IgnoreUnknownBlueprintsOnSaveImport { + get { return ((bool)(this["IgnoreUnknownBlueprintsOnSaveImport"])); } - set - { + set { this["IgnoreUnknownBlueprintsOnSaveImport"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public int[] libraryColumnDisplayIndices - { - get - { + public int[] libraryColumnDisplayIndices { + get { return ((int[])(this["libraryColumnDisplayIndices"])); } - set - { + set { this["libraryColumnDisplayIndices"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0, 0, 0, 0")] - public global::System.Drawing.Rectangle CustomStatOverrideFormRectangle - { - get - { + public global::System.Drawing.Rectangle CustomStatOverrideFormRectangle { + get { return ((global::System.Drawing.Rectangle)(this["CustomStatOverrideFormRectangle"])); } - set - { + set { this["CustomStatOverrideFormRectangle"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("30, 30")] - public global::System.Drawing.Point OverlayTimerPosition - { - get - { + public global::System.Drawing.Point OverlayTimerPosition { + get { return ((global::System.Drawing.Point)(this["OverlayTimerPosition"])); } - set - { + set { this["OverlayTimerPosition"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("30, 30")] - public global::System.Drawing.Point OverlayInfoPosition - { - get - { + public global::System.Drawing.Point OverlayInfoPosition { + get { return ((global::System.Drawing.Point)(this["OverlayInfoPosition"])); } - set - { + set { this["OverlayInfoPosition"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public int[] TCLVColumnDisplayIndices - { - get - { + public int[] TCLVColumnDisplayIndices { + get { return ((int[])(this["TCLVColumnDisplayIndices"])); } - set - { + set { this["TCLVColumnDisplayIndices"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public int[] TCLVColumnWidths - { - get - { + public int[] TCLVColumnWidths { + get { return ((int[])(this["TCLVColumnWidths"])); } - set - { + set { this["TCLVColumnWidths"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int TCLVSortCol - { - get - { + public int TCLVSortCol { + get { return ((int)(this["TCLVSortCol"])); } - set - { + set { this["TCLVSortCol"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool TCLVSortAsc - { - get - { + public bool TCLVSortAsc { + get { return ((bool)(this["TCLVSortAsc"])); } - set - { + set { this["TCLVSortAsc"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string[] NamingPatterns - { - get - { + public string[] NamingPatterns { + get { return ((string[])(this["NamingPatterns"])); } - set - { + set { this["NamingPatterns"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool KeepExpiredTimersInOverlay - { - get - { + public bool KeepExpiredTimersInOverlay { + get { return ((bool)(this["KeepExpiredTimersInOverlay"])); } - set - { + set { this["KeepExpiredTimersInOverlay"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool BreedingPlanOnlyBestSuggestionForEachFemale - { - get - { + public bool BreedingPlanOnlyBestSuggestionForEachFemale { + get { return ((bool)(this["BreedingPlanOnlyBestSuggestionForEachFemale"])); } - set - { + set { this["BreedingPlanOnlyBestSuggestionForEachFemale"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool BreedingPlanOnePartnerMoreMutationsThanLimit - { - get - { + public bool BreedingPlanOnePartnerMoreMutationsThanLimit { + get { return ((bool)(this["BreedingPlanOnePartnerMoreMutationsThanLimit"])); } - set - { + set { this["BreedingPlanOnePartnerMoreMutationsThanLimit"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool LibraryHighlightTopCreatures - { - get - { + public bool LibraryHighlightTopCreatures { + get { return ((bool)(this["LibraryHighlightTopCreatures"])); } - set - { + set { this["LibraryHighlightTopCreatures"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool SaveImportCryo - { - get - { + public bool SaveImportCryo { + get { return ((bool)(this["SaveImportCryo"])); } - set - { + set { this["SaveImportCryo"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool UseCustomOverlayLocation - { - get - { + public bool UseCustomOverlayLocation { + get { return ((bool)(this["UseCustomOverlayLocation"])); } - set - { + set { this["UseCustomOverlayLocation"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0, 0")] - public global::System.Drawing.Point CustomOverlayLocation - { - get - { + public global::System.Drawing.Point CustomOverlayLocation { + get { return ((global::System.Drawing.Point)(this["CustomOverlayLocation"])); } - set - { + set { this["CustomOverlayLocation"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool AdminConsoleCommandWithCheat - { - get - { + public bool AdminConsoleCommandWithCheat { + get { return ((bool)(this["AdminConsoleCommandWithCheat"])); } - set - { + set { this["AdminConsoleCommandWithCheat"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int FilterFlagsExclude - { - get - { + public int FilterFlagsExclude { + get { return ((int)(this["FilterFlagsExclude"])); } - set - { + set { this["FilterFlagsExclude"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string[] FilterHideOwners - { - get - { + public string[] FilterHideOwners { + get { return ((string[])(this["FilterHideOwners"])); } - set - { + set { this["FilterHideOwners"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string[] FilterHideTribes - { - get - { + public string[] FilterHideTribes { + get { return ((string[])(this["FilterHideTribes"])); } - set - { + set { this["FilterHideTribes"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string[] FilterHideServers - { - get - { + public string[] FilterHideServers { + get { return ((string[])(this["FilterHideServers"])); } - set - { + set { this["FilterHideServers"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string[] FilterHideTags - { - get - { + public string[] FilterHideTags { + get { return ((string[])(this["FilterHideTags"])); } - set - { + set { this["FilterHideTags"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool useFiltersInTopStatCalculation - { - get - { + public bool useFiltersInTopStatCalculation { + get { return ((bool)(this["useFiltersInTopStatCalculation"])); } - set - { + set { this["useFiltersInTopStatCalculation"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] - public byte FilterOnlyIfColorId - { - get - { + public byte FilterOnlyIfColorId { + get { return ((byte)(this["FilterOnlyIfColorId"])); } - set - { + set { this["FilterOnlyIfColorId"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("50, 50, 800, 600")] - public global::System.Drawing.Rectangle LibraryFilterWindowRect - { - get - { + public global::System.Drawing.Rectangle LibraryFilterWindowRect { + get { return ((global::System.Drawing.Rectangle)(this["LibraryFilterWindowRect"])); } - set - { + set { this["LibraryFilterWindowRect"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int FilterFlagsAllNeeded - { - get - { + public int FilterFlagsAllNeeded { + get { return ((int)(this["FilterFlagsAllNeeded"])); } - set - { + set { this["FilterFlagsAllNeeded"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int FilterFlagsOneNeeded - { - get - { + public int FilterFlagsOneNeeded { + get { return ((int)(this["FilterFlagsOneNeeded"])); } - set - { + set { this["FilterFlagsOneNeeded"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("50, 50, 800, 600")] - public global::System.Drawing.Rectangle ModManagerWindowRect - { - get - { + public global::System.Drawing.Rectangle ModManagerWindowRect { + get { return ((global::System.Drawing.Rectangle)(this["ModManagerWindowRect"])); } - set - { + set { this["ModManagerWindowRect"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("20")] - public int SpeciesSelectorCountLastSpecies - { - get - { + public int SpeciesSelectorCountLastSpecies { + get { return ((int)(this["SpeciesSelectorCountLastSpecies"])); } - set - { + set { this["SpeciesSelectorCountLastSpecies"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool applyNamePatternOnAutoImportForNewCreatures - { - get - { + public bool applyNamePatternOnAutoImportForNewCreatures { + get { return ((bool)(this["applyNamePatternOnAutoImportForNewCreatures"])); } - set - { + set { this["applyNamePatternOnAutoImportForNewCreatures"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool AlreadyAskedToDownloadSpeciesImageFiles - { - get - { + public bool AlreadyAskedToDownloadSpeciesImageFiles { + get { return ((bool)(this["AlreadyAskedToDownloadSpeciesImageFiles"])); } - set - { + set { this["AlreadyAskedToDownloadSpeciesImageFiles"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool LibrarySelectSelectedSpeciesOnLoad - { - get - { + public bool LibrarySelectSelectedSpeciesOnLoad { + get { return ((bool)(this["LibrarySelectSelectedSpeciesOnLoad"])); } - set - { + set { this["LibrarySelectSelectedSpeciesOnLoad"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ImportExportUseTamerStringForOwner - { - get - { + public bool ImportExportUseTamerStringForOwner { + get { return ((bool)(this["ImportExportUseTamerStringForOwner"])); } - set - { + set { this["ImportExportUseTamerStringForOwner"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool MainWindowMaximized - { - get - { + public bool MainWindowMaximized { + get { return ((bool)(this["MainWindowMaximized"])); } - set - { + set { this["MainWindowMaximized"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string[] DisabledVariants - { - get - { + public string[] DisabledVariants { + get { return ((string[])(this["DisabledVariants"])); } - set - { + set { this["DisabledVariants"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ImportExportedArchiveFolder - { - get - { + public string ImportExportedArchiveFolder { + get { return ((string)(this["ImportExportedArchiveFolder"])); } - set - { + set { this["ImportExportedArchiveFolder"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool DisplayInheritanceInOverlay - { - get - { + public bool DisplayInheritanceInOverlay { + get { return ((bool)(this["DisplayInheritanceInOverlay"])); } - set - { + set { this["DisplayInheritanceInOverlay"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int ColorMode - { - get - { + public int ColorMode { + get { return ((int)(this["ColorMode"])); } - set - { + set { this["ColorMode"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("180")] - public int InfoGraphicHeight - { - get - { + public int InfoGraphicHeight { + get { return ((int)(this["InfoGraphicHeight"])); } - set - { + set { this["InfoGraphicHeight"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string CustomReplacingFilePath - { - get - { + public string CustomReplacingFilePath { + get { return ((string)(this["CustomReplacingFilePath"])); } - set - { + set { this["CustomReplacingFilePath"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool applyNamePatternOnAutoImportAlways - { - get - { + public bool applyNamePatternOnAutoImportAlways { + get { return ((bool)(this["applyNamePatternOnAutoImportAlways"])); } - set - { + set { this["applyNamePatternOnAutoImportAlways"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool Highlight255Level - { - get - { + public bool Highlight255Level { + get { return ((bool)(this["Highlight255Level"])); } - set - { + set { this["Highlight255Level"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool HighlightEvenOdd - { - get - { + public bool HighlightEvenOdd { + get { return ((bool)(this["HighlightEvenOdd"])); } - set - { + set { this["HighlightEvenOdd"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string LastUsedCollectionFolder - { - get - { + public string LastUsedCollectionFolder { + get { return ((string)(this["LastUsedCollectionFolder"])); } - set - { + set { this["LastUsedCollectionFolder"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string[] LastUsedLibraryFiles - { - get - { + public string[] LastUsedLibraryFiles { + get { return ((string[])(this["LastUsedLibraryFiles"])); } - set - { + set { this["LastUsedLibraryFiles"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string InfoGraphicExportFolder - { - get - { + public string InfoGraphicExportFolder { + get { return ((string)(this["InfoGraphicExportFolder"])); } - set - { + set { this["InfoGraphicExportFolder"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InfoGraphicShowMaxWildLevel - { - get - { + public bool InfoGraphicShowMaxWildLevel { + get { return ((bool)(this["InfoGraphicShowMaxWildLevel"])); } - set - { + set { this["InfoGraphicShowMaxWildLevel"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("AntiqueWhite")] - public global::System.Drawing.Color InfoGraphicBackColor - { - get - { + public global::System.Drawing.Color InfoGraphicBackColor { + get { return ((global::System.Drawing.Color)(this["InfoGraphicBackColor"])); } - set - { + set { this["InfoGraphicBackColor"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Black")] - public global::System.Drawing.Color InfoGraphicForeColor - { - get - { + public global::System.Drawing.Color InfoGraphicForeColor { + get { return ((global::System.Drawing.Color)(this["InfoGraphicForeColor"])); } - set - { + set { this["InfoGraphicForeColor"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Arial")] - public string InfoGraphicFontName - { - get - { + public string InfoGraphicFontName { + get { return ((string)(this["InfoGraphicFontName"])); } - set - { + set { this["InfoGraphicFontName"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Maroon")] - public global::System.Drawing.Color InfoGraphicBorderColor - { - get - { + public global::System.Drawing.Color InfoGraphicBorderColor { + get { return ((global::System.Drawing.Color)(this["InfoGraphicBorderColor"])); } - set - { + set { this["InfoGraphicBorderColor"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string BackupFolder - { - get - { + public string BackupFolder { + get { return ((string)(this["BackupFolder"])); } - set - { + set { this["BackupFolder"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("3")] - public int BackupFileCount - { - get - { + public int BackupFileCount { + get { return ((int)(this["BackupFileCount"])); } - set - { + set { this["BackupFileCount"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InfoGraphicWithDomLevels - { - get - { + public bool InfoGraphicWithDomLevels { + get { return ((bool)(this["InfoGraphicWithDomLevels"])); } - set - { + set { this["InfoGraphicWithDomLevels"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool InfoGraphicDisplayMutations - { - get - { + public bool InfoGraphicDisplayMutations { + get { return ((bool)(this["InfoGraphicDisplayMutations"])); } - set - { + set { this["InfoGraphicDisplayMutations"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool InfoGraphicDisplayGeneration - { - get - { + public bool InfoGraphicDisplayGeneration { + get { return ((bool)(this["InfoGraphicDisplayGeneration"])); } - set - { + set { this["InfoGraphicDisplayGeneration"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ImgCacheUseLocalAppData - { - get - { + public bool ImgCacheUseLocalAppData { + get { return ((bool)(this["ImgCacheUseLocalAppData"])); } - set - { + set { this["ImgCacheUseLocalAppData"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("DinoExport_{arkid}_{species}.ini")] - public string AutoImportedExportFileRenamePattern - { - get - { + public string AutoImportedExportFileRenamePattern { + get { return ((string)(this["AutoImportedExportFileRenamePattern"])); } - set - { + set { this["AutoImportedExportFileRenamePattern"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool AutoImportedExportFileRename - { - get - { + public bool AutoImportedExportFileRename { + get { return ((bool)(this["AutoImportedExportFileRename"])); } - set - { + set { this["AutoImportedExportFileRename"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool AutoImportGotoLibraryAfterSuccess - { - get - { + public bool AutoImportGotoLibraryAfterSuccess { + get { return ((bool)(this["AutoImportGotoLibraryAfterSuccess"])); } - set - { + set { this["AutoImportGotoLibraryAfterSuccess"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool PauseGrowingTimerAfterAddingBaby - { - get - { + public bool PauseGrowingTimerAfterAddingBaby { + get { return ((bool)(this["PauseGrowingTimerAfterAddingBaby"])); } - set - { + set { this["PauseGrowingTimerAfterAddingBaby"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public int[] CreatureTableExportFields - { - get - { + public int[] CreatureTableExportFields { + get { return ((int[])(this["CreatureTableExportFields"])); } - set - { + set { this["CreatureTableExportFields"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string SpeciesImagesFolder - { - get - { + public string SpeciesImagesFolder { + get { return ((string)(this["SpeciesImagesFolder"])); } - set - { + set { this["SpeciesImagesFolder"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConsiderWastedStatsForTopCreatures - { - get - { + public bool ConsiderWastedStatsForTopCreatures { + get { return ((bool)(this["ConsiderWastedStatsForTopCreatures"])); } - set - { + set { this["ConsiderWastedStatsForTopCreatures"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool SaveFileImportUnclaimedBabies - { - get - { + public bool SaveFileImportUnclaimedBabies { + get { return ((bool)(this["SaveFileImportUnclaimedBabies"])); } - set - { + set { this["SaveFileImportUnclaimedBabies"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool OcrGuessSpecies - { - get - { + public bool OcrGuessSpecies { + get { return ((bool)(this["OcrGuessSpecies"])); } - set - { + set { this["OcrGuessSpecies"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int WaitBeforeAutoLoadMs - { - get - { + public int WaitBeforeAutoLoadMs { + get { return ((int)(this["WaitBeforeAutoLoadMs"])); } - set - { + set { this["WaitBeforeAutoLoadMs"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InfoGraphicDisplayName - { - get - { + public bool InfoGraphicDisplayName { + get { return ((bool)(this["InfoGraphicDisplayName"])); } - set - { + set { this["InfoGraphicDisplayName"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string[] LibraryFilterPresets - { - get - { + public string[] LibraryFilterPresets { + get { return ((string[])(this["LibraryFilterPresets"])); } - set - { + set { this["LibraryFilterPresets"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int PedigreeViewMode - { - get - { + public int PedigreeViewMode { + get { return ((int)(this["PedigreeViewMode"])); } - set - { + set { this["PedigreeViewMode"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("5")] - public int PedigreeCompactViewGenerations - { - get - { + public int PedigreeCompactViewGenerations { + get { return ((int)(this["PedigreeCompactViewGenerations"])); } - set - { + set { this["PedigreeCompactViewGenerations"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InfoGraphicExtraRegionNames - { - get - { + public bool InfoGraphicExtraRegionNames { + get { return ((bool)(this["InfoGraphicExtraRegionNames"])); } - set - { + set { this["InfoGraphicExtraRegionNames"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int PedigreeWidthLeftColum - { - get - { + public int PedigreeWidthLeftColum { + get { return ((int)(this["PedigreeWidthLeftColum"])); } - set - { + set { this["PedigreeWidthLeftColum"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public int[] PedigreeListViewColumnWidths - { - get - { + public int[] PedigreeListViewColumnWidths { + get { return ((int[])(this["PedigreeListViewColumnWidths"])); } - set - { + set { this["PedigreeListViewColumnWidths"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("1")] - public float PedigreeZoomFactor - { - get - { + public float PedigreeZoomFactor { + get { return ((float)(this["PedigreeZoomFactor"])); } - set - { + set { this["PedigreeZoomFactor"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string[] TimerPresets - { - get - { + public string[] TimerPresets { + get { return ((string[])(this["TimerPresets"])); } - set - { + set { this["TimerPresets"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool TamingFoodOrderByTime - { - get - { + public bool TamingFoodOrderByTime { + get { return ((bool)(this["TamingFoodOrderByTime"])); } - set - { + set { this["TamingFoodOrderByTime"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool InfoGraphicShowStatValues - { - get - { + public bool InfoGraphicShowStatValues { + get { return ((bool)(this["InfoGraphicShowStatValues"])); } - set - { + set { this["InfoGraphicShowStatValues"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InfoGraphicShowRegionNamesIfNoImage - { - get - { + public bool InfoGraphicShowRegionNamesIfNoImage { + get { return ((bool)(this["InfoGraphicShowRegionNamesIfNoImage"])); } - set - { + set { this["InfoGraphicShowRegionNamesIfNoImage"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int ChartHueMin - { - get - { + public int ChartHueMin { + get { return ((int)(this["ChartHueMin"])); } - set - { + set { this["ChartHueMin"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("120")] - public int ChartHueMax - { - get - { + public int ChartHueMax { + get { return ((int)(this["ChartHueMax"])); } - set - { + set { this["ChartHueMax"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("120")] - public int ChartHueEvenMin - { - get - { + public int ChartHueEvenMin { + get { return ((int)(this["ChartHueEvenMin"])); } - set - { + set { this["ChartHueEvenMin"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("200")] - public int ChartHueEvenMax - { - get - { + public int ChartHueEvenMax { + get { return ((int)(this["ChartHueEvenMax"])); } - set - { + set { this["ChartHueEvenMax"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("240")] - public int ChartHueOddMin - { - get - { + public int ChartHueOddMin { + get { return ((int)(this["ChartHueOddMin"])); } - set - { + set { this["ChartHueOddMin"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("320")] - public int ChartHueOddMax - { - get - { + public int ChartHueOddMax { + get { return ((int)(this["ChartHueOddMax"])); } - set - { + set { this["ChartHueOddMax"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool PatternNameToClipboardAfterManualApplication - { - get - { + public bool PatternNameToClipboardAfterManualApplication { + get { return ((bool)(this["PatternNameToClipboardAfterManualApplication"])); } - set - { + set { this["PatternNameToClipboardAfterManualApplication"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool OnAutoImportAddToLibrary - { - get - { + public bool OnAutoImportAddToLibrary { + get { return ((bool)(this["OnAutoImportAddToLibrary"])); } - set - { + set { this["OnAutoImportAddToLibrary"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool OCRFromClipboard - { - get - { + public bool OCRFromClipboard { + get { return ((bool)(this["OCRFromClipboard"])); } - set - { + set { this["OCRFromClipboard"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0, 0, 0, 0")] - public global::System.Drawing.Rectangle OCRFromRectangle - { - get - { + public global::System.Drawing.Rectangle OCRFromRectangle { + get { return ((global::System.Drawing.Rectangle)(this["OCRFromRectangle"])); } - set - { + set { this["OCRFromRectangle"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string RaisingFoodLastSelected - { - get - { + public string RaisingFoodLastSelected { + get { return ((string)(this["RaisingFoodLastSelected"])); } - set - { + set { this["RaisingFoodLastSelected"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool BreedingPlanDontSuggestOverLimitOffspring - { - get - { + public bool BreedingPlanDontSuggestOverLimitOffspring { + get { return ((bool)(this["BreedingPlanDontSuggestOverLimitOffspring"])); } - set - { + set { this["BreedingPlanDontSuggestOverLimitOffspring"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int PlayerListSortColumn - { - get - { + public int PlayerListSortColumn { + get { return ((int)(this["PlayerListSortColumn"])); } - set - { + set { this["PlayerListSortColumn"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool PlayerListSortAsc - { - get - { + public bool PlayerListSortAsc { + get { return ((bool)(this["PlayerListSortAsc"])); } - set - { + set { this["PlayerListSortAsc"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public int[] PlayerListColumnWidths - { - get - { + public int[] PlayerListColumnWidths { + get { return ((int[])(this["PlayerListColumnWidths"])); } - set - { + set { this["PlayerListColumnWidths"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public int[] PlayerListColumnDisplayIndices - { - get - { + public int[] PlayerListColumnDisplayIndices { + get { return ((int[])(this["PlayerListColumnDisplayIndices"])); } - set - { + set { this["PlayerListColumnDisplayIndices"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ImportExportedBringToFrontOnIssue - { - get - { + public bool ImportExportedBringToFrontOnIssue { + get { return ((bool)(this["ImportExportedBringToFrontOnIssue"])); } - set - { + set { this["ImportExportedBringToFrontOnIssue"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool HideInvisibleColorRegions - { - get - { + public bool HideInvisibleColorRegions { + get { return ((bool)(this["HideInvisibleColorRegions"])); } - set - { + set { this["HideInvisibleColorRegions"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool UseTribeFilterForBreedingPlan - { - get - { + public bool UseTribeFilterForBreedingPlan { + get { return ((bool)(this["UseTribeFilterForBreedingPlan"])); } - set - { + set { this["UseTribeFilterForBreedingPlan"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool FilterHideAdults - { - get - { + public bool FilterHideAdults { + get { return ((bool)(this["FilterHideAdults"])); } - set - { + set { this["FilterHideAdults"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool FilterHideNonAdults - { - get - { + public bool FilterHideNonAdults { + get { return ((bool)(this["FilterHideNonAdults"])); } - set - { + set { this["FilterHideNonAdults"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool FilterHideCooldowns - { - get - { + public bool FilterHideCooldowns { + get { return ((bool)(this["FilterHideCooldowns"])); } - set - { + set { this["FilterHideCooldowns"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool FilterHideNonCooldowns - { - get - { + public bool FilterHideNonCooldowns { + get { return ((bool)(this["FilterHideNonCooldowns"])); } - set - { + set { this["FilterHideNonCooldowns"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool LibraryGroupBySpecies - { - get - { + public bool LibraryGroupBySpecies { + get { return ((bool)(this["LibraryGroupBySpecies"])); } - set - { + set { this["LibraryGroupBySpecies"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool LibraryColorInfoUseFilter - { - get - { + public bool LibraryColorInfoUseFilter { + get { return ((bool)(this["LibraryColorInfoUseFilter"])); } - set - { + set { this["LibraryColorInfoUseFilter"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool UseNaturalSort - { - get - { + public bool UseNaturalSort { + get { return ((bool)(this["UseNaturalSort"])); } - set - { + set { this["UseNaturalSort"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool NaturalSortIgnoreSpaces - { - get - { + public bool NaturalSortIgnoreSpaces { + get { return ((bool)(this["NaturalSortIgnoreSpaces"])); } - set - { + set { this["NaturalSortIgnoreSpaces"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ShowColorIdOnRegionButtons - { - get - { + public bool ShowColorIdOnRegionButtons { + get { return ((bool)(this["ShowColorIdOnRegionButtons"])); } - set - { + set { this["ShowColorIdOnRegionButtons"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool AlwaysShowAllColorRegions - { - get - { + public bool AlwaysShowAllColorRegions { + get { return ((bool)(this["AlwaysShowAllColorRegions"])); } - set - { + set { this["AlwaysShowAllColorRegions"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public byte[][] CustomStatWeightOddEven - { - get - { + public byte[][] CustomStatWeightOddEven { + get { return ((byte[][])(this["CustomStatWeightOddEven"])); } - set - { + set { this["CustomStatWeightOddEven"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string language2 - { - get - { + public string language2 { + get { return ((string)(this["language2"])); } - set - { + set { this["language2"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("1")] - public float OverlayRelativeFontSize - { - get - { + public float OverlayRelativeFontSize { + get { return ((float)(this["OverlayRelativeFontSize"])); } - set - { + set { this["OverlayRelativeFontSize"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool DisplayLibraryCreatureIndex - { - get - { + public bool DisplayLibraryCreatureIndex { + get { return ((bool)(this["DisplayLibraryCreatureIndex"])); } - set - { + set { this["DisplayLibraryCreatureIndex"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool AskSaveSettingsOnClose - { - get - { + public bool AskSaveSettingsOnClose { + get { return ((bool)(this["AskSaveSettingsOnClose"])); } - set - { + set { this["AskSaveSettingsOnClose"] = value; } } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool KeepMultipliersForNewLibrary - { - get - { - return ((bool)(this["KeepMultipliersForNewLibrary"])); - } - set - { - this["KeepMultipliersForNewLibrary"] = value; - } - } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ExportServerToken - { - get - { + public string ExportServerToken { + get { return ((string)(this["ExportServerToken"])); } - set - { + set { this["ExportServerToken"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool LibraryShowMutationLevelColumns - { - get - { + public bool LibraryShowMutationLevelColumns { + get { return ((bool)(this["LibraryShowMutationLevelColumns"])); } - set - { + set { this["LibraryShowMutationLevelColumns"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool StreamerMode - { - get - { + public bool StreamerMode { + get { return ((bool)(this["StreamerMode"])); } - set - { + set { this["StreamerMode"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool LibraryDisplayZeroMutationLevels - { - get - { + public bool LibraryDisplayZeroMutationLevels { + get { return ((bool)(this["LibraryDisplayZeroMutationLevels"])); } - set - { + set { this["LibraryDisplayZeroMutationLevels"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public StatWeighting.StatValueEvenOdd[][] CustomStatWeightsOddEven - { - get - { - return ((StatWeighting.StatValueEvenOdd[][])(this["CustomStatWeightsOddEven"])); + public ARKBreedingStats.uiControls.StatWeighting.StatValueEvenOdd[][] CustomStatWeightsOddEven { + get { + return ((ARKBreedingStats.uiControls.StatWeighting.StatValueEvenOdd[][])(this["CustomStatWeightsOddEven"])); } - set - { + set { this["CustomStatWeightsOddEven"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("0")] + public global::ARKBreedingStats.Ark.Game NewLibraryGame { + get { + return ((global::ARKBreedingStats.Ark.Game)(this["NewLibraryGame"])); + } + set { + this["NewLibraryGame"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool KeepMultipliersForNewLibrary { + get { + return ((bool)(this["KeepMultipliersForNewLibrary"])); + } + set { + this["KeepMultipliersForNewLibrary"] = value; + } + } } } diff --git a/ARKBreedingStats/Properties/Settings.settings b/ARKBreedingStats/Properties/Settings.settings index 590874c7..f5261955 100644 --- a/ARKBreedingStats/Properties/Settings.settings +++ b/ARKBreedingStats/Properties/Settings.settings @@ -563,9 +563,6 @@ True - - True - @@ -578,8 +575,14 @@ False - + + + 0 + + + True + \ No newline at end of file diff --git a/ARKBreedingStats/settings/Settings.Designer.cs b/ARKBreedingStats/settings/Settings.Designer.cs index d8664508..62a0e713 100644 --- a/ARKBreedingStats/settings/Settings.Designer.cs +++ b/ARKBreedingStats/settings/Settings.Designer.cs @@ -124,6 +124,10 @@ private void InitializeComponent() this.checkBoxDisplayHiddenStats = new System.Windows.Forms.CheckBox(); this.tabControlSettings = new System.Windows.Forms.TabControl(); this.tabPageMultipliers = new System.Windows.Forms.TabPage(); + this.GbNewLibraryGame = new System.Windows.Forms.GroupBox(); + this.RbNewLibraryGameKeep = new System.Windows.Forms.RadioButton(); + this.RbNewLibraryGameAsa = new System.Windows.Forms.RadioButton(); + this.RbNewLibraryGameAse = new System.Windows.Forms.RadioButton(); this.TbRemoteServerSettingsUri = new System.Windows.Forms.TextBox(); this.BtSettingsToClipboard = new System.Windows.Forms.Button(); this.btExportMultipliers = new System.Windows.Forms.Button(); @@ -355,6 +359,7 @@ private void InitializeComponent() this.label1 = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); this.colorDialog1 = new System.Windows.Forms.ColorDialog(); + this.RbNewLibraryGameAskEachTime = new System.Windows.Forms.RadioButton(); this.groupBoxMultiplier.SuspendLayout(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudTamedDinoCharacterFoodDrain)).BeginInit(); @@ -400,6 +405,7 @@ private void InitializeComponent() this.groupBox7.SuspendLayout(); this.tabControlSettings.SuspendLayout(); this.tabPageMultipliers.SuspendLayout(); + this.GbNewLibraryGame.SuspendLayout(); this.panel3.SuspendLayout(); this.groupBox29.SuspendLayout(); this.groupBox18.SuspendLayout(); @@ -1869,6 +1875,7 @@ private void InitializeComponent() // this.tabPageMultipliers.AllowDrop = true; this.tabPageMultipliers.AutoScroll = true; + this.tabPageMultipliers.Controls.Add(this.GbNewLibraryGame); this.tabPageMultipliers.Controls.Add(this.TbRemoteServerSettingsUri); this.tabPageMultipliers.Controls.Add(this.BtSettingsToClipboard); this.tabPageMultipliers.Controls.Add(this.btExportMultipliers); @@ -1901,6 +1908,52 @@ private void InitializeComponent() this.tabPageMultipliers.DragDrop += new System.Windows.Forms.DragEventHandler(this.tabPage2_DragDrop); this.tabPageMultipliers.DragEnter += new System.Windows.Forms.DragEventHandler(this.tabPage2_DragEnter); // + // GbNewLibraryGame + // + this.GbNewLibraryGame.Controls.Add(this.RbNewLibraryGameAskEachTime); + this.GbNewLibraryGame.Controls.Add(this.RbNewLibraryGameKeep); + this.GbNewLibraryGame.Controls.Add(this.RbNewLibraryGameAsa); + this.GbNewLibraryGame.Controls.Add(this.RbNewLibraryGameAse); + this.GbNewLibraryGame.Location = new System.Drawing.Point(6, 699); + this.GbNewLibraryGame.Name = "GbNewLibraryGame"; + this.GbNewLibraryGame.Size = new System.Drawing.Size(382, 42); + this.GbNewLibraryGame.TabIndex = 21; + this.GbNewLibraryGame.TabStop = false; + this.GbNewLibraryGame.Text = "Default new library game version"; + // + // RbNewLibraryGameKeep + // + this.RbNewLibraryGameKeep.AutoSize = true; + this.RbNewLibraryGameKeep.Location = new System.Drawing.Point(123, 19); + this.RbNewLibraryGameKeep.Name = "RbNewLibraryGameKeep"; + this.RbNewLibraryGameKeep.Size = new System.Drawing.Size(87, 17); + this.RbNewLibraryGameKeep.TabIndex = 2; + this.RbNewLibraryGameKeep.TabStop = true; + this.RbNewLibraryGameKeep.Text = "Keep version"; + this.RbNewLibraryGameKeep.UseVisualStyleBackColor = true; + // + // RbNewLibraryGameAsa + // + this.RbNewLibraryGameAsa.AutoSize = true; + this.RbNewLibraryGameAsa.Location = new System.Drawing.Point(66, 19); + this.RbNewLibraryGameAsa.Name = "RbNewLibraryGameAsa"; + this.RbNewLibraryGameAsa.Size = new System.Drawing.Size(46, 17); + this.RbNewLibraryGameAsa.TabIndex = 1; + this.RbNewLibraryGameAsa.TabStop = true; + this.RbNewLibraryGameAsa.Text = "ASA"; + this.RbNewLibraryGameAsa.UseVisualStyleBackColor = true; + // + // RbNewLibraryGameAse + // + this.RbNewLibraryGameAse.AutoSize = true; + this.RbNewLibraryGameAse.Location = new System.Drawing.Point(9, 19); + this.RbNewLibraryGameAse.Name = "RbNewLibraryGameAse"; + this.RbNewLibraryGameAse.Size = new System.Drawing.Size(46, 17); + this.RbNewLibraryGameAse.TabIndex = 0; + this.RbNewLibraryGameAse.TabStop = true; + this.RbNewLibraryGameAse.Text = "ASE"; + this.RbNewLibraryGameAse.UseVisualStyleBackColor = true; + // // TbRemoteServerSettingsUri // this.TbRemoteServerSettingsUri.Location = new System.Drawing.Point(407, 659); @@ -1941,7 +1994,7 @@ private void InitializeComponent() // CbKeepMultipliersForNewLibrary // this.CbKeepMultipliersForNewLibrary.AutoSize = true; - this.CbKeepMultipliersForNewLibrary.Location = new System.Drawing.Point(6, 699); + this.CbKeepMultipliersForNewLibrary.Location = new System.Drawing.Point(6, 676); this.CbKeepMultipliersForNewLibrary.Name = "CbKeepMultipliersForNewLibrary"; this.CbKeepMultipliersForNewLibrary.Size = new System.Drawing.Size(231, 17); this.CbKeepMultipliersForNewLibrary.TabIndex = 18; @@ -4530,6 +4583,17 @@ private void InitializeComponent() this.panel1.Size = new System.Drawing.Size(758, 30); this.panel1.TabIndex = 12; // + // RbNewLibraryGameAskEachTime + // + this.RbNewLibraryGameAskEachTime.AutoSize = true; + this.RbNewLibraryGameAskEachTime.Location = new System.Drawing.Point(221, 19); + this.RbNewLibraryGameAskEachTime.Name = "RbNewLibraryGameAskEachTime"; + this.RbNewLibraryGameAskEachTime.Size = new System.Drawing.Size(92, 17); + this.RbNewLibraryGameAskEachTime.TabIndex = 3; + this.RbNewLibraryGameAskEachTime.TabStop = true; + this.RbNewLibraryGameAskEachTime.Text = "Ask each time"; + this.RbNewLibraryGameAskEachTime.UseVisualStyleBackColor = true; + // // Settings // this.AcceptButton = this.buttonOK; @@ -4599,6 +4663,8 @@ private void InitializeComponent() this.tabControlSettings.ResumeLayout(false); this.tabPageMultipliers.ResumeLayout(false); this.tabPageMultipliers.PerformLayout(); + this.GbNewLibraryGame.ResumeLayout(false); + this.GbNewLibraryGame.PerformLayout(); this.panel3.ResumeLayout(false); this.panel3.PerformLayout(); this.groupBox29.ResumeLayout(false); @@ -5022,5 +5088,10 @@ private void InitializeComponent() private System.Windows.Forms.Button BtBeepUpdated; private System.Windows.Forms.CheckBox CbStreamerMode; private System.Windows.Forms.CheckBox CbLibraryDisplayZeroMutationLevels; + private System.Windows.Forms.GroupBox GbNewLibraryGame; + private System.Windows.Forms.RadioButton RbNewLibraryGameKeep; + private System.Windows.Forms.RadioButton RbNewLibraryGameAsa; + private System.Windows.Forms.RadioButton RbNewLibraryGameAse; + private System.Windows.Forms.RadioButton RbNewLibraryGameAskEachTime; } } \ No newline at end of file diff --git a/ARKBreedingStats/settings/Settings.cs b/ARKBreedingStats/settings/Settings.cs index 6778044e..55958b43 100644 --- a/ARKBreedingStats/settings/Settings.cs +++ b/ARKBreedingStats/settings/Settings.cs @@ -224,6 +224,14 @@ private void LoadSettings(CreatureCollection cc) CbAllowSpeedLeveling.Visible = false; } + switch (Properties.Settings.Default.NewLibraryGame) + { + case Ark.Game.Ase: RbNewLibraryGameAse.Checked = true; break; + case Ark.Game.Asa: RbNewLibraryGameAsa.Checked = true; break; + case Ark.Game.SameAsBefore: RbNewLibraryGameKeep.Checked = true; break; + default: RbNewLibraryGameAskEachTime.Checked = true; break; + } + nudMaxDomLevels.ValueSave = cc.maxDomLevel; numericUpDownMaxBreedingSug.ValueSave = cc.maxBreedingSuggestions; nudMaxWildLevels.ValueSave = cc.maxWildLevel; @@ -491,6 +499,10 @@ private void SaveSettings() _cc.singlePlayerSettings = cbSingleplayerSettings.Checked; _cc.AtlasSettings = CbAtlasSettings.Checked; _cc.Game = RbGameAsa.Checked ? Ark.Asa : Ark.Ase; + Properties.Settings.Default.NewLibraryGame = RbNewLibraryGameAse.Checked ? Ark.Game.Ase + : RbNewLibraryGameAsa.Checked ? Ark.Game.Asa + : RbNewLibraryGameKeep.Checked ? Ark.Game.SameAsBefore + : Ark.Game.Unknown; _cc.maxDomLevel = (int)nudMaxDomLevels.Value; _cc.maxWildLevel = (int)nudMaxWildLevels.Value; @@ -1702,7 +1714,7 @@ private void BtAutoImportLocalSettings_Click(object sender, EventArgs e) return; } - localConfigPaths = localConfigPaths.OrderBy(c => c.Item2 == Ark.Game.ASE).ToArray(); // display ASA first + localConfigPaths = localConfigPaths.OrderBy(c => c.Item2 == Ark.Game.Ase).ToArray(); // display ASA first // ask which configs to import var importIndex = Utils.ShowListInput(localConfigPaths.Select(c => $"{c.Item2}: {c.Item1.Replace("\\", "\\ ")}").ToArray(), // adding zero width spaces to allow word wrapping @@ -1712,7 +1724,7 @@ private void BtAutoImportLocalSettings_Click(object sender, EventArgs e) ExtractSettingsFromFile(Path.Combine(localConfigPaths[importIndex].Item1, "game.ini"), true); ExtractSettingsFromFile(Path.Combine(localConfigPaths[importIndex].Item1, "gameUserSettings.ini"), true); - if (localConfigPaths[importIndex].Item2 == Ark.Game.ASA) RbGameAsa.Checked = true; + if (localConfigPaths[importIndex].Item2 == Ark.Game.Asa) RbGameAsa.Checked = true; else RbGameAse.Checked = true; } diff --git a/ARKBreedingStats/uiControls/ArkVersionDialog.cs b/ARKBreedingStats/uiControls/ArkVersionDialog.cs new file mode 100644 index 00000000..f0153b3c --- /dev/null +++ b/ARKBreedingStats/uiControls/ArkVersionDialog.cs @@ -0,0 +1,74 @@ +using System.Drawing; +using System.Windows.Forms; + +namespace ARKBreedingStats.uiControls +{ + internal class ArkVersionDialog : Form + { + public Ark.Game GameVersion; + public bool UseSelectionAsDefault => _cbUseAsDefault?.Checked != false; + private CheckBox _cbUseAsDefault; + + public ArkVersionDialog() + { + StartPosition = FormStartPosition.CenterParent; + Text = Utils.ApplicationNameVersion; + FormBorderStyle = FormBorderStyle.FixedToolWindow; + + const int margin = 20; + const int buttonWidth = 160; + const int buttonHeight = 50; + + Width = 3 * margin + 2 * buttonWidth + 15; + Height = 5 * margin + buttonHeight + 30; + + var lb = new Label + { + Text = "Game version of new library", + Width = Width, + TextAlign = ContentAlignment.TopCenter, + Top = margin + }; + + var btAse = new Button + { + Text = "ARK: Survival Evolved", + Width = buttonWidth, + Height = buttonHeight, + Top = 2 * margin, + Left = margin + }; + var btAsa = new Button + { + Text = "ARK: Survival Ascended", + Width = buttonWidth, + Height = buttonHeight, + Top = 2 * margin, + Left = 2 * margin + buttonWidth + }; + btAse.Click += (s, e) => Close(Ark.Game.Ase); + btAsa.Click += (s, e) => Close(Ark.Game.Asa); + + _cbUseAsDefault = new CheckBox + { + Text = "Remember selection (can be changed in the settings)", + AutoSize = true, + Left = margin, + Top = 3 * margin + buttonHeight + }; + + Controls.AddRange(new Control[] { btAse, btAsa, _cbUseAsDefault, lb }); + } + + public ArkVersionDialog(Form owner) : this() + { + Owner = owner; + } + + private void Close(Ark.Game arkGame) + { + GameVersion = arkGame; + Close(); + } + } +} diff --git a/ARKBreedingStats/utils/ArkInstallationPath.cs b/ARKBreedingStats/utils/ArkInstallationPath.cs index d78b2250..e01a2b58 100644 --- a/ARKBreedingStats/utils/ArkInstallationPath.cs +++ b/ARKBreedingStats/utils/ArkInstallationPath.cs @@ -52,7 +52,7 @@ private static bool ExtractSteamExportLocations(out (string path, string launche { foreach (var steamNameId in steamNamesIds) exportFolders[i++] = ( - arkPath.Game == Ark.Game.ASE + arkPath.Game == Ark.Game.Ase ? Path.Combine(arkPath.Path, relativeExportFolder, steamNameId.steamPlayerId) : Path.Combine(arkPath.Path, relativeExportFolder), // ASA doesn't use steam id as subfolder $"{steamNameId.steamPlayerName} ({arkPath.Game})" @@ -95,11 +95,11 @@ public static bool GetSteamLibraryArkInstallationFolders(out (string Path, Ark.G var relativeAsaPath = Path.Combine("steamapps", "common", "ARK Survival Ascended"); var possibleArkPaths = new List<(string Path, Ark.Game Game)> { - (Path.Combine(steamPath, relativeAsePath), Ark.Game.ASE), - (Path.Combine(steamPath, relativeAsaPath), Ark.Game.ASA) + (Path.Combine(steamPath, relativeAsePath), Ark.Game.Ase), + (Path.Combine(steamPath, relativeAsaPath), Ark.Game.Asa) }; // use steam folder as default - possibleArkPaths.AddRange(arkInstallFolders.Select(f => (Path.Combine(f, relativeAsePath), Ase: Ark.Game.ASE))); - possibleArkPaths.AddRange(arkInstallFolders.Select(f => (Path.Combine(f, relativeAsaPath), Asa: Ark.Game.ASA))); + possibleArkPaths.AddRange(arkInstallFolders.Select(f => (Path.Combine(f, relativeAsePath), Ase: Ark.Game.Ase))); + possibleArkPaths.AddRange(arkInstallFolders.Select(f => (Path.Combine(f, relativeAsaPath), Asa: Ark.Game.Asa))); existingArkPaths = possibleArkPaths.Distinct().Where(p => Directory.Exists(p.Path)).ToArray(); @@ -307,7 +307,7 @@ public static bool GetLocalArkConfigPaths(out (string, Ark.Game)[] localConfigPa foreach (var arkPath in existingArkPaths) { localConfigPaths[i++] = ( - arkPath.Game == Ark.Game.ASE + arkPath.Game == Ark.Game.Ase ? Path.Combine(arkPath.Path, relativeLocalConfigPathAse) : Path.Combine(arkPath.Path, relativeLocalConfigPathAsa), arkPath.Game From 1e080196f3fc0b998ae25f74e778524cc791a3ec Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 10 Feb 2024 21:35:30 +0100 Subject: [PATCH 05/32] increased max value of multiplier inputs to 2G --- .../StatMultiplierTestingControl.Designer.cs | 37 +++++++++++++------ .../settings/MultiplierSetting.Designer.cs | 8 ++-- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs index 9322a01f..339ba643 100644 --- a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs +++ b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs @@ -447,7 +447,7 @@ private void InitializeComponent() 131072}); this.nudIdM.Location = new System.Drawing.Point(813, 3); this.nudIdM.Maximum = new decimal(new int[] { - 1000000, + 2000000000, 0, 0, 0}); @@ -471,6 +471,11 @@ private void InitializeComponent() 0, 131072}); this.nudId.Location = new System.Drawing.Point(749, 3); + this.nudId.Maximum = new decimal(new int[] { + 2000000000, + 0, + 0, + 0}); this.nudId.Name = "nudId"; this.nudId.NeutralNumber = new decimal(new int[] { 0, @@ -492,7 +497,7 @@ private void InitializeComponent() 131072}); this.nudTmM.Location = new System.Drawing.Point(627, 3); this.nudTmM.Maximum = new decimal(new int[] { - 1000000, + 2000000000, 0, 0, 0}); @@ -521,8 +526,13 @@ private void InitializeComponent() 0, 131072}); this.nudTm.Location = new System.Drawing.Point(563, 3); + this.nudTm.Maximum = new decimal(new int[] { + 2000000000, + 0, + 0, + 0}); this.nudTm.Minimum = new decimal(new int[] { - 100, + 2000000000, 0, 0, -2147483648}); @@ -547,7 +557,7 @@ private void InitializeComponent() 131072}); this.nudIwM.Location = new System.Drawing.Point(307, 3); this.nudIwM.Maximum = new decimal(new int[] { - 1000000, + 2000000000, 0, 0, 0}); @@ -577,7 +587,7 @@ private void InitializeComponent() 131072}); this.nudTaM.Location = new System.Drawing.Point(499, 3); this.nudTaM.Maximum = new decimal(new int[] { - 1000000, + 2000000000, 0, 0, 0}); @@ -607,12 +617,12 @@ private void InitializeComponent() 65536}); this.nudTa.Location = new System.Drawing.Point(435, 3); this.nudTa.Maximum = new decimal(new int[] { - 1000000, + 2000000000, 0, 0, 0}); this.nudTa.Minimum = new decimal(new int[] { - 1000000, + 2000000000, 0, 0, -2147483648}); @@ -636,6 +646,11 @@ private void InitializeComponent() 0, 131072}); this.nudTBHM.Location = new System.Drawing.Point(371, 3); + this.nudTBHM.Maximum = new decimal(new int[] { + 2000000000, + 0, + 0, + 0}); this.nudTBHM.Name = "nudTBHM"; this.nudTBHM.NeutralNumber = new decimal(new int[] { 0, @@ -662,7 +677,7 @@ private void InitializeComponent() 131072}); this.nudIw.Location = new System.Drawing.Point(243, 3); this.nudIw.Maximum = new decimal(new int[] { - 1000000, + 2000000000, 0, 0, 0}); @@ -682,7 +697,7 @@ private void InitializeComponent() this.nudB.ForeColor = System.Drawing.SystemColors.GrayText; this.nudB.Location = new System.Drawing.Point(80, 3); this.nudB.Maximum = new decimal(new int[] { - 1000000, + 2000000000, 0, 0, 0}); @@ -723,7 +738,7 @@ private void InitializeComponent() this.nudLd.ForeColor = System.Drawing.SystemColors.GrayText; this.nudLd.Location = new System.Drawing.Point(691, 3); this.nudLd.Maximum = new decimal(new int[] { - 10000, + 2000000000, 0, 0, 0}); @@ -742,7 +757,7 @@ private void InitializeComponent() this.nudLw.ForeColor = System.Drawing.SystemColors.GrayText; this.nudLw.Location = new System.Drawing.Point(185, 3); this.nudLw.Maximum = new decimal(new int[] { - 10000, + 2000000000, 0, 0, 0}); diff --git a/ARKBreedingStats/settings/MultiplierSetting.Designer.cs b/ARKBreedingStats/settings/MultiplierSetting.Designer.cs index e699f76c..15e480fa 100644 --- a/ARKBreedingStats/settings/MultiplierSetting.Designer.cs +++ b/ARKBreedingStats/settings/MultiplierSetting.Designer.cs @@ -50,7 +50,7 @@ private void InitializeComponent() 65536}); this.nudWildLevel.Location = new System.Drawing.Point(133, 3); this.nudWildLevel.Maximum = new decimal(new int[] { - 1000000, + 2000000000, 0, 0, 0}); @@ -79,7 +79,7 @@ private void InitializeComponent() 65536}); this.nudTameMult.Location = new System.Drawing.Point(313, 3); this.nudTameMult.Maximum = new decimal(new int[] { - 1000000, + 2000000000, 0, 0, 0}); @@ -108,7 +108,7 @@ private void InitializeComponent() 65536}); this.nudTameAdd.Location = new System.Drawing.Point(253, 3); this.nudTameAdd.Maximum = new decimal(new int[] { - 1000000, + 2000000000, 0, 0, 0}); @@ -137,7 +137,7 @@ private void InitializeComponent() 65536}); this.nudDomLevel.Location = new System.Drawing.Point(193, 3); this.nudDomLevel.Maximum = new decimal(new int[] { - 1000000, + 2000000000, 0, 0, 0}); From e89e813aeb82e587d5c44cd45bd6ec806a21393d Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 11 Feb 2024 18:41:25 +0100 Subject: [PATCH 06/32] library color checker wip --- ARKBreedingStats/ARKBreedingStats.csproj | 24 ++- ARKBreedingStats/Form1.Designer.cs | 59 ++++-- ARKBreedingStats/Form1.cs | 9 +- ...gner.cs => ColorPickerControl.Designer.cs} | 36 ++-- ...MyColorPicker.cs => ColorPickerControl.cs} | 101 +++++----- ...lorPicker.resx => ColorPickerControl.resx} | 0 .../uiControls/ColorPickerWindow.Designer.cs | 61 ++++++ .../uiControls/ColorPickerWindow.cs | 49 +++++ .../uiControls/ColorPickerWindow.resx | 120 ++++++++++++ ARKBreedingStats/uiControls/LibraryFilter.cs | 8 +- ARKBreedingStats/uiControls/LibraryInfo.cs | 6 +- .../uiControls/LibraryInfoControl.cs | 176 ++++++++++++++++++ ARKBreedingStats/uiControls/MultiSetter.cs | 6 +- .../uiControls/RegionColorChooser.cs | 12 +- 14 files changed, 561 insertions(+), 106 deletions(-) rename ARKBreedingStats/uiControls/{MyColorPicker.Designer.cs => ColorPickerControl.Designer.cs} (90%) rename ARKBreedingStats/uiControls/{MyColorPicker.cs => ColorPickerControl.cs} (76%) rename ARKBreedingStats/uiControls/{MyColorPicker.resx => ColorPickerControl.resx} (100%) create mode 100644 ARKBreedingStats/uiControls/ColorPickerWindow.Designer.cs create mode 100644 ARKBreedingStats/uiControls/ColorPickerWindow.cs create mode 100644 ARKBreedingStats/uiControls/ColorPickerWindow.resx create mode 100644 ARKBreedingStats/uiControls/LibraryInfoControl.cs diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj index c12aea3f..be0bb42b 100644 --- a/ARKBreedingStats/ARKBreedingStats.csproj +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -113,6 +113,12 @@ Form + + Form + + + ColorPickerWindow.cs + UserControl @@ -135,6 +141,9 @@ Component + + UserControl + Form @@ -521,11 +530,11 @@ MultiSetter.cs - - Form + + UserControl - - MyColorPicker.cs + + ColorPickerControl.cs Component @@ -705,6 +714,9 @@ RecognitionTrainingForm.cs + + ColorPickerWindow.cs + CreatureAnalysis.cs @@ -931,8 +943,8 @@ MultiSetter.cs - - MyColorPicker.cs + + ColorPickerControl.cs PedigreeControl.cs diff --git a/ARKBreedingStats/Form1.Designer.cs b/ARKBreedingStats/Form1.Designer.cs index e9711117..48f89082 100644 --- a/ARKBreedingStats/Form1.Designer.cs +++ b/ARKBreedingStats/Form1.Designer.cs @@ -136,6 +136,7 @@ private void InitializeComponent() this.helpAboutSpeciesSortingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.serverToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.listenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.currentTokenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.listenWithNewTokenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.sendExampleCreatureToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -310,8 +311,10 @@ private void InitializeComponent() this.creatureBoxListView = new ARKBreedingStats.CreatureBox(); this.tabPageLibraryInfo = new System.Windows.Forms.TabPage(); this.tlpLibraryInfo = new System.Windows.Forms.TableLayoutPanel(); + this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.CbLibraryInfoUseFilter = new System.Windows.Forms.CheckBox(); this.BtCopyLibraryColorToClipboard = new System.Windows.Forms.Button(); + this.libraryInfoControl1 = new ARKBreedingStats.uiControls.LibraryInfoControl(); this.tabPagePedigree = new System.Windows.Forms.TabPage(); this.pedigree1 = new ARKBreedingStats.Pedigree.PedigreeControl(); this.tabPageTaming = new System.Windows.Forms.TabPage(); @@ -385,7 +388,6 @@ private void InitializeComponent() this.toolStripSeparator27 = new System.Windows.Forms.ToolStripSeparator(); this.resetColumnOrderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.speciesSelector1 = new ARKBreedingStats.SpeciesSelector(); - this.currentTokenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).BeginInit(); @@ -431,6 +433,7 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).BeginInit(); this.tabPageLibraryInfo.SuspendLayout(); this.tlpLibraryInfo.SuspendLayout(); + this.tableLayoutPanel3.SuspendLayout(); this.tabPagePedigree.SuspendLayout(); this.tabPageTaming.SuspendLayout(); this.tabPageBreedingPlan.SuspendLayout(); @@ -1358,6 +1361,13 @@ private void InitializeComponent() this.listenToolStripMenuItem.Text = "Listen"; this.listenToolStripMenuItem.CheckedChanged += new System.EventHandler(this.listenToolStripMenuItem_CheckedChanged); // + // currentTokenToolStripMenuItem + // + this.currentTokenToolStripMenuItem.Name = "currentTokenToolStripMenuItem"; + this.currentTokenToolStripMenuItem.Size = new System.Drawing.Size(194, 22); + this.currentTokenToolStripMenuItem.Text = "Current token"; + this.currentTokenToolStripMenuItem.Click += new System.EventHandler(this.currentTokenToolStripMenuItem_Click); + // // listenWithNewTokenToolStripMenuItem // this.listenWithNewTokenToolStripMenuItem.Name = "listenWithNewTokenToolStripMenuItem"; @@ -3017,19 +3027,34 @@ private void InitializeComponent() // tlpLibraryInfo // this.tlpLibraryInfo.AutoScroll = true; - this.tlpLibraryInfo.ColumnCount = 2; - this.tlpLibraryInfo.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tlpLibraryInfo.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tlpLibraryInfo.Controls.Add(this.CbLibraryInfoUseFilter, 1, 0); - this.tlpLibraryInfo.Controls.Add(this.BtCopyLibraryColorToClipboard, 0, 0); + this.tlpLibraryInfo.ColumnCount = 1; + this.tlpLibraryInfo.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tlpLibraryInfo.Controls.Add(this.tableLayoutPanel3, 0, 0); + this.tlpLibraryInfo.Controls.Add(this.libraryInfoControl1, 0, 1); this.tlpLibraryInfo.Dock = System.Windows.Forms.DockStyle.Fill; this.tlpLibraryInfo.Location = new System.Drawing.Point(3, 3); this.tlpLibraryInfo.Name = "tlpLibraryInfo"; - this.tlpLibraryInfo.RowCount = 1; + this.tlpLibraryInfo.RowCount = 2; this.tlpLibraryInfo.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tlpLibraryInfo.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tlpLibraryInfo.Size = new System.Drawing.Size(1864, 778); this.tlpLibraryInfo.TabIndex = 0; // + // tableLayoutPanel3 + // + this.tableLayoutPanel3.ColumnCount = 2; + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel3.Controls.Add(this.CbLibraryInfoUseFilter, 1, 0); + this.tableLayoutPanel3.Controls.Add(this.BtCopyLibraryColorToClipboard, 0, 0); + this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel3.Location = new System.Drawing.Point(3, 3); + this.tableLayoutPanel3.Name = "tableLayoutPanel3"; + this.tableLayoutPanel3.RowCount = 1; + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel3.Size = new System.Drawing.Size(1858, 30); + this.tableLayoutPanel3.TabIndex = 2; + // // CbLibraryInfoUseFilter // this.CbLibraryInfoUseFilter.AutoSize = true; @@ -3051,6 +3076,14 @@ private void InitializeComponent() this.BtCopyLibraryColorToClipboard.UseVisualStyleBackColor = true; this.BtCopyLibraryColorToClipboard.Click += new System.EventHandler(this.BtCopyLibraryColorToClipboard_Click); // + // libraryInfoControl1 + // + this.libraryInfoControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.libraryInfoControl1.Location = new System.Drawing.Point(3, 39); + this.libraryInfoControl1.Name = "libraryInfoControl1"; + this.libraryInfoControl1.Size = new System.Drawing.Size(1858, 736); + this.libraryInfoControl1.TabIndex = 3; + // // tabPagePedigree // this.tabPagePedigree.Controls.Add(this.pedigree1); @@ -3783,13 +3816,6 @@ private void InitializeComponent() this.speciesSelector1.SplitterDistance = 500; this.speciesSelector1.TabIndex = 0; // - // currentTokenToolStripMenuItem - // - this.currentTokenToolStripMenuItem.Name = "currentTokenToolStripMenuItem"; - this.currentTokenToolStripMenuItem.Size = new System.Drawing.Size(194, 22); - this.currentTokenToolStripMenuItem.Text = "Current token"; - this.currentTokenToolStripMenuItem.Click += new System.EventHandler(this.currentTokenToolStripMenuItem_Click); - // // Form1 // this.AcceptButton = this.btExtractLevels; @@ -3874,7 +3900,8 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).EndInit(); this.tabPageLibraryInfo.ResumeLayout(false); this.tlpLibraryInfo.ResumeLayout(false); - this.tlpLibraryInfo.PerformLayout(); + this.tableLayoutPanel3.ResumeLayout(false); + this.tableLayoutPanel3.PerformLayout(); this.tabPagePedigree.ResumeLayout(false); this.tabPageTaming.ResumeLayout(false); this.tabPageBreedingPlan.ResumeLayout(false); @@ -4251,5 +4278,7 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox CbLinkWildMutatedLevelsTester; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemMutationColumns; private System.Windows.Forms.ToolStripMenuItem currentTokenToolStripMenuItem; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; + private uiControls.LibraryInfoControl libraryInfoControl1; } } diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 614d54b8..c47943e9 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -731,7 +731,8 @@ private void SpeciesSelector1OnSpeciesSelected(bool speciesChanged) } else if (tabControlMain.SelectedTab == tabPageLibraryInfo) { - LibraryInfo.SetColorInfo(speciesSelector1.SelectedSpecies, CbLibraryInfoUseFilter.Checked ? (IList)ApplyLibraryFilterSettings(_creatureCollection.creatures).ToArray() : _creatureCollection.creatures, CbLibraryInfoUseFilter.Checked, tlpLibraryInfo); + libraryInfoControl1.SetSpecies(speciesSelector1.SelectedSpecies); + LibraryInfo.SetColorInfo(speciesSelector1.SelectedSpecies, CbLibraryInfoUseFilter.Checked ? (IList)ApplyLibraryFilterSettings(_creatureCollection.creatures).ToArray() : _creatureCollection.creatures, CbLibraryInfoUseFilter.Checked, libraryInfoControl1.TlpColorInfoText); } else if (tabControlMain.SelectedTab == tabPagePedigree) { @@ -1631,7 +1632,8 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) } else if (tabControlMain.SelectedTab == tabPageLibraryInfo) { - LibraryInfo.SetColorInfo(speciesSelector1.SelectedSpecies, CbLibraryInfoUseFilter.Checked ? (IList)ApplyLibraryFilterSettings(_creatureCollection.creatures).ToArray() : _creatureCollection.creatures, CbLibraryInfoUseFilter.Checked, tlpLibraryInfo); + libraryInfoControl1.SetSpecies(speciesSelector1.SelectedSpecies); + LibraryInfo.SetColorInfo(speciesSelector1.SelectedSpecies, CbLibraryInfoUseFilter.Checked ? (IList)ApplyLibraryFilterSettings(_creatureCollection.creatures).ToArray() : _creatureCollection.creatures, CbLibraryInfoUseFilter.Checked, libraryInfoControl1.TlpColorInfoText); } else if (tabControlMain.SelectedTab == tabPagePedigree) { @@ -3873,6 +3875,7 @@ private void colorDefinitionsToClipboardToolStripMenuItem_Click(object sender, E private void BtCopyLibraryColorToClipboard_Click(object sender, EventArgs e) { + libraryInfoControl1.SetSpecies(speciesSelector1.SelectedSpecies); LibraryInfo.SetColorInfo(speciesSelector1.SelectedSpecies, CbLibraryInfoUseFilter.Checked ? (IList)ApplyLibraryFilterSettings(_creatureCollection.creatures).ToArray() : _creatureCollection.creatures, CbLibraryInfoUseFilter.Checked); var colorInfo = LibraryInfo.GetSpeciesInfo(); Clipboard.SetText(string.IsNullOrEmpty(colorInfo) ? $"no color info available for species {speciesSelector1.SelectedSpecies}" : colorInfo); @@ -3881,7 +3884,7 @@ private void BtCopyLibraryColorToClipboard_Click(object sender, EventArgs e) private void CbLibraryInfoUseFilter_CheckedChanged(object sender, EventArgs e) { - LibraryInfo.SetColorInfo(speciesSelector1.SelectedSpecies, CbLibraryInfoUseFilter.Checked ? (IList)ApplyLibraryFilterSettings(_creatureCollection.creatures).ToArray() : _creatureCollection.creatures, CbLibraryInfoUseFilter.Checked, tlpLibraryInfo); + LibraryInfo.SetColorInfo(speciesSelector1.SelectedSpecies, CbLibraryInfoUseFilter.Checked ? (IList)ApplyLibraryFilterSettings(_creatureCollection.creatures).ToArray() : _creatureCollection.creatures, CbLibraryInfoUseFilter.Checked, libraryInfoControl1.TlpColorInfoText); } private void discordServerToolStripMenuItem_Click(object sender, EventArgs e) diff --git a/ARKBreedingStats/uiControls/MyColorPicker.Designer.cs b/ARKBreedingStats/uiControls/ColorPickerControl.Designer.cs similarity index 90% rename from ARKBreedingStats/uiControls/MyColorPicker.Designer.cs rename to ARKBreedingStats/uiControls/ColorPickerControl.Designer.cs index 385aa4ed..5205aca1 100644 --- a/ARKBreedingStats/uiControls/MyColorPicker.Designer.cs +++ b/ARKBreedingStats/uiControls/ColorPickerControl.Designer.cs @@ -1,6 +1,6 @@ namespace ARKBreedingStats.uiControls { - partial class MyColorPicker + partial class ColorPickerControl { /// /// Required designer variable. @@ -45,7 +45,7 @@ private void InitializeComponent() this.checkBoxOnlyNatural.AutoSize = true; this.checkBoxOnlyNatural.Checked = true; this.checkBoxOnlyNatural.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxOnlyNatural.Location = new System.Drawing.Point(4, 391); + this.checkBoxOnlyNatural.Location = new System.Drawing.Point(3, 392); this.checkBoxOnlyNatural.Name = "checkBoxOnlyNatural"; this.checkBoxOnlyNatural.Size = new System.Drawing.Size(154, 17); this.checkBoxOnlyNatural.TabIndex = 2; @@ -58,9 +58,9 @@ private void InitializeComponent() this.tableLayoutPanel1.SetColumnSpan(this.label1, 4); this.label1.Dock = System.Windows.Forms.DockStyle.Fill; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.Location = new System.Drawing.Point(4, 1); + this.label1.Location = new System.Drawing.Point(3, 0); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(440, 30); + this.label1.Size = new System.Drawing.Size(442, 30); this.label1.TabIndex = 1; this.label1.Text = "title"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -69,28 +69,27 @@ private void InitializeComponent() // this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(369, 385); + this.buttonCancel.Location = new System.Drawing.Point(370, 386); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.TabIndex = 0; this.buttonCancel.Text = "Cancel"; this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.button1_Click); + this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick); // // flowLayoutPanel1 // this.tableLayoutPanel1.SetColumnSpan(this.flowLayoutPanel1, 31); this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel1.Location = new System.Drawing.Point(1, 32); + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 30); this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; this.flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(3); - this.flowLayoutPanel1.Size = new System.Drawing.Size(446, 334); + this.flowLayoutPanel1.Size = new System.Drawing.Size(448, 339); this.flowLayoutPanel1.TabIndex = 3; // // tableLayoutPanel1 // - this.tableLayoutPanel1.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; this.tableLayoutPanel1.ColumnCount = 4; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); @@ -118,7 +117,7 @@ private void InitializeComponent() // BtNoColor // this.BtNoColor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.BtNoColor.Location = new System.Drawing.Point(287, 385); + this.BtNoColor.Location = new System.Drawing.Point(289, 386); this.BtNoColor.Name = "BtNoColor"; this.BtNoColor.Size = new System.Drawing.Size(75, 23); this.BtNoColor.TabIndex = 4; @@ -130,7 +129,7 @@ private void InitializeComponent() // this.LbAlternativeColor.AutoSize = true; this.tableLayoutPanel1.SetColumnSpan(this.LbAlternativeColor, 4); - this.LbAlternativeColor.Location = new System.Drawing.Point(4, 367); + this.LbAlternativeColor.Location = new System.Drawing.Point(3, 369); this.LbAlternativeColor.Name = "LbAlternativeColor"; this.LbAlternativeColor.Size = new System.Drawing.Size(397, 13); this.LbAlternativeColor.TabIndex = 5; @@ -139,7 +138,7 @@ private void InitializeComponent() // // BtUndefinedColor // - this.BtUndefinedColor.Location = new System.Drawing.Point(205, 384); + this.BtUndefinedColor.Location = new System.Drawing.Point(208, 385); this.BtUndefinedColor.Name = "BtUndefinedColor"; this.BtUndefinedColor.Size = new System.Drawing.Size(75, 23); this.BtUndefinedColor.TabIndex = 6; @@ -147,20 +146,15 @@ private void InitializeComponent() this.BtUndefinedColor.UseVisualStyleBackColor = true; this.BtUndefinedColor.Click += new System.EventHandler(this.ColorChosen); // - // MyColorPicker + // ColorPickerControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.buttonCancel; - this.ClientSize = new System.Drawing.Size(450, 414); + this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.Controls.Add(this.tableLayoutPanel1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Name = "MyColorPicker"; + this.Name = "ColorPickerControl"; this.Padding = new System.Windows.Forms.Padding(1); - this.ShowInTaskbar = false; - this.Load += new System.EventHandler(this.MyColorPicker_Load); - this.Leave += new System.EventHandler(this.MyColorPicker_Leave); - this.MouseLeave += new System.EventHandler(this.MyColorPicker_MouseLeave); + this.Size = new System.Drawing.Size(450, 414); this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); this.ResumeLayout(false); diff --git a/ARKBreedingStats/uiControls/MyColorPicker.cs b/ARKBreedingStats/uiControls/ColorPickerControl.cs similarity index 76% rename from ARKBreedingStats/uiControls/MyColorPicker.cs rename to ARKBreedingStats/uiControls/ColorPickerControl.cs index 2cc3edbc..72102442 100644 --- a/ARKBreedingStats/uiControls/MyColorPicker.cs +++ b/ARKBreedingStats/uiControls/ColorPickerControl.cs @@ -8,19 +8,26 @@ namespace ARKBreedingStats.uiControls { - public partial class MyColorPicker : Form + public partial class ColorPickerControl : UserControl { public byte SelectedColorId; public byte SelectedColorIdAlternative; private byte[] _naturalColorIDs; - public bool isShown; + private NoPaddingButton _buttonSelectedColor; + /// + /// Window if the control is shown in a separate window. + /// + public ColorPickerWindow Window; private readonly ToolTip _tt; /// /// Used to determine if new mods were loaded that could contain new color definitions. /// private int modListHash; - public MyColorPicker() + public event Action UserMadeSelection; + public event Action HeightChanged; + + public ColorPickerControl() { InitializeComponent(); _tt = new ToolTip { AutomaticDelay = 200 }; @@ -30,13 +37,12 @@ public MyColorPicker() LbAlternativeColor.Text = Loc.S("LbAlternativeColor"); _tt.SetToolTip(BtNoColor, "0: no color"); SetUndefinedColorId(); + buttonCancel.Visible = false; buttonCancel.Text = Loc.S("Cancel"); Disposed += MyColorPicker_Disposed; checkBoxOnlyNatural.Text = Loc.S("showOnlyNaturalOccurring"); - - TopMost = true; } private void MyColorPicker_Disposed(object sender, EventArgs e) @@ -45,6 +51,21 @@ private void MyColorPicker_Disposed(object sender, EventArgs e) _tt.Dispose(); } + public void CancelButtonVisible(bool visible) + { + buttonCancel.Visible = visible; + } + + public CheckBox CbOnlyNatural => checkBoxOnlyNatural; + + /// + /// Disables handling of alternative colors. + /// + public void DisableAlternativeColor() + { + LbAlternativeColor.Visible = false; + } + public void SetUndefinedColorId() { BtUndefinedColor.Tag = Ark.UndefinedColorId; // one possible id of undefined color, currently used by Ark @@ -68,6 +89,9 @@ private void ResetColors() public void PickColor(byte selectedColorId, string headerText, List naturalColors = null, byte selectedColorIdAlternative = 0) { + flowLayoutPanel1.SuspendDrawing(); + flowLayoutPanel1.SuspendLayout(); + label1.Text = headerText; if (modListHash != values.Values.V.loadedModsHash) @@ -76,14 +100,17 @@ public void PickColor(byte selectedColorId, string headerText, List na var colors = values.Values.V.Colors.ColorsList; + if (_buttonSelectedColor?.Selected == true) + { + _buttonSelectedColor.Selected = false; + _buttonSelectedColor.Invalidate(); + } SelectedColorId = selectedColorId; SelectedColorIdAlternative = selectedColorIdAlternative; _naturalColorIDs = naturalColors?.Select(ac => ac.Id).ToArray(); checkBoxOnlyNatural.Visible = _naturalColorIDs != null; - if (_naturalColorIDs == null) - checkBoxOnlyNatural.Checked = true; - flowLayoutPanel1.SuspendLayout(); + const int colorButtonHeight = 24; for (int colorIndex = 1; colorIndex < colors.Length; colorIndex++) { @@ -93,7 +120,7 @@ public void PickColor(byte selectedColorId, string headerText, List na var np = new NoPaddingButton { Width = 44, - Height = 24, + Height = colorButtonHeight, Margin = new Padding(0) }; np.Click += ColorChosen; @@ -103,7 +130,9 @@ public void PickColor(byte selectedColorId, string headerText, List na if (flowLayoutPanel1.Controls[controlIndex] is NoPaddingButton bt) { bt.Visible = ColorVisible(colors[colorIndex].Id); - bt.Selected = SelectedColorId == colors[colorIndex].Id; + var selected = SelectedColorId == colors[colorIndex].Id; + bt.Selected = selected; + if (selected) _buttonSelectedColor = bt; bt.SelectedAlternative = SelectedColorIdAlternative == colors[colorIndex].Id; bt.SetBackColorAndAccordingForeColor(colors[colorIndex].Color); bt.Tag = colors[colorIndex].Id; @@ -112,9 +141,13 @@ public void PickColor(byte selectedColorId, string headerText, List na } } - Height = (int)Math.Ceiling(colors.Length / 10d) * 24 + 99; + var controlHeight = (int)Math.Ceiling(colors.Length / 10d) * colorButtonHeight + 99; + Height = controlHeight; + HeightChanged?.Invoke(controlHeight); flowLayoutPanel1.ResumeLayout(); - isShown = true; + flowLayoutPanel1.ResumeDrawing(); + if (Window != null) + Window.isShown = true; } private bool ColorVisible(byte id) => !checkBoxOnlyNatural.Checked || (_naturalColorIDs?.Contains(id) ?? true); @@ -124,7 +157,7 @@ public void PickColor(byte selectedColorId, string headerText, List na /// private void ColorChosen(object sender, EventArgs e) { - if ((ModifierKeys & Keys.Control) != 0) + if ((ModifierKeys & Keys.Control) != 0 && LbAlternativeColor.Visible) { // only set alternative color SelectedColorIdAlternative = (byte)((Control)sender).Tag; @@ -144,49 +177,31 @@ private void ColorChosen(object sender, EventArgs e) return; } - - SelectedColorId = (byte)((Control)sender).Tag; - HideWindow(true); - } - - private void MyColorPicker_Load(object sender, EventArgs e) - { - int y = Cursor.Position.Y - Height; - if (y < 20) y = 20; - SetDesktopLocation(Cursor.Position.X - 20, y); - } - - private void MyColorPicker_MouseLeave(object sender, EventArgs e) - { - // mouse left, close - if (!ClientRectangle.Contains(PointToClient(MousePosition)) || PointToClient(MousePosition).X == 0 || PointToClient(MousePosition).Y == 0) + // remove selection around current button + if (_buttonSelectedColor != null) { - HideWindow(false); + _buttonSelectedColor.Selected = false; + _buttonSelectedColor.Invalidate(); } - } - private void MyColorPicker_Leave(object sender, EventArgs e) - { - HideWindow(false); - } + _buttonSelectedColor = (NoPaddingButton)sender; + SelectedColorId = (byte)_buttonSelectedColor.Tag; + _buttonSelectedColor.Selected = true; + _buttonSelectedColor.Invalidate(); - private void button1_Click(object sender, EventArgs e) - { - HideWindow(false); + UserMadeSelection?.Invoke(true); } - private void HideWindow(bool ok) - { - isShown = false; - DialogResult = ok ? DialogResult.OK : DialogResult.Cancel; - } + private void ButtonCancelClick(object sender, EventArgs e) => UserMadeSelection?.Invoke(false); private void checkBoxOnlyNatural_CheckedChanged(object sender, EventArgs e) { + flowLayoutPanel1.SuspendDrawing(); flowLayoutPanel1.SuspendLayout(); for (int c = 0; c < flowLayoutPanel1.Controls.Count; c++) flowLayoutPanel1.Controls[c].Visible = ColorVisible((byte)flowLayoutPanel1.Controls[c].Tag); flowLayoutPanel1.ResumeLayout(); + flowLayoutPanel1.ResumeDrawing(); } private class NoPaddingButton : Button diff --git a/ARKBreedingStats/uiControls/MyColorPicker.resx b/ARKBreedingStats/uiControls/ColorPickerControl.resx similarity index 100% rename from ARKBreedingStats/uiControls/MyColorPicker.resx rename to ARKBreedingStats/uiControls/ColorPickerControl.resx diff --git a/ARKBreedingStats/uiControls/ColorPickerWindow.Designer.cs b/ARKBreedingStats/uiControls/ColorPickerWindow.Designer.cs new file mode 100644 index 00000000..fee2b0e9 --- /dev/null +++ b/ARKBreedingStats/uiControls/ColorPickerWindow.Designer.cs @@ -0,0 +1,61 @@ +namespace ARKBreedingStats.uiControls +{ + partial class ColorPickerWindow + { + /// + /// Required designer variable. + /// + 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 Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.ColorPickerControl1 = new ARKBreedingStats.uiControls.ColorPickerControl(); + this.SuspendLayout(); + // + // ColorPickerControl1 + // + this.ColorPickerControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.ColorPickerControl1.Location = new System.Drawing.Point(0, 0); + this.ColorPickerControl1.Name = "ColorPickerControl1"; + this.ColorPickerControl1.Padding = new System.Windows.Forms.Padding(1); + this.ColorPickerControl1.Size = new System.Drawing.Size(450, 414); + this.ColorPickerControl1.TabIndex = 0; + // + // ColorPickerWindow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(450, 414); + this.Controls.Add(this.ColorPickerControl1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "ColorPickerWindow"; + this.ShowInTaskbar = false; + this.Text = "ColorPickerWindow"; + this.ResumeLayout(false); + + } + + #endregion + + private ColorPickerControl ColorPickerControl1; + } +} \ No newline at end of file diff --git a/ARKBreedingStats/uiControls/ColorPickerWindow.cs b/ARKBreedingStats/uiControls/ColorPickerWindow.cs new file mode 100644 index 00000000..e0dc180d --- /dev/null +++ b/ARKBreedingStats/uiControls/ColorPickerWindow.cs @@ -0,0 +1,49 @@ +using System; +using System.Windows.Forms; + +namespace ARKBreedingStats.uiControls +{ + public partial class ColorPickerWindow : Form + { + public bool isShown; + public ColorPickerControl Cp; + + public ColorPickerWindow() + { + InitializeComponent(); + Cp = ColorPickerControl1; + Cp.Window = this; + Cp.CancelButtonVisible(true); + Load += ColorPickerWindow_Load; + Cp.UserMadeSelection += ColorPickerHideWindow; + Cp.HeightChanged += SetWindowHeight; + Cp.MouseLeave += ColorPickerWindow_MouseLeave; + + TopMost = true; + } + + private void SetWindowHeight(int height) => Height = height; + + private void ColorPickerWindow_Load(object sender, EventArgs e) + { + int y = Cursor.Position.Y - Height; + if (y < 20) y = 20; + SetDesktopLocation(Cursor.Position.X - 20, y); + } + + private void ColorPickerWindow_MouseLeave(object sender, EventArgs e) + { + // mouse left, close + if (!ClientRectangle.Contains(PointToClient(MousePosition)) || PointToClient(MousePosition).X == 0 || PointToClient(MousePosition).Y == 0) + { + ColorPickerHideWindow(false); + } + } + + private void ColorPickerHideWindow(bool colorChosen) + { + isShown = false; + DialogResult = colorChosen ? DialogResult.OK : DialogResult.Cancel; + } + } +} diff --git a/ARKBreedingStats/uiControls/ColorPickerWindow.resx b/ARKBreedingStats/uiControls/ColorPickerWindow.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/ARKBreedingStats/uiControls/ColorPickerWindow.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ARKBreedingStats/uiControls/LibraryFilter.cs b/ARKBreedingStats/uiControls/LibraryFilter.cs index 44d5a2dd..c712bf32 100644 --- a/ARKBreedingStats/uiControls/LibraryFilter.cs +++ b/ARKBreedingStats/uiControls/LibraryFilter.cs @@ -15,7 +15,7 @@ public partial class LibraryFilter : Form private readonly CreatureCollection _cc; private List - private Creature ImportExportGunFiles(string[] filePaths, out bool creatureAdded, out Creature lastAddedCreature, out bool copiedNameToClipboard) + private Creature ImportExportGunFiles(string[] filePaths, out bool creatureAdded, out Creature lastAddedCreature, out bool copiedNameToClipboard, bool playImportSound = false) { creatureAdded = false; copiedNameToClipboard = false; @@ -835,7 +836,7 @@ private Creature ImportExportGunFiles(string[] filePaths, out bool creatureAdded foreach (var filePath in filePaths) { - var c = ImportExportGun.ImportCreature(filePath, out lastError, out serverMultipliersHash); + var c = ImportExportGun.LoadCreature(filePath, out lastError, out serverMultipliersHash); if (c != null) { newCreatures.Add(c); @@ -881,12 +882,6 @@ private Creature ImportExportGunFiles(string[] filePaths, out bool creatureAdded ApplySettingsToValues(); } - lastAddedCreature = newCreatures.LastOrDefault(); - if (lastAddedCreature != null) - { - creatureAdded = true; - } - var totalCreatureCount = _creatureCollection.GetTotalCreatureCount(); // select creature objects that will be in the library (i.e. new creature, or existing creature), and the old name var persistentCreaturesAndOldName = newCreatures.Select(c => (creature: @@ -894,6 +889,29 @@ private Creature ImportExportGunFiles(string[] filePaths, out bool creatureAdded ? alreadyExistingCreature : c, oldName: alreadyExistingCreature?.name)).ToArray(); + lastAddedCreature = newCreatures.LastOrDefault(); + if (lastAddedCreature != null) + { + creatureAdded = true; + + // calculate level status of last added creature + var species = lastAddedCreature.Species; + _highestSpeciesLevels.TryGetValue(species, out int[] highSpeciesLevels); + _lowestSpeciesLevels.TryGetValue(species, out int[] lowSpeciesLevels); + _highestSpeciesMutationLevels.TryGetValue(species, out int[] highSpeciesMutationLevels); + var statWeights = breedingPlan1.StatWeighting.GetWeightingForSpecies(species); + LevelStatusFlags.DetermineLevelStatus(species, highSpeciesLevels, lowSpeciesLevels, highSpeciesMutationLevels, + statWeights, lastAddedCreature.levelsWild, lastAddedCreature.levelsMutated, lastAddedCreature.valuesBreeding, + out _, out _); + + if (playImportSound) + { + var creature = lastAddedCreature; + var alreadyExists = persistentCreaturesAndOldName.FirstOrDefault(c => c.creature.Equals(creature)).oldName != null; + SoundFeedback.BeepSignalCurrentLevelFlags(alreadyExists); + } + } + _creatureCollection.MergeCreatureList(newCreatures, true); UpdateCreatureParentLinkingSort(false); @@ -950,7 +968,9 @@ private void UpdateCreatureParentLinkingSort(bool updateLists = true) UpdateListsAfterCreaturesAdded(); } - + /// + /// Updates lists after creatures were added, recalculates library info, e.g. top stats. + /// private void UpdateListsAfterCreaturesAdded() { // update UI diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index e827fb7a..2d895322 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -958,7 +958,8 @@ private void saveAsToolStripMenuItem_Click(object sender, EventArgs e) } /// - /// This function should be called if the creatureCollection was changed, i.e. after loading a file or adding/removing a creature + /// This function should be called if the creatureCollection was changed, i.e. after loading a file or adding/removing a creature. + /// It updates library info, e.g. the top stats. /// /// If not null, only the creatures of the species are updated /// @@ -3426,7 +3427,7 @@ private void ProcessDroppedFiles(string[] files) break; case ".sav": case ".json": - ImportExportGunFiles(files, out _, out _, out _); + ImportExportGunFiles(files, out _, out _, out _, Properties.Settings.Default.PlaySoundOnAutoImport); break; case ".asb": case ".xml": diff --git a/ARKBreedingStats/Form1.importExported.cs b/ARKBreedingStats/Form1.importExported.cs index 6539b485..ca14ba1a 100644 --- a/ARKBreedingStats/Form1.importExported.cs +++ b/ARKBreedingStats/Form1.importExported.cs @@ -217,7 +217,8 @@ private Creature ImportExportedAddIfPossible(string filePath) break; case ".sav": case ".json": - alreadyExistingCreature = ImportExportGunFiles(new[] { filePath }, out addedToLibrary, out creature, out copiedNameToClipboard); + alreadyExistingCreature = ImportExportGunFiles(new[] { filePath }, out addedToLibrary, + out creature, out copiedNameToClipboard); alreadyExists = alreadyExistingCreature != null; if (!addedToLibrary || creature == null) return null; uniqueExtraction = true; @@ -233,8 +234,7 @@ private Creature ImportExportedAddIfPossible(string filePath) creature = GetCreatureFromInput(true, species, levelStep); } - OverlayFeedbackForImport(creature, uniqueExtraction, alreadyExists, addedToLibrary, copiedNameToClipboard, - out bool hasTopLevels, out bool hasNewTopLevels, out var newMutationStatFlags); + OverlayFeedbackForImport(creature, uniqueExtraction, alreadyExists, addedToLibrary, copiedNameToClipboard); if (addedToLibrary) { @@ -295,23 +295,7 @@ private Creature ImportExportedAddIfPossible(string filePath) if (Properties.Settings.Default.PlaySoundOnAutoImport) { - if (uniqueExtraction) - { - if (alreadyExists) - SoundFeedback.BeepSignal(SoundFeedback.FeedbackSounds.Updated); - else if (newMutationStatFlags != 0) - SoundFeedback.BeepSignal(SoundFeedback.FeedbackSounds.NewMutation); - else if (hasNewTopLevels) - SoundFeedback.BeepSignal(SoundFeedback.FeedbackSounds.Great); - else if (hasTopLevels) - SoundFeedback.BeepSignal(SoundFeedback.FeedbackSounds.Good); - else - SoundFeedback.BeepSignal(SoundFeedback.FeedbackSounds.Success); - } - else - { - SoundFeedback.BeepSignal(SoundFeedback.FeedbackSounds.Failure); - } + SoundFeedback.BeepSignalCurrentLevelFlags(alreadyExists, uniqueExtraction); } if (!uniqueExtraction && Properties.Settings.Default.ImportExportedBringToFrontOnIssue) @@ -382,11 +366,8 @@ private bool CopyCreatureNameToClipboardOnImportIfSetting(string creatureName) /// Give feedback in overlay for imported creature. /// private void OverlayFeedbackForImport(Creature creature, bool uniqueExtraction, bool alreadyExists, bool addedToLibrary, - bool copiedNameToClipboard, out bool topLevels, out bool newTopLevels, out int newMutationStatFlags) + bool copiedNameToClipboard) { - topLevels = false; - newTopLevels = false; - newMutationStatFlags = 0; string infoText; Color textColor; const int colorSaturation = 200; @@ -397,27 +378,7 @@ private void OverlayFeedbackForImport(Creature creature, bool uniqueExtraction, if (addedToLibrary && copiedNameToClipboard) sb.AppendLine("Name copied to clipboard."); - var checkMutations = _highestSpeciesMutationLevels.TryGetValue(creature.Species, out var highestMutations) && creature.levelsMutated != null; - var species = speciesSelector1.SelectedSpecies; - _highestSpeciesLevels.TryGetValue(species, out int[] highSpeciesLevels); - _lowestSpeciesLevels.TryGetValue(species, out int[] lowSpeciesLevels); - _highestSpeciesMutationLevels.TryGetValue(species, out int[] highSpeciesMutationLevels); - - var statWeights = breedingPlan1.StatWeighting.GetWeightingForSpecies(species); - - LevelStatusFlags.DetermineLevelStatus(species, highSpeciesLevels, lowSpeciesLevels, highSpeciesMutationLevels, - statWeights, creature.levelsWild, creature.levelsMutated, creature.valuesBreeding, - out _, out _, sb); - - topLevels = LevelStatusFlags.CombinedLevelStatusFlags.HasFlag(LevelStatusFlags.LevelStatus.TopLevel); - newTopLevels = LevelStatusFlags.CombinedLevelStatusFlags.HasFlag(LevelStatusFlags.LevelStatus.NewTopLevel); - newMutationStatFlags = Enumerable.Range(0, Stats.StatsCount) - .Aggregate(0, - (flags, statIndex) => - flags | (LevelStatusFlags.LevelStatusFlagsCurrentNewCreature[statIndex] - .HasFlag(LevelStatusFlags.LevelStatus.NewMutation) - ? (1 << statIndex) - : 0)); + sb.Append(LevelStatusFlags.LevelInfoText); infoText = sb.ToString(); textColor = Color.FromArgb(colorSaturation, 255, colorSaturation); diff --git a/ARKBreedingStats/importExportGun/ImportExportGun.cs b/ARKBreedingStats/importExportGun/ImportExportGun.cs index cf72e7d3..aaa6b1d5 100644 --- a/ARKBreedingStats/importExportGun/ImportExportGun.cs +++ b/ARKBreedingStats/importExportGun/ImportExportGun.cs @@ -13,9 +13,9 @@ namespace ARKBreedingStats.importExportGun internal static class ImportExportGun { /// - /// Import file created with the export gun (mod). + /// Load creature from file created with the export gun (mod). /// - public static Creature ImportCreature(string filePath, out string resultText, out string serverMultipliersHash) + public static Creature LoadCreature(string filePath, out string resultText, out string serverMultipliersHash) { resultText = null; serverMultipliersHash = null; diff --git a/ARKBreedingStats/library/LevelStatusFlags.cs b/ARKBreedingStats/library/LevelStatusFlags.cs index 5509347e..a4f1037f 100644 --- a/ARKBreedingStats/library/LevelStatusFlags.cs +++ b/ARKBreedingStats/library/LevelStatusFlags.cs @@ -18,6 +18,7 @@ public static class LevelStatusFlags /// public static readonly LevelStatus[] LevelStatusFlagsCurrentNewCreature = new LevelStatus[Stats.StatsCount]; public static LevelStatus CombinedLevelStatusFlags; + public static string LevelInfoText; /// /// Determines if the wild and mutated levels of a creature are equal or higher than the current top levels of that species. @@ -32,10 +33,9 @@ public static class LevelStatusFlags /// /// /// - /// Adds text for each stat public static void DetermineLevelStatus(Species species, int[] highSpeciesLevels, int[] lowSpeciesLevels, int[] highSpeciesMutationLevels, (double[], StatValueEvenOdd[]) statWeights, int[] levelsWild, int[] levelsMutated, double[] valuesBreeding, - out List topStatsText, out List newTopStatsText, StringBuilder sbStatInfoText = null) + out List topStatsText, out List newTopStatsText) { // if there are no creatures of the species yet, assume 0 levels to be the current best and worst if (highSpeciesLevels == null) highSpeciesLevels = new int[Stats.StatsCount]; @@ -44,6 +44,8 @@ public static void DetermineLevelStatus(Species species, int[] highSpeciesLevels newTopStatsText = new List(); topStatsText = new List(); + var sbStatInfoText = new StringBuilder(); + CombinedLevelStatusFlags = LevelStatus.Neutral; foreach (var s in Stats.DisplayOrder) { @@ -62,7 +64,9 @@ public static void DetermineLevelStatus(Species species, int[] highSpeciesLevels : statWeight > 0 ? StatWeighting.StatValuePreference.High : StatWeighting.StatValuePreference.Low; - sbStatInfoText?.Append($"{statNameAbb}: {levelsWild[s]} | {levelsMutated[s]} ({valuesBreeding[s]})"); + sbStatInfoText?.Append(levelsMutated != null + ? $"{statNameAbb}: {levelsWild[s]} | {levelsMutated[s]} ({valuesBreeding[s]})" + : $"{statNameAbb}: {levelsWild[s]} ({valuesBreeding[s]})"); if (weighting == StatWeighting.StatValuePreference.High) { @@ -118,6 +122,8 @@ public static void DetermineLevelStatus(Species species, int[] highSpeciesLevels } sbStatInfoText?.AppendLine(); } + + LevelInfoText = sbStatInfoText.ToString(); } public static void Clear() @@ -125,6 +131,7 @@ public static void Clear() for (var s = 0; s < Stats.StatsCount; s++) LevelStatusFlagsCurrentNewCreature[s] = LevelStatus.Neutral; CombinedLevelStatusFlags = LevelStatus.Neutral; + LevelInfoText = null; } /// diff --git a/ARKBreedingStats/utils/SoundFeedback.cs b/ARKBreedingStats/utils/SoundFeedback.cs index 4a66f638..192c35f1 100644 --- a/ARKBreedingStats/utils/SoundFeedback.cs +++ b/ARKBreedingStats/utils/SoundFeedback.cs @@ -1,4 +1,5 @@ using System.Media; +using ARKBreedingStats.library; namespace ARKBreedingStats.utils { @@ -57,5 +58,29 @@ public static void BeepSignal(FeedbackSounds kind) return; } } + + /// + /// Sound feedback according to current LevelStatusFlags. + /// + public static void BeepSignalCurrentLevelFlags(bool creatureAlreadyExists = false, bool extractionSuccessful = true) + { + if (extractionSuccessful) + { + if (creatureAlreadyExists) + BeepSignal(FeedbackSounds.Updated); + else if (LevelStatusFlags.CombinedLevelStatusFlags.HasFlag(LevelStatusFlags.LevelStatus.NewMutation)) + BeepSignal(FeedbackSounds.NewMutation); + else if (LevelStatusFlags.CombinedLevelStatusFlags.HasFlag(LevelStatusFlags.LevelStatus.NewTopLevel)) + BeepSignal(FeedbackSounds.Great); + else if (LevelStatusFlags.CombinedLevelStatusFlags.HasFlag(LevelStatusFlags.LevelStatus.TopLevel)) + BeepSignal(FeedbackSounds.Good); + else + BeepSignal(FeedbackSounds.Success); + } + else + { + BeepSignal(FeedbackSounds.Failure); + } + } } } From ca2db5967dad3dcee5a9a1305df61082e239a14e Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 17 Feb 2024 18:51:35 +0100 Subject: [PATCH 17/32] layout fix for levels --- .../library/CreatureInfoGraphic.cs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/ARKBreedingStats/library/CreatureInfoGraphic.cs b/ARKBreedingStats/library/CreatureInfoGraphic.cs index 25aa16e7..94087975 100644 --- a/ARKBreedingStats/library/CreatureInfoGraphic.cs +++ b/ARKBreedingStats/library/CreatureInfoGraphic.cs @@ -128,17 +128,15 @@ public static Bitmap InfoGraphic(this Creature creature, CreatureCollection cc, int xStatName = (int)meanLetterWidth; var displayMutatedLevels = creature.levelsMutated != null && cc?.Game == Ark.Asa; // x position of level number. torpor is the largest level number. - int xRightLevelValue = (int)(xStatName + ((displayWithDomLevels ? 6 : 5) + creature.levelsWild[Stats.Torpidity].ToString().Length) * meanLetterWidth); - int xRightLevelMutValue = xRightLevelValue + (!displayMutatedLevels ? 0 : (int)((creature.levelsMutated.Max().ToString().Length + 3) * meanLetterWidth)); - int xRightLevelDomValue = xRightLevelMutValue; - if (displayWithDomLevels) - xRightLevelDomValue += (int)(creature.levelsDom.Max().ToString().Length * meanLetterWidth); + int xRightLevelValue = (int)(xStatName + (6 + creature.levelsWild[Stats.Torpidity].ToString().Length) * meanLetterWidth); + int xRightLevelMutValue = xRightLevelValue + (!displayMutatedLevels ? 0 : (int)((creature.levelsMutated.Max().ToString().Length + 2) * meanLetterWidth)); + int xRightLevelDomValue = xRightLevelMutValue + (!displayWithDomLevels ? 0 : (int)((creature.levelsDom.Max().ToString().Length + 1) * meanLetterWidth)); int xRightBrValue = (int)(xRightLevelDomValue + (2 + MaxCharLength(creature.valuesBreeding)) * meanLetterWidth); int maxBoxLength = xRightBrValue - xStatName; int statBoxHeight = Math.Max(2, height / 90); - g.DrawString(Loc.S("W", secondaryCulture: secondaryCulture), font, fontBrush, xRightLevelValue - (int)(displayWithDomLevels ? 2 * meanLetterWidth : 0), currentYPosition, stringFormatRight); + g.DrawString(Loc.S("W", secondaryCulture: secondaryCulture), font, fontBrush, xRightLevelValue - (displayMutatedLevels || displayWithDomLevels ? (int)meanLetterWidth : 0), currentYPosition, stringFormatRight); if (displayMutatedLevels) - g.DrawString(Loc.S("M", secondaryCulture: secondaryCulture), font, fontBrush, xRightLevelMutValue - (int)(2 * meanLetterWidth), currentYPosition, stringFormatRight); + g.DrawString(Loc.S("M", secondaryCulture: secondaryCulture), font, fontBrush, xRightLevelMutValue - (displayWithDomLevels ? (int)meanLetterWidth : 0), currentYPosition, stringFormatRight); if (displayWithDomLevels) g.DrawString(Loc.S("D", secondaryCulture: secondaryCulture), font, fontBrush, xRightLevelDomValue, currentYPosition, stringFormatRight); if (displayStatValues) @@ -175,10 +173,10 @@ public static Bitmap InfoGraphic(this Creature creature, CreatureCollection cc, g.DrawString($"{Utils.StatName(statIndex, true, creature.Species.statNames, secondaryCulture)}", font, fontBrush, xStatName, y); // stat level number - g.DrawString($"{(creature.levelsWild[statIndex] < 0 ? "?" : creature.levelsWild[statIndex].ToString())}{(creature.levelsMutated != null ? " |" : displayWithDomLevels ? " |" : null)}", + g.DrawString($"{(creature.levelsWild[statIndex] < 0 ? "?" : creature.levelsWild[statIndex].ToString())}{(displayMutatedLevels || displayWithDomLevels ? " |" : string.Empty)}", font, fontBrush, xRightLevelValue, y, stringFormatRight); - if (creature.levelsMutated != null) - g.DrawString($"{(creature.levelsMutated[statIndex] < 0 ? string.Empty : creature.levelsMutated[statIndex].ToString())}{(displayWithDomLevels ? " |" : null)}", + if (displayMutatedLevels) + g.DrawString($"{(creature.levelsMutated[statIndex] < 0 ? string.Empty : creature.levelsMutated[statIndex].ToString())}{(displayWithDomLevels ? " |" : string.Empty)}", font, fontBrush, xRightLevelMutValue, y, stringFormatRight); // dom level number if (displayWithDomLevels) From 4e41fbf193a574eb701998da22d043e19ede3a3c Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 17 Feb 2024 19:03:07 +0100 Subject: [PATCH 18/32] explanation when reseting torpidity multiplier --- ARKBreedingStats/settings/Settings.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ARKBreedingStats/settings/Settings.cs b/ARKBreedingStats/settings/Settings.cs index 55958b43..04abcbfd 100644 --- a/ARKBreedingStats/settings/Settings.cs +++ b/ARKBreedingStats/settings/Settings.cs @@ -492,9 +492,14 @@ private void SaveSettings() } } - // Torpidity is handled differently by the game, IwM has no effect. Set IwM to 1. - // See https://github.com/cadon/ARKStatsExtractor/issues/942 for more infos about this. - _cc.serverMultipliers.statMultipliers[Stats.Torpidity][Stats.IndexLevelWild] = 1; + if (_cc.serverMultipliers.statMultipliers[Stats.Torpidity][Stats.IndexLevelWild] != 1) + { + // Torpidity is handled differently by the game, IwM has no effect. Set IwM to 1. + // See https://github.com/cadon/ARKStatsExtractor/issues/942 for more infos about this. + MessageBoxes.ShowMessageBox("The increase per wild level of torpidity setting (PerLevelStatsMultiplier_DinoWild[2]) is ignored by ARK, only the value 1 is used for that setting.\nA different value was entered for that setting.\nSmart Breeding will reset this value to 1, since the game also uses that value, regardless what is entered in the server settings. This is done to prevent extraction issues.", + "Torpidity multiplier reset"); + _cc.serverMultipliers.statMultipliers[Stats.Torpidity][Stats.IndexLevelWild] = 1; + } _cc.singlePlayerSettings = cbSingleplayerSettings.Checked; _cc.AtlasSettings = CbAtlasSettings.Checked; From 2860bec8d1405588d890aa3251c2fb7cf2ff2ff9 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 17 Feb 2024 19:21:25 +0100 Subject: [PATCH 19/32] sound feedback when importing via server --- ARKBreedingStats/Form1.collection.cs | 38 ++++++++++--------- .../importExportGun/ImportExportGun.cs | 4 +- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/ARKBreedingStats/Form1.collection.cs b/ARKBreedingStats/Form1.collection.cs index 6c039285..f2c494cc 100644 --- a/ARKBreedingStats/Form1.collection.cs +++ b/ARKBreedingStats/Form1.collection.cs @@ -893,23 +893,8 @@ private Creature ImportExportGunFiles(string[] filePaths, out bool creatureAdded if (lastAddedCreature != null) { creatureAdded = true; - // calculate level status of last added creature - var species = lastAddedCreature.Species; - _highestSpeciesLevels.TryGetValue(species, out int[] highSpeciesLevels); - _lowestSpeciesLevels.TryGetValue(species, out int[] lowSpeciesLevels); - _highestSpeciesMutationLevels.TryGetValue(species, out int[] highSpeciesMutationLevels); - var statWeights = breedingPlan1.StatWeighting.GetWeightingForSpecies(species); - LevelStatusFlags.DetermineLevelStatus(species, highSpeciesLevels, lowSpeciesLevels, highSpeciesMutationLevels, - statWeights, lastAddedCreature.levelsWild, lastAddedCreature.levelsMutated, lastAddedCreature.valuesBreeding, - out _, out _); - - if (playImportSound) - { - var creature = lastAddedCreature; - var alreadyExists = persistentCreaturesAndOldName.FirstOrDefault(c => c.creature.Equals(creature)).oldName != null; - SoundFeedback.BeepSignalCurrentLevelFlags(alreadyExists); - } + DetermineLevelStatusAndSoundFeedback(lastAddedCreature, playImportSound); } _creatureCollection.MergeCreatureList(newCreatures, true); @@ -986,6 +971,23 @@ private void UpdateListsAfterCreaturesAdded() UpdateTempCreatureDropDown(); } + private void DetermineLevelStatusAndSoundFeedback(Creature c, bool playImportSound) + { + var species = c.Species; + _highestSpeciesLevels.TryGetValue(species, out int[] highSpeciesLevels); + _lowestSpeciesLevels.TryGetValue(species, out int[] lowSpeciesLevels); + _highestSpeciesMutationLevels.TryGetValue(species, out int[] highSpeciesMutationLevels); + var statWeights = breedingPlan1.StatWeighting.GetWeightingForSpecies(species); + LevelStatusFlags.DetermineLevelStatus(species, highSpeciesLevels, lowSpeciesLevels, highSpeciesMutationLevels, + statWeights, c.levelsWild, c.levelsMutated, c.valuesBreeding, + out _, out _); + + if (playImportSound) + { + SoundFeedback.BeepSignalCurrentLevelFlags(IsCreatureAlreadyInLibrary(c.guid, c.ArkId, out _)); + } + } + /// /// Handle reports from the AsbServer listening, e.g. importing creatures or handle errors. /// @@ -1020,13 +1022,15 @@ private void AsbServerDataSent(ProgressReportAsbServer data) if (string.IsNullOrEmpty(data.ServerHash)) { // import creature - var creature = ImportExportGun.ImportCreatureFromJson(data.JsonText, null, out resultText, out _); + var creature = ImportExportGun.LoadCreatureFromJson(data.JsonText, null, out resultText, out _); if (creature == null) { SetMessageLabelText(resultText, MessageBoxIcon.Error); return; } + DetermineLevelStatusAndSoundFeedback(creature, Properties.Settings.Default.PlaySoundOnAutoImport); + _creatureCollection.MergeCreatureList(new[] { creature }, true); UpdateCreatureParentLinkingSort(); diff --git a/ARKBreedingStats/importExportGun/ImportExportGun.cs b/ARKBreedingStats/importExportGun/ImportExportGun.cs index aaa6b1d5..3232f767 100644 --- a/ARKBreedingStats/importExportGun/ImportExportGun.cs +++ b/ARKBreedingStats/importExportGun/ImportExportGun.cs @@ -40,7 +40,7 @@ public static Creature LoadCreature(string filePath, out string resultText, out break; } - return ImportCreatureFromJson(jsonText, resultText, out resultText, out serverMultipliersHash); + return LoadCreatureFromJson(jsonText, resultText, out resultText, out serverMultipliersHash); } catch (IOException) when (tryIndex < tryLoadCount - 1) @@ -58,7 +58,7 @@ public static Creature LoadCreature(string filePath, out string resultText, out return null; } - public static Creature ImportCreatureFromJson(string jsonText, string resultSoFar, out string resultText, out string serverMultipliersHash, string filePath = null) + public static Creature LoadCreatureFromJson(string jsonText, string resultSoFar, out string resultText, out string serverMultipliersHash, string filePath = null) { resultText = resultSoFar; serverMultipliersHash = null; From a97687f44c5010371866b8164fef4544de248106 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 17 Feb 2024 19:30:04 +0100 Subject: [PATCH 20/32] ignore levels that cannot be leveled in top stat feedback --- ARKBreedingStats/Form1.library.cs | 4 ++-- ARKBreedingStats/library/LevelStatusFlags.cs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ARKBreedingStats/Form1.library.cs b/ARKBreedingStats/Form1.library.cs index 132d056b..ad257632 100644 --- a/ARKBreedingStats/Form1.library.cs +++ b/ARKBreedingStats/Form1.library.cs @@ -295,8 +295,8 @@ private void CalculateTopStats(List creatures) continue; var speciesCreatures = g.ToArray(); - List usedStatIndices = new List(Stats.StatsCount); - List usedAndConsideredStatIndices = new List(Stats.StatsCount); + List usedStatIndices = new List(8); + List usedAndConsideredStatIndices = new List(); var highestLevels = new int[Stats.StatsCount]; var lowestLevels = new int[Stats.StatsCount]; var highestMutationLevels = new int[Stats.StatsCount]; diff --git a/ARKBreedingStats/library/LevelStatusFlags.cs b/ARKBreedingStats/library/LevelStatusFlags.cs index a4f1037f..5795124f 100644 --- a/ARKBreedingStats/library/LevelStatusFlags.cs +++ b/ARKBreedingStats/library/LevelStatusFlags.cs @@ -53,7 +53,8 @@ public static void DetermineLevelStatus(Species species, int[] highSpeciesLevels if (s == Stats.Torpidity || levelsWild[s] < 0 - || !species.UsesStat(s)) + || !species.UsesStat(s) + || !species.CanLevelUpWildOrHaveMutations(s)) continue; var statName = Utils.StatName(s, false, species.statNames); From 094046b6bdf5943b4dfc9ab34d1ca89c7bfdebd1 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 17 Feb 2024 19:40:13 +0100 Subject: [PATCH 21/32] option to not display popup with server token --- ARKBreedingStats/App.config | 11 ++-- ARKBreedingStats/Form1.collection.cs | 2 +- ARKBreedingStats/Form1.cs | 2 +- .../Properties/Settings.Designer.cs | 14 ++++- ARKBreedingStats/Properties/Settings.settings | 3 ++ .../settings/Settings.Designer.cs | 52 ++++++++++++------- ARKBreedingStats/settings/Settings.cs | 2 + 7 files changed, 56 insertions(+), 30 deletions(-) diff --git a/ARKBreedingStats/App.config b/ARKBreedingStats/App.config index 0421a5e0..9d448ab7 100644 --- a/ARKBreedingStats/App.config +++ b/ARKBreedingStats/App.config @@ -502,9 +502,6 @@ True - - True - @@ -517,11 +514,11 @@ False - - + + True - - 0 + + True diff --git a/ARKBreedingStats/Form1.collection.cs b/ARKBreedingStats/Form1.collection.cs index f2c494cc..751a6125 100644 --- a/ARKBreedingStats/Form1.collection.cs +++ b/ARKBreedingStats/Form1.collection.cs @@ -1000,7 +1000,7 @@ private void AsbServerDataSent(ProgressReportAsbServer data) if (!string.IsNullOrEmpty(data.ServerToken)) { message += Environment.NewLine + Connection.TokenStringForDisplay(data.ServerToken); - displayPopup = !Properties.Settings.Default.StreamerMode; + displayPopup = !Properties.Settings.Default.StreamerMode && Properties.Settings.Default.DisplayPopupForServerToken; } SetMessageLabelText(message, data.IsError ? MessageBoxIcon.Error : MessageBoxIcon.Information, clipboardText: data.ClipboardText, displayPopup: displayPopup); diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 2d895322..67951ece 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -3945,7 +3945,7 @@ private void currentTokenToolStripMenuItem_Click(object sender, EventArgs e) } SetMessageLabelText(message, isError ? MessageBoxIcon.Error : MessageBoxIcon.Information, - clipboardText: Properties.Settings.Default.ExportServerToken, displayPopup: !Properties.Settings.Default.StreamerMode); + clipboardText: Properties.Settings.Default.ExportServerToken, displayPopup: !Properties.Settings.Default.StreamerMode && Properties.Settings.Default.DisplayPopupForServerToken); } private void sendExampleCreatureToolStripMenuItem_Click(object sender, EventArgs e) diff --git a/ARKBreedingStats/Properties/Settings.Designer.cs b/ARKBreedingStats/Properties/Settings.Designer.cs index a998578b..10db6153 100644 --- a/ARKBreedingStats/Properties/Settings.Designer.cs +++ b/ARKBreedingStats/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace ARKBreedingStats.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -2325,5 +2325,17 @@ public bool KeepMultipliersForNewLibrary { this["KeepMultipliersForNewLibrary"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool DisplayPopupForServerToken { + get { + return ((bool)(this["DisplayPopupForServerToken"])); + } + set { + this["DisplayPopupForServerToken"] = value; + } + } } } diff --git a/ARKBreedingStats/Properties/Settings.settings b/ARKBreedingStats/Properties/Settings.settings index f5261955..a96d3cf7 100644 --- a/ARKBreedingStats/Properties/Settings.settings +++ b/ARKBreedingStats/Properties/Settings.settings @@ -584,5 +584,8 @@ True + + True + \ No newline at end of file diff --git a/ARKBreedingStats/settings/Settings.Designer.cs b/ARKBreedingStats/settings/Settings.Designer.cs index 62a0e713..6633d93c 100644 --- a/ARKBreedingStats/settings/Settings.Designer.cs +++ b/ARKBreedingStats/settings/Settings.Designer.cs @@ -125,6 +125,7 @@ private void InitializeComponent() this.tabControlSettings = new System.Windows.Forms.TabControl(); this.tabPageMultipliers = new System.Windows.Forms.TabPage(); this.GbNewLibraryGame = new System.Windows.Forms.GroupBox(); + this.RbNewLibraryGameAskEachTime = new System.Windows.Forms.RadioButton(); this.RbNewLibraryGameKeep = new System.Windows.Forms.RadioButton(); this.RbNewLibraryGameAsa = new System.Windows.Forms.RadioButton(); this.RbNewLibraryGameAse = new System.Windows.Forms.RadioButton(); @@ -359,7 +360,7 @@ private void InitializeComponent() this.label1 = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); this.colorDialog1 = new System.Windows.Forms.ColorDialog(); - this.RbNewLibraryGameAskEachTime = new System.Windows.Forms.RadioButton(); + this.CbDisplayServerTokenPopup = new System.Windows.Forms.CheckBox(); this.groupBoxMultiplier.SuspendLayout(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudTamedDinoCharacterFoodDrain)).BeginInit(); @@ -1921,6 +1922,17 @@ private void InitializeComponent() this.GbNewLibraryGame.TabStop = false; this.GbNewLibraryGame.Text = "Default new library game version"; // + // RbNewLibraryGameAskEachTime + // + this.RbNewLibraryGameAskEachTime.AutoSize = true; + this.RbNewLibraryGameAskEachTime.Location = new System.Drawing.Point(221, 19); + this.RbNewLibraryGameAskEachTime.Name = "RbNewLibraryGameAskEachTime"; + this.RbNewLibraryGameAskEachTime.Size = new System.Drawing.Size(92, 17); + this.RbNewLibraryGameAskEachTime.TabIndex = 3; + this.RbNewLibraryGameAskEachTime.TabStop = true; + this.RbNewLibraryGameAskEachTime.Text = "Ask each time"; + this.RbNewLibraryGameAskEachTime.UseVisualStyleBackColor = true; + // // RbNewLibraryGameKeep // this.RbNewLibraryGameKeep.AutoSize = true; @@ -2276,7 +2288,7 @@ private void InitializeComponent() this.groupBox31.Controls.Add(this.CbColorIdOnColorRegionButton); this.groupBox31.Controls.Add(this.CbAlwaysShowAllColorRegions); this.groupBox31.Controls.Add(this.CbHideInvisibleColorRegions); - this.groupBox31.Location = new System.Drawing.Point(329, 319); + this.groupBox31.Location = new System.Drawing.Point(329, 341); this.groupBox31.Name = "groupBox31"; this.groupBox31.Size = new System.Drawing.Size(413, 66); this.groupBox31.TabIndex = 14; @@ -2319,9 +2331,9 @@ private void InitializeComponent() this.groupBox30.Controls.Add(this.BExportSpreadsheetMoveDown); this.groupBox30.Controls.Add(this.BExportSpreadsheetMoveUp); this.groupBox30.Controls.Add(this.ClbExportSpreadsheetFields); - this.groupBox30.Location = new System.Drawing.Point(329, 391); + this.groupBox30.Location = new System.Drawing.Point(329, 413); this.groupBox30.Name = "groupBox30"; - this.groupBox30.Size = new System.Drawing.Size(413, 268); + this.groupBox30.Size = new System.Drawing.Size(413, 246); this.groupBox30.TabIndex = 13; this.groupBox30.TabStop = false; this.groupBox30.Text = "Info to export for spreadsheet"; @@ -2362,7 +2374,7 @@ private void InitializeComponent() this.ClbExportSpreadsheetFields.FormattingEnabled = true; this.ClbExportSpreadsheetFields.Location = new System.Drawing.Point(36, 42); this.ClbExportSpreadsheetFields.Name = "ClbExportSpreadsheetFields"; - this.ClbExportSpreadsheetFields.Size = new System.Drawing.Size(371, 214); + this.ClbExportSpreadsheetFields.Size = new System.Drawing.Size(371, 199); this.ClbExportSpreadsheetFields.TabIndex = 12; // // GbImgCacheLocalAppData @@ -2387,11 +2399,12 @@ private void InitializeComponent() // // groupBox16 // + this.groupBox16.Controls.Add(this.CbDisplayServerTokenPopup); this.groupBox16.Controls.Add(this.CbStreamerMode); this.groupBox16.Controls.Add(this.cbDevTools); this.groupBox16.Location = new System.Drawing.Point(329, 234); this.groupBox16.Name = "groupBox16"; - this.groupBox16.Size = new System.Drawing.Size(413, 79); + this.groupBox16.Size = new System.Drawing.Size(413, 101); this.groupBox16.TabIndex = 10; this.groupBox16.TabStop = false; this.groupBox16.Text = "Application"; @@ -2407,7 +2420,7 @@ private void InitializeComponent() // // cbDevTools // - this.cbDevTools.Location = new System.Drawing.Point(6, 44); + this.cbDevTools.Location = new System.Drawing.Point(6, 71); this.cbDevTools.Name = "cbDevTools"; this.cbDevTools.Size = new System.Drawing.Size(407, 24); this.cbDevTools.TabIndex = 0; @@ -3840,7 +3853,7 @@ private void InitializeComponent() this.customSCCustom.Location = new System.Drawing.Point(6, 139); this.customSCCustom.Name = "customSCCustom"; this.customSCCustom.Size = new System.Drawing.Size(401, 23); - this.customSCCustom.SoundFile = null; + this.customSCCustom.SoundFile = ""; this.customSCCustom.TabIndex = 4; // // customSCWakeup @@ -3848,7 +3861,7 @@ private void InitializeComponent() this.customSCWakeup.Location = new System.Drawing.Point(6, 81); this.customSCWakeup.Name = "customSCWakeup"; this.customSCWakeup.Size = new System.Drawing.Size(401, 23); - this.customSCWakeup.SoundFile = ""; + this.customSCWakeup.SoundFile = null; this.customSCWakeup.TabIndex = 2; // // customSCBirth @@ -3856,7 +3869,7 @@ private void InitializeComponent() this.customSCBirth.Location = new System.Drawing.Point(6, 110); this.customSCBirth.Name = "customSCBirth"; this.customSCBirth.Size = new System.Drawing.Size(401, 23); - this.customSCBirth.SoundFile = ""; + this.customSCBirth.SoundFile = null; this.customSCBirth.TabIndex = 3; // // customSCStarving @@ -3864,7 +3877,7 @@ private void InitializeComponent() this.customSCStarving.Location = new System.Drawing.Point(6, 52); this.customSCStarving.Name = "customSCStarving"; this.customSCStarving.Size = new System.Drawing.Size(401, 23); - this.customSCStarving.SoundFile = null; + this.customSCStarving.SoundFile = ""; this.customSCStarving.TabIndex = 1; // // label20 @@ -4583,16 +4596,14 @@ private void InitializeComponent() this.panel1.Size = new System.Drawing.Size(758, 30); this.panel1.TabIndex = 12; // - // RbNewLibraryGameAskEachTime + // CbDisplayServerTokenPopup // - this.RbNewLibraryGameAskEachTime.AutoSize = true; - this.RbNewLibraryGameAskEachTime.Location = new System.Drawing.Point(221, 19); - this.RbNewLibraryGameAskEachTime.Name = "RbNewLibraryGameAskEachTime"; - this.RbNewLibraryGameAskEachTime.Size = new System.Drawing.Size(92, 17); - this.RbNewLibraryGameAskEachTime.TabIndex = 3; - this.RbNewLibraryGameAskEachTime.TabStop = true; - this.RbNewLibraryGameAskEachTime.Text = "Ask each time"; - this.RbNewLibraryGameAskEachTime.UseVisualStyleBackColor = true; + this.CbDisplayServerTokenPopup.Location = new System.Drawing.Point(6, 46); + this.CbDisplayServerTokenPopup.Name = "CbDisplayServerTokenPopup"; + this.CbDisplayServerTokenPopup.Size = new System.Drawing.Size(407, 24); + this.CbDisplayServerTokenPopup.TabIndex = 2; + this.CbDisplayServerTokenPopup.Text = "Display server token popup (disabled in Streamer mode)"; + this.CbDisplayServerTokenPopup.UseVisualStyleBackColor = true; // // Settings // @@ -5093,5 +5104,6 @@ private void InitializeComponent() private System.Windows.Forms.RadioButton RbNewLibraryGameAsa; private System.Windows.Forms.RadioButton RbNewLibraryGameAse; private System.Windows.Forms.RadioButton RbNewLibraryGameAskEachTime; + private System.Windows.Forms.CheckBox CbDisplayServerTokenPopup; } } \ No newline at end of file diff --git a/ARKBreedingStats/settings/Settings.cs b/ARKBreedingStats/settings/Settings.cs index 04abcbfd..66c6d4d9 100644 --- a/ARKBreedingStats/settings/Settings.cs +++ b/ARKBreedingStats/settings/Settings.cs @@ -448,6 +448,7 @@ private void LoadSettings(CreatureCollection cc) NudSpeciesSelectorCountLastUsed.ValueSave = Properties.Settings.Default.SpeciesSelectorCountLastSpecies; CbStreamerMode.Checked = Properties.Settings.Default.StreamerMode; + CbDisplayServerTokenPopup.Checked = Properties.Settings.Default.DisplayPopupForServerToken; cbDevTools.Checked = Properties.Settings.Default.DevTools; cbPrettifyJSON.Checked = Properties.Settings.Default.prettifyCollectionJson; @@ -697,6 +698,7 @@ private void SaveSettings() Properties.Settings.Default.SpeciesSelectorCountLastSpecies = (int)NudSpeciesSelectorCountLastUsed.Value; Properties.Settings.Default.StreamerMode = CbStreamerMode.Checked; + Properties.Settings.Default.DisplayPopupForServerToken = CbDisplayServerTokenPopup.Checked; Properties.Settings.Default.DevTools = cbDevTools.Checked; Properties.Settings.Default.prettifyCollectionJson = cbPrettifyJSON.Checked; From 70d252bb5f8cfbca6e5528c3a9abefeb68a29bb9 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 17 Feb 2024 19:55:50 +0100 Subject: [PATCH 22/32] fix value of undefined color id --- ARKBreedingStats/Ark.cs | 10 ++++++++-- ARKBreedingStats/species/ARKColors.cs | 8 +++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ARKBreedingStats/Ark.cs b/ARKBreedingStats/Ark.cs index 0460f748..08a0a43e 100644 --- a/ARKBreedingStats/Ark.cs +++ b/ARKBreedingStats/Ark.cs @@ -1,4 +1,6 @@ -namespace ARKBreedingStats +using ARKBreedingStats.values; + +namespace ARKBreedingStats { /// /// Constants of the game Ark. @@ -110,7 +112,11 @@ public static class Ark /// /// Sets the undefined color id to the one of ASE or ASA. /// - public static void SetUndefinedColorId(bool asa) => UndefinedColorId = asa ? UndefinedColorIdAsa : UndefinedColorIdAse; + public static void SetUndefinedColorId(bool asa) + { + UndefinedColorId = asa ? UndefinedColorIdAsa : UndefinedColorIdAse; + Values.V.Colors.SetUndefinedColorId(UndefinedColorId); + } /// /// Number of possible color regions for all species. diff --git a/ARKBreedingStats/species/ARKColors.cs b/ARKBreedingStats/species/ARKColors.cs index b855d41e..af3f82de 100644 --- a/ARKBreedingStats/species/ARKColors.cs +++ b/ARKBreedingStats/species/ARKColors.cs @@ -16,7 +16,7 @@ public class ArkColors /// /// Color used if there's no definition for it. /// - private static ArkColor _undefinedColor = new ArkColor("undefined", new double[] { 1, 1, 1, 0 }, false); + private static readonly ArkColor UndefinedColor = new ArkColor("undefined", new double[] { 1, 1, 1, 0 }, false) { Id = Ark.UndefinedColorId }; /// /// Color definitions of the base game. @@ -148,9 +148,9 @@ void AddColorDefinitions(IEnumerable colorDefinitions, byte dyeStartIn ColorsList = _colorsById.Values.OrderBy(c => c.Id).ToArray(); } - public ArkColor ById(byte id) => _colorsById.TryGetValue(id, out var color) ? color : _undefinedColor; + public ArkColor ById(byte id) => _colorsById.TryGetValue(id, out var color) ? color : UndefinedColor; - public ArkColor ByName(string name) => _colorsByName.TryGetValue(name, out var color) ? color : _undefinedColor; + public ArkColor ByName(string name) => _colorsByName.TryGetValue(name, out var color) ? color : UndefinedColor; /// /// Returns the ARK-id of the color that is closest to the sRGB values. @@ -261,6 +261,8 @@ public static List ParseColorDefinitions(object[][] colorDefinitions, return parsedColors.Any() ? parsedColors : null; } + public void SetUndefinedColorId(byte id) => UndefinedColor.Id = id; + /// /// Returns an array with random color ids. /// From 7c35532f18120039e3bee4492106c1c2031e1b40 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 17 Feb 2024 20:39:17 +0100 Subject: [PATCH 23/32] breeding pairing possible with hermaphrodites where only one creature is not in cooldown --- ARKBreedingStats/BreedingPlanning/BreedingPlan.cs | 11 ++++++----- ARKBreedingStats/BreedingPlanning/BreedingScore.cs | 14 +++++++++++++- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs b/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs index 6463df3b..45db3838 100644 --- a/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs +++ b/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs @@ -196,16 +196,17 @@ public void DetermineBestBreeding(Creature chosenCreature = null, bool forceUpda } else { + var includeWithCooldown = cbBPIncludeCooldowneds.Checked; + var ignoreBreedingCooldown = _currentSpecies?.noGender == true; // for hermaphrodites only one partner needs to be not on cooldown Creatures = CreatureCollection.creatures .Where(c => c.speciesBlueprint == _currentSpecies.blueprintPath && !c.flags.HasFlag(CreatureFlags.Neutered) && !c.flags.HasFlag(CreatureFlags.Placeholder) && (c.Status == CreatureStatus.Available || (c.Status == CreatureStatus.Cryopod && cbBPIncludeCryoCreatures.Checked)) - && (cbBPIncludeCooldowneds.Checked - || !(c.cooldownUntil > DateTime.Now - || c.growingUntil > DateTime.Now - ) + && (includeWithCooldown + || !(c.growingUntil > DateTime.Now + || (!ignoreBreedingCooldown && c.cooldownUntil > DateTime.Now)) ) ) .ToList(); @@ -414,7 +415,7 @@ private void DoCalculateBreedingScoresAndDisplayPairs() bestPossLevels, _statWeights, _bestLevels, _breedingMode, considerChosenCreature, considerMutationLimit, (int)nudBPMutationLimit.Value, ref creaturesMutationsFilteredOut, levelLimitWithOutDomLevels, CbDontSuggestOverLimitOffspring.Checked, - cbBPOnlyOneSuggestionForFemales.Checked, _statOddEvens); + cbBPOnlyOneSuggestionForFemales.Checked, _statOddEvens, !cbBPIncludeCooldowneds.Checked && _currentSpecies.noGender); double minScore = _breedingPairs.LastOrDefault()?.BreedingScore.OneNumber ?? 0; var displayScoreOffset = (minScore < 0 ? -minScore : 0) + .5; // don't display negative scores, could be confusing diff --git a/ARKBreedingStats/BreedingPlanning/BreedingScore.cs b/ARKBreedingStats/BreedingPlanning/BreedingScore.cs index 6dfda1ca..e0c19c0c 100644 --- a/ARKBreedingStats/BreedingPlanning/BreedingScore.cs +++ b/ARKBreedingStats/BreedingPlanning/BreedingScore.cs @@ -30,12 +30,13 @@ public static class BreedingScore /// Downgrade score if level is higher than limit. /// Only the pairing with the highest score is kept for each female. Is not used if species has no sex or sex is ignored in breeding planner. /// Array for each stat if the higher level should be considered for score: 0: consider any level, 1: consider only if odd, 2: consider only if even. + /// For hermaphrodites only one partner needs to be not on cooldown. If creatures of a hermaphrodite species are passed and at least one needs to be not on cooldown, set this to true. /// public static List CalculateBreedingScores(Creature[] females, Creature[] males, Species species, short[] bestPossLevels, double[] statWeights, int[] bestLevelsOfSpecies, BreedingMode breedingMode, bool considerChosenCreature, bool considerMutationLimit, int mutationLimit, ref bool creaturesMutationsFilteredOut, int offspringLevelLimit = 0, bool downGradeOffspringWithLevelHigherThanLimit = false, - bool onlyBestSuggestionForFemale = false, StatValueEvenOdd[] anyOddEven = null) + bool onlyBestSuggestionForFemale = false, StatValueEvenOdd[] anyOddEven = null, bool checkIfAtLeastOnePartnerIsNotOnCooldown = false) { var breedingPairs = new List(); var ignoreSex = Properties.Settings.Default.IgnoreSexInBreedingPlan || species.noGender; @@ -48,6 +49,8 @@ public static List CalculateBreedingScores(Creature[] females, Cre customIgnoreTopStatsEvenOdd[s] = anyOddEven != null && statWeights[s] > 0; } + var now = DateTime.Now; + for (int fi = 0; fi < females.Length; fi++) { var female = females[fi]; @@ -73,6 +76,15 @@ public static List CalculateBreedingScores(Creature[] females, Cre continue; } + // if species is hermaphrodite, only one partner needs to be not on cooldown + if (checkIfAtLeastOnePartnerIsNotOnCooldown + && female.cooldownUntil > now + && male.cooldownUntil > now + ) + { + continue; + } + double t = 0; int offspringPotentialTopStatCount = 0; double offspringExpectedTopStatCount = 0; // a guaranteed top stat counts 1, otherwise the inheritance probability of the top stat is counted From ad1a8d2b1bc3487f1c2539e57405ee1b690c5679 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 17 Feb 2024 21:02:07 +0100 Subject: [PATCH 24/32] menu to open name pattern editor --- ARKBreedingStats/CreatureInfoInput.cs | 3 ++- ARKBreedingStats/Form1.Designer.cs | 37 +++++++++++++++++---------- ARKBreedingStats/Form1.cs | 18 +++++++++++++ 3 files changed, 43 insertions(+), 15 deletions(-) diff --git a/ARKBreedingStats/CreatureInfoInput.cs b/ARKBreedingStats/CreatureInfoInput.cs index 4b226c54..c8e8fb85 100644 --- a/ARKBreedingStats/CreatureInfoInput.cs +++ b/ARKBreedingStats/CreatureInfoInput.cs @@ -696,7 +696,7 @@ public bool TribeLock } /// - /// If set to true, it's assumed the creature is already existing. + /// If not null it's assumed the creature is already existing in the library. /// public Creature AlreadyExistingCreature { @@ -709,6 +709,7 @@ public Creature AlreadyExistingCreature _alreadyExistingCreature = value; SetAdd2LibColor(btAdd2Library.Enabled); } + get => _alreadyExistingCreature; } /// diff --git a/ARKBreedingStats/Form1.Designer.cs b/ARKBreedingStats/Form1.Designer.cs index bda88c52..b809cd12 100644 --- a/ARKBreedingStats/Form1.Designer.cs +++ b/ARKBreedingStats/Form1.Designer.cs @@ -118,6 +118,7 @@ private void InitializeComponent() this.pasteCreatureToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.libraryFilterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemMutationColumns = new System.Windows.Forms.ToolStripMenuItem(); + this.nameGeneratorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator18 = new System.Windows.Forms.ToolStripSeparator(); @@ -139,6 +140,8 @@ private void InitializeComponent() this.currentTokenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.listenWithNewTokenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.sendExampleCreatureToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator28 = new System.Windows.Forms.ToolStripSeparator(); + this.openModPageInBrowserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator(); this.discordServerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -388,8 +391,6 @@ private void InitializeComponent() this.toolStripSeparator27 = new System.Windows.Forms.ToolStripSeparator(); this.resetColumnOrderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.speciesSelector1 = new ARKBreedingStats.SpeciesSelector(); - this.openModPageInBrowserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator28 = new System.Windows.Forms.ToolStripSeparator(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).BeginInit(); @@ -1020,6 +1021,7 @@ private void InitializeComponent() this.editToolStripMenuItem, this.libraryFilterToolStripMenuItem, this.toolStripMenuItemMutationColumns, + this.nameGeneratorToolStripMenuItem, this.settingsToolStripMenuItem, this.serverToolStripMenuItem, this.helpToolStripMenuItem, @@ -1224,6 +1226,12 @@ private void InitializeComponent() this.toolStripMenuItemMutationColumns.Text = "Mutation Columns"; this.toolStripMenuItemMutationColumns.CheckedChanged += new System.EventHandler(this.toolStripMenuItemMutationColumns_CheckedChanged); // + // nameGeneratorToolStripMenuItem + // + this.nameGeneratorToolStripMenuItem.Name = "nameGeneratorToolStripMenuItem"; + this.nameGeneratorToolStripMenuItem.Size = new System.Drawing.Size(105, 20); + this.nameGeneratorToolStripMenuItem.Text = "Name generator"; + // // settingsToolStripMenuItem // this.settingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -1386,6 +1394,18 @@ private void InitializeComponent() this.sendExampleCreatureToolStripMenuItem.Text = "Send example creature"; this.sendExampleCreatureToolStripMenuItem.Click += new System.EventHandler(this.sendExampleCreatureToolStripMenuItem_Click); // + // toolStripSeparator28 + // + this.toolStripSeparator28.Name = "toolStripSeparator28"; + this.toolStripSeparator28.Size = new System.Drawing.Size(215, 6); + // + // openModPageInBrowserToolStripMenuItem + // + this.openModPageInBrowserToolStripMenuItem.Name = "openModPageInBrowserToolStripMenuItem"; + this.openModPageInBrowserToolStripMenuItem.Size = new System.Drawing.Size(218, 22); + this.openModPageInBrowserToolStripMenuItem.Text = "Open mod page in browser"; + this.openModPageInBrowserToolStripMenuItem.Click += new System.EventHandler(this.openModPageInBrowserToolStripMenuItem_Click); + // // helpToolStripMenuItem // this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -3820,18 +3840,6 @@ private void InitializeComponent() this.speciesSelector1.SplitterDistance = 500; this.speciesSelector1.TabIndex = 0; // - // openModPageInBrowserToolStripMenuItem - // - this.openModPageInBrowserToolStripMenuItem.Name = "openModPageInBrowserToolStripMenuItem"; - this.openModPageInBrowserToolStripMenuItem.Size = new System.Drawing.Size(218, 22); - this.openModPageInBrowserToolStripMenuItem.Text = "Open mod page in browser"; - this.openModPageInBrowserToolStripMenuItem.Click += new System.EventHandler(this.openModPageInBrowserToolStripMenuItem_Click); - // - // toolStripSeparator28 - // - this.toolStripSeparator28.Name = "toolStripSeparator28"; - this.toolStripSeparator28.Size = new System.Drawing.Size(215, 6); - // // Form1 // this.AcceptButton = this.btExtractLevels; @@ -4298,5 +4306,6 @@ private void InitializeComponent() private uiControls.LibraryInfoControl libraryInfoControl1; private System.Windows.Forms.ToolStripSeparator toolStripSeparator28; private System.Windows.Forms.ToolStripMenuItem openModPageInBrowserToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem nameGeneratorToolStripMenuItem; } } diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 67951ece..774eaffd 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -246,6 +246,17 @@ public Form1() lbTesterWildLevel.ContextMenu = new ContextMenu(new[] { new MenuItem("Set random wild levels", SetRandomWildLevels) }); + // name patterns menu entries + const int namePatternCount = 6; + var namePatternMenuItems = new ToolStripItem[namePatternCount]; + for (int i = 0; i < namePatternCount; i++) + { + var mi = new ToolStripMenuItem { Text = $"Pattern {i + 1}{(i == 0 ? " (used for auto import)" : string.Empty)}", Tag = i }; + mi.Click += MenuOpenNamePattern; + namePatternMenuItems[i] = mi; + } + nameGeneratorToolStripMenuItem.DropDownItems.AddRange(namePatternMenuItems); + _reactOnCreatureSelectionChange = true; } @@ -3960,5 +3971,12 @@ private void openModPageInBrowserToolStripMenuItem_Click(object sender, EventArg { Process.Start(RepositoryInfo.ExportGunModPage); } + + private void MenuOpenNamePattern(object sender, EventArgs e) + { + var namePatternIndex = (int)((ToolStripMenuItem)sender).Tag; + var infoInput = tabControlMain.SelectedTab != tabPageStatTesting ? creatureInfoInputExtractor : creatureInfoInputTester; + CreatureInfoInput_CreatureDataRequested(infoInput, true, false, false, namePatternIndex, infoInput.AlreadyExistingCreature); + } } } From 42b068418d2fa08e24eb83dd81656555f28790b1 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 17 Feb 2024 21:03:37 +0100 Subject: [PATCH 25/32] display toggle mutation columns only for library --- ARKBreedingStats/Form1.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 774eaffd..2d1f8c1f 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -1613,6 +1613,7 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) ToolStripTextBoxLibraryFilter.Visible = libraryShown; ToolStripButtonLibraryFilterClear.Visible = libraryShown; ToolStripButtonSaveFilterPreset.Visible = libraryShown; + toolStripMenuItemMutationColumns.Visible = libraryShown; SetMessageLabelText(); copyCreatureToolStripMenuItem.Visible = tabControlMain.SelectedTab == tabPageLibrary; raisingControl1.updateListView = tabControlMain.SelectedTab == tabPageRaising; From 96aca7b37579e8aa186e55635dbf016a75531939 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 17 Feb 2024 23:14:17 +0100 Subject: [PATCH 26/32] only display error message and not unhandled exception if values file couldn't be loaded (#1331) --- ARKBreedingStats/FileService.cs | 2 +- ARKBreedingStats/values/ValuesFile.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ARKBreedingStats/FileService.cs b/ARKBreedingStats/FileService.cs index 405e705c..5c3edff0 100644 --- a/ARKBreedingStats/FileService.cs +++ b/ARKBreedingStats/FileService.cs @@ -118,7 +118,7 @@ public static bool LoadJsonFile(string filePath, out T data, out string error if (data != null) return true; - errorMessage = $"File\n{Path.GetFullPath(filePath)}\n contains no readable data."; + errorMessage = $"File\n{Path.GetFullPath(filePath)}\ncontains no readable data."; return false; } } diff --git a/ARKBreedingStats/values/ValuesFile.cs b/ARKBreedingStats/values/ValuesFile.cs index f0af3def..f7e4b5ca 100644 --- a/ARKBreedingStats/values/ValuesFile.cs +++ b/ARKBreedingStats/values/ValuesFile.cs @@ -136,6 +136,12 @@ protected static bool TryLoadValuesFile(string filePath, bool setModFileName, bo if (throwExceptionOnFail) throw new FormatException(errorMessage); } + catch (FileLoadException ex) + { + errorMessage = ex.Message; + if (throwExceptionOnFail) + throw; + } return false; } } From add2c4855b07ab623885101ae047940758510848 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 18 Feb 2024 10:27:16 +0100 Subject: [PATCH 27/32] update displayed levels radar chart --- ARKBreedingStats/Form1.tester.cs | 2 +- ARKBreedingStats/RadarChart.cs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ARKBreedingStats/Form1.tester.cs b/ARKBreedingStats/Form1.tester.cs index 8148ee3d..b8f3457e 100644 --- a/ARKBreedingStats/Form1.tester.cs +++ b/ARKBreedingStats/Form1.tester.cs @@ -131,7 +131,7 @@ private void TestingStatIoValueUpdate(StatIO sIo) int[] levelsMutations = _testingIOs.Select(s => s.LevelMut).ToArray(); if (!_testingIOs[Stats.Torpidity].Enabled) levelsWild[Stats.Torpidity] = 0; - radarChart1.SetLevels(levelsWild, levelsMutations); + radarChart1.SetLevels(levelsWild, levelsMutations, speciesSelector1.SelectedSpecies); statPotentials1.SetLevels(levelsWild, levelsMutations, false); //statGraphs1.setGraph(sE, 0, testingIOs[0].LevelWild, testingIOs[0].LevelDom, !radioButtonTesterWild.Checked, (double)NumericUpDownTestingTE.Value / 100, (double)numericUpDownImprintingBonusTester.Value / 100); diff --git a/ARKBreedingStats/RadarChart.cs b/ARKBreedingStats/RadarChart.cs index 06696bed..667aefb5 100644 --- a/ARKBreedingStats/RadarChart.cs +++ b/ARKBreedingStats/RadarChart.cs @@ -152,7 +152,7 @@ private void InitializeStats(int displayedStats) _displayedStatIndices.Add(s); } - _anglePerStat = Math.PI * 2 / _displayedStatIndices.Count; + _anglePerStat = Math.PI * 2 / (_displayedStatIndices.Count > 0 ? _displayedStatIndices.Count : 1); InitializePoints(); } @@ -187,7 +187,8 @@ private Point Coords(int radius, double angle) /// If null, the previous values are redrawn. public void SetLevels(int[] levelsWild = null, int[] levelMutations = null, Species species = null) { - InitializeStats(species?.DisplayedStats ?? _displayedStats); + if (species != null) + InitializeStats(species.DisplayedStats); if (_maxR <= 5 || _ps.Count == 0) return; // image too small From b12dbea2e214fa04226ca38eba4365cdad0913c3 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 18 Feb 2024 10:36:25 +0100 Subject: [PATCH 28/32] intuitive behaviour of allowSpeedLevel controls --- .../settings/Settings.Designer.cs | 29 ++++++++++--------- ARKBreedingStats/settings/Settings.cs | 11 +++++-- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/ARKBreedingStats/settings/Settings.Designer.cs b/ARKBreedingStats/settings/Settings.Designer.cs index 6633d93c..39a95265 100644 --- a/ARKBreedingStats/settings/Settings.Designer.cs +++ b/ARKBreedingStats/settings/Settings.Designer.cs @@ -169,6 +169,7 @@ private void InitializeComponent() this.GbImgCacheLocalAppData = new System.Windows.Forms.GroupBox(); this.CbImgCacheUseLocalAppData = new System.Windows.Forms.CheckBox(); this.groupBox16 = new System.Windows.Forms.GroupBox(); + this.CbDisplayServerTokenPopup = new System.Windows.Forms.CheckBox(); this.CbStreamerMode = new System.Windows.Forms.CheckBox(); this.cbDevTools = new System.Windows.Forms.CheckBox(); this.GbSpecies = new System.Windows.Forms.GroupBox(); @@ -360,7 +361,6 @@ private void InitializeComponent() this.label1 = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); this.colorDialog1 = new System.Windows.Forms.ColorDialog(); - this.CbDisplayServerTokenPopup = new System.Windows.Forms.CheckBox(); this.groupBoxMultiplier.SuspendLayout(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudTamedDinoCharacterFoodDrain)).BeginInit(); @@ -2097,6 +2097,7 @@ private void InitializeComponent() this.CbAllowSpeedLeveling.TabIndex = 1; this.CbAllowSpeedLeveling.Text = "Allow speed leveling (only ASA)"; this.CbAllowSpeedLeveling.UseVisualStyleBackColor = true; + this.CbAllowSpeedLeveling.CheckedChanged += new System.EventHandler(this.CbAllowSpeedLeveling_CheckedChanged); // // CbAllowFlyerSpeedLeveling // @@ -2409,6 +2410,15 @@ private void InitializeComponent() this.groupBox16.TabStop = false; this.groupBox16.Text = "Application"; // + // CbDisplayServerTokenPopup + // + this.CbDisplayServerTokenPopup.Location = new System.Drawing.Point(6, 46); + this.CbDisplayServerTokenPopup.Name = "CbDisplayServerTokenPopup"; + this.CbDisplayServerTokenPopup.Size = new System.Drawing.Size(407, 24); + this.CbDisplayServerTokenPopup.TabIndex = 2; + this.CbDisplayServerTokenPopup.Text = "Display server token popup (disabled in Streamer mode)"; + this.CbDisplayServerTokenPopup.UseVisualStyleBackColor = true; + // // CbStreamerMode // this.CbStreamerMode.Location = new System.Drawing.Point(6, 19); @@ -3853,7 +3863,7 @@ private void InitializeComponent() this.customSCCustom.Location = new System.Drawing.Point(6, 139); this.customSCCustom.Name = "customSCCustom"; this.customSCCustom.Size = new System.Drawing.Size(401, 23); - this.customSCCustom.SoundFile = ""; + this.customSCCustom.SoundFile = null; this.customSCCustom.TabIndex = 4; // // customSCWakeup @@ -3861,7 +3871,7 @@ private void InitializeComponent() this.customSCWakeup.Location = new System.Drawing.Point(6, 81); this.customSCWakeup.Name = "customSCWakeup"; this.customSCWakeup.Size = new System.Drawing.Size(401, 23); - this.customSCWakeup.SoundFile = null; + this.customSCWakeup.SoundFile = ""; this.customSCWakeup.TabIndex = 2; // // customSCBirth @@ -3869,7 +3879,7 @@ private void InitializeComponent() this.customSCBirth.Location = new System.Drawing.Point(6, 110); this.customSCBirth.Name = "customSCBirth"; this.customSCBirth.Size = new System.Drawing.Size(401, 23); - this.customSCBirth.SoundFile = null; + this.customSCBirth.SoundFile = ""; this.customSCBirth.TabIndex = 3; // // customSCStarving @@ -3877,7 +3887,7 @@ private void InitializeComponent() this.customSCStarving.Location = new System.Drawing.Point(6, 52); this.customSCStarving.Name = "customSCStarving"; this.customSCStarving.Size = new System.Drawing.Size(401, 23); - this.customSCStarving.SoundFile = ""; + this.customSCStarving.SoundFile = null; this.customSCStarving.TabIndex = 1; // // label20 @@ -4596,15 +4606,6 @@ private void InitializeComponent() this.panel1.Size = new System.Drawing.Size(758, 30); this.panel1.TabIndex = 12; // - // CbDisplayServerTokenPopup - // - this.CbDisplayServerTokenPopup.Location = new System.Drawing.Point(6, 46); - this.CbDisplayServerTokenPopup.Name = "CbDisplayServerTokenPopup"; - this.CbDisplayServerTokenPopup.Size = new System.Drawing.Size(407, 24); - this.CbDisplayServerTokenPopup.TabIndex = 2; - this.CbDisplayServerTokenPopup.Text = "Display server token popup (disabled in Streamer mode)"; - this.CbDisplayServerTokenPopup.UseVisualStyleBackColor = true; - // // Settings // this.AcceptButton = this.buttonOK; diff --git a/ARKBreedingStats/settings/Settings.cs b/ARKBreedingStats/settings/Settings.cs index 66c6d4d9..d14185b7 100644 --- a/ARKBreedingStats/settings/Settings.cs +++ b/ARKBreedingStats/settings/Settings.cs @@ -220,7 +220,6 @@ private void LoadSettings(CreatureCollection cc) } else { - RbGameAse.Checked = true; CbAllowSpeedLeveling.Visible = false; } @@ -1703,9 +1702,15 @@ private void BtImportSettingsSelectFile_Click(object sender, EventArgs e) } } + private void CbAllowSpeedLeveling_CheckedChanged(object sender, EventArgs e) + { + if (!CbAllowSpeedLeveling.Checked) + CbAllowFlyerSpeedLeveling.Checked = false; + } + private void CbAllowFlyerSpeedLeveling_CheckedChanged(object sender, EventArgs e) { - if (CbAllowFlyerSpeedLeveling.Checked) + if (CbAllowFlyerSpeedLeveling.Checked && RbGameAsa.Checked) CbAllowSpeedLeveling.Checked = true; } @@ -1816,7 +1821,7 @@ private void RbGameAsa_CheckedChanged(object sender, EventArgs e) { var isAsa = RbGameAsa.Checked; CbAllowSpeedLeveling.Visible = isAsa; - if (!isAsa) + if (isAsa && CbAllowFlyerSpeedLeveling.Checked) CbAllowSpeedLeveling.Checked = true; } } From a5dbea876783c94d6bed7144c1d301ad0007bd5f Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 18 Feb 2024 11:42:04 +0100 Subject: [PATCH 29/32] handling of invalid speed leveling setting with dedicated user feedback --- ARKBreedingStats/Form1.extractor.cs | 60 +++++++++++++--------- ARKBreedingStats/local/strings.de.resx | 3 ++ ARKBreedingStats/local/strings.resx | 3 ++ ARKBreedingStats/miscClasses/IssueNotes.cs | 38 +++++++------- 4 files changed, 63 insertions(+), 41 deletions(-) diff --git a/ARKBreedingStats/Form1.extractor.cs b/ARKBreedingStats/Form1.extractor.cs index 81210e66..f4f6bcdd 100644 --- a/ARKBreedingStats/Form1.extractor.cs +++ b/ARKBreedingStats/Form1.extractor.cs @@ -42,13 +42,17 @@ private void UpdateExtractorDetails() /// /// This displays the sum of the chosen levels. This is the last step before a creature-extraction is considered as valid or not valid. /// - private void ShowSumOfChosenLevels() + private void ShowSumOfChosenLevels(bool allUnknownLevelsDistributed) { - // The speedLevel is not chosen, but calculated from the other chosen levels, and must not be included in the sum, except all the other levels are determined uniquely! + // The wild levels of stats that don't change the stat value (e.g. speed) are not chosen, but calculated from the other chosen levels, + // and must not be included in the sum, except if it's only one of these stats and all the other levels are determined uniquely! // this method will show only the offset of the value, it's less confusing to the user and gives all the infos needed - int sumW = 0, sumD = 0; - bool valid = true, inbound = true, allUnique = true; + var sumW = 0; + var sumD = 0; + var valid = true; + var inbound = true; + var allUnique = true; for (int s = 0; s < Stats.StatsCount; s++) { if (s == Stats.Torpidity) @@ -72,7 +76,7 @@ private void ShowSumOfChosenLevels() if (valid) { sumW -= allUnique || _statIOs[Stats.SpeedMultiplier].LevelWild < 0 ? 0 : _statIOs[Stats.SpeedMultiplier].LevelWild; - string offSetWild = "✓"; + string offSetWild = allUnknownLevelsDistributed ? "✓" : "✕"; lbSumDom.Text = sumD.ToString(); if (sumW <= _extractor.LevelWildSum) { @@ -105,13 +109,18 @@ private void ShowSumOfChosenLevels() } panelSums.BackColor = inbound ? SystemColors.Control : Color.FromArgb(255, 200, 200); - bool torporLevelValid = numericUpDownLevel.Value > _statIOs[Stats.Torpidity].LevelWild; + bool torporLevelValid = allUnknownLevelsDistributed && numericUpDownLevel.Value > _statIOs[Stats.Torpidity].LevelWild; if (!torporLevelValid) { numericUpDownLevel.BackColor = Color.LightSalmon; _statIOs[Stats.Torpidity].Status = StatIOStatus.Error; } + if (!allUnknownLevelsDistributed) + { + ExtractionFailed(IssueNotes.Issue.SpeedLevelingSetting); + } + bool allValid = valid && inbound && torporLevelValid && _extractor.ValidResults; if (allValid) { @@ -347,14 +356,14 @@ private bool ExtractLevels(bool autoExtraction = false, bool statInputsHighPreci if (s == Stats.Health || s == Stats.MeleeDamageMultiplier) { - possibleExtractionIssues |= IssueNotes.Issue.Singleplayer; + possibleExtractionIssues |= IssueNotes.Issue.SinglePlayer; } } } if (!_extractor.ValidResults) { ExtractionFailed(possibleExtractionIssues | IssueNotes.Issue.Typo | IssueNotes.Issue.WildTamedBred | IssueNotes.Issue.LockedDom | - IssueNotes.Issue.OutdatedIngameValues | IssueNotes.Issue.ImprintingNotUpdated | + IssueNotes.Issue.OutdatedInGameValues | IssueNotes.Issue.ImprintingNotUpdated | (_statIOs[Stats.Torpidity].LevelWild >= (int)numericUpDownLevel.Value ? IssueNotes.Issue.CreatureLevel : IssueNotes.Issue.None)); return false; } @@ -399,10 +408,10 @@ private bool ExtractLevels(bool autoExtraction = false, bool statInputsHighPreci labelTE.BackColor = Color.Transparent; } - SetWildUnknownLevelsAccordingToOthers(); + var allUnknownLevelsDistributed = SetWildUnknownLevelsAccordingToOthers(); lbSumDomSB.Text = _extractor.LevelDomSum.ToString(); - ShowSumOfChosenLevels(); + ShowSumOfChosenLevels(allUnknownLevelsDistributed); if (showLevelsInOverlay) ShowLevelsInOverlay(); @@ -473,9 +482,9 @@ private void ExtractionFailed(IssueNotes.Issue issues = IssueNotes.Issue.None) lbImprintingFailInfo.Visible = false; // TODO move imprinting-fail to upper note-info BtCopyIssueDumpToClipboard.Visible = false; PbCreatureColorsExtractor.Visible = true; + return; } - else - { + // highlight controls which most likely need to be checked to solve the issue if (issues.HasFlag(IssueNotes.Issue.WildTamedBred)) panelWildTamedBred.BackColor = Color.LightSalmon; @@ -513,8 +522,8 @@ private void ExtractionFailed(IssueNotes.Issue issues = IssueNotes.Issue.None) } if (!oneStatIsDomLocked) { - // no stat is domLocked, remove this note (which is ensured to be there) - issues -= IssueNotes.Issue.LockedDom; + // no stat is domLocked, remove this note + issues &= ~IssueNotes.Issue.LockedDom; } } @@ -577,7 +586,6 @@ private void ExtractionFailed(IssueNotes.Issue issues = IssueNotes.Issue.None) if (DateTime.Now.AddHours(-5) > Properties.Settings.Default.lastUpdateCheck) CheckForUpdates(true); } - } /// /// If a stat has multiple possibilities for its level distribution, the taming effectiveness may be affected by that. @@ -706,24 +714,26 @@ private void SetLevelCombination(int s, int i, bool validateCombination = false) if (validateCombination) { SetUniqueTE(); - SetWildUnknownLevelsAccordingToOthers(); - ShowSumOfChosenLevels(); + var allUnknownLevelsDistributed = SetWildUnknownLevelsAccordingToOthers(); + ShowSumOfChosenLevels(allUnknownLevelsDistributed); } } /// /// Some wild stat levels have no effect on the stat value, often that's speed or sometimes oxygen. /// The wild levels of these ineffective stats can be calculated indirectly if there is only one of them. + /// Returns false if not all invalid levels could be distributed in stats. /// - private void SetWildUnknownLevelsAccordingToOthers() + private bool SetWildUnknownLevelsAccordingToOthers() { var species = speciesSelector1.SelectedSpecies; + var allUnknownLevelsAreDistributed = true; // wild speed level is wildTotalLevels - determinedWildLevels. sometimes the oxygen level cannot be determined as well var unknownLevelIndices = new List(); int notDeterminedLevels = _statIOs[Stats.Torpidity].LevelWild; for (int s = 0; s < Stats.StatsCount; s++) { - if (s == Stats.Torpidity || !species.UsesStat(s)) + if (s == Stats.Torpidity || !species.CanLevelUpWildOrHaveMutations(s)) { continue; } @@ -739,21 +749,25 @@ private void SetWildUnknownLevelsAccordingToOthers() switch (unknownLevelIndices.Count) { case 0: - // no unknown levels, nothing to do - return; + // no unknown levels + if (notDeterminedLevels != 0) + { + allUnknownLevelsAreDistributed = false; + } + return allUnknownLevelsAreDistributed; case 1: // if all other stats are unique, set level var statIndex = unknownLevelIndices[0]; _statIOs[statIndex].LevelWild = Math.Max(0, notDeterminedLevels); _statIOs[statIndex].BreedingValue = StatValueCalculation.CalculateValue(speciesSelector1.SelectedSpecies, statIndex, _statIOs[statIndex].LevelWild, 0, 0, true, 1, 0); - return; + return true; default: // if not all other levels are unique, set the indifferent stats to unknown foreach (var s in unknownLevelIndices) { _statIOs[s].LevelWild = -1; } - return; + return true; } } diff --git a/ARKBreedingStats/local/strings.de.resx b/ARKBreedingStats/local/strings.de.resx index 86fb44e3..386ee0be 100644 --- a/ARKBreedingStats/local/strings.de.resx +++ b/ARKBreedingStats/local/strings.de.resx @@ -1337,4 +1337,7 @@ Es ist auch möglich Tiere mit einer Farbe in mehreren möglichen Regionen zu fi Dieser Ton wird abgespielt, wenn eine Kreatur aktualisiert wird, d.h. erneut importiert wird + + Die Einstellung zum Leveln von Bewegungsgeschwindigkeit (AllowSpeedLeveling) oder die Spielversion (ASE oder ASA) ist wahrscheinlich nicht richtig gesetzt. + \ No newline at end of file diff --git a/ARKBreedingStats/local/strings.resx b/ARKBreedingStats/local/strings.resx index ea5a75c3..2ccf5783 100644 --- a/ARKBreedingStats/local/strings.resx +++ b/ARKBreedingStats/local/strings.resx @@ -1349,4 +1349,7 @@ It's also possible to filter for creatures with a color in one of multiple possi This sound is played if a creature is updated, i.e. imported again + + The Allow speed leveling setting or the game (ASE or ASA) is probably not set correctly. + \ No newline at end of file diff --git a/ARKBreedingStats/miscClasses/IssueNotes.cs b/ARKBreedingStats/miscClasses/IssueNotes.cs index 49d38b1d..c646eb53 100644 --- a/ARKBreedingStats/miscClasses/IssueNotes.cs +++ b/ARKBreedingStats/miscClasses/IssueNotes.cs @@ -38,14 +38,15 @@ private static string GetHelpText(Issue issue) case Issue.ImprintingLocked: return Loc.S("issueCauseImprintingLocked"); case Issue.ImprintingNotUpdated: return Loc.S("issueCauseImprintingNotUpdated"); case Issue.ImprintingNotPossible: return Loc.S("issueCauseImprintingNotPossible"); - case Issue.Singleplayer: return Loc.S("issueCauseSingleplayer"); + case Issue.SinglePlayer: return Loc.S("issueCauseSingleplayer"); case Issue.WildLevelSteps: return Loc.S("issueCauseWildLevelSteps"); case Issue.MaxWildLevel: return Loc.S("issueCauseMaxWildLevel"); + case Issue.SpeedLevelingSetting: return Loc.S("issueCauseSpeedLevelingSetting"); case Issue.StatMultipliers: return Loc.S("issueCauseStatMultipliers"); case Issue.ModValues: return Loc.S("issueCauseModValues"); case Issue.ArkStatIssue: return Loc.S("issueCauseArkStatIssue"); case Issue.CreatureLevel: return Loc.S("issueCauseCreatureLevel"); - case Issue.OutdatedIngameValues: return Loc.S("issueCauseOutdatedIngameValues"); + case Issue.OutdatedInGameValues: return Loc.S("issueCauseOutdatedIngameValues"); case Issue.ImpossibleTe: return Loc.S("issueCauseImpossibleTe"); } return string.Empty; @@ -56,22 +57,23 @@ private static string GetHelpText(Issue issue) public enum Issue { None = 0, - ImprintingNotPossible = 1, - Typo = 2, - CreatureLevel = 4, - WildTamedBred = 8, - LockedDom = 16, - Singleplayer = 32, - MaxWildLevel = 64, - StatMultipliers = 128, - ImprintingNotUpdated = 256, - TamingEffectivenessRange = 512, - ImprintingLocked = 1024, - ModValues = 2048, - WildLevelSteps = 4096, - ArkStatIssue = 8192, - OutdatedIngameValues = 16384, - ImpossibleTe = 32768 + ImprintingNotPossible = 1 << 0, + Typo = 1 << 1, + CreatureLevel = 1 << 2, + WildTamedBred = 1 << 3, + LockedDom = 1 << 4, + SinglePlayer = 1 << 5, + MaxWildLevel = 1 << 6, + SpeedLevelingSetting = 1 << 7, + StatMultipliers = 1 << 8, + ImprintingNotUpdated = 1 << 9, + TamingEffectivenessRange = 1 << 10, + ImprintingLocked = 1 << 11, + ModValues = 1 << 12, + WildLevelSteps = 1 << 13, + ArkStatIssue = 1 << 14, + OutdatedInGameValues = 1 << 15, + ImpossibleTe = 1 << 16 } } } From 43883fdf29820755cae585594c4d985768519207 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 18 Feb 2024 12:28:11 +0100 Subject: [PATCH 30/32] fix handling of unknown species when importing via export gun --- .../importExportGun/ImportExportGun.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ARKBreedingStats/importExportGun/ImportExportGun.cs b/ARKBreedingStats/importExportGun/ImportExportGun.cs index 3232f767..faf3979a 100644 --- a/ARKBreedingStats/importExportGun/ImportExportGun.cs +++ b/ARKBreedingStats/importExportGun/ImportExportGun.cs @@ -278,10 +278,21 @@ internal static ExportGunServerFile ReadServerMultipliers(string filePath, out s public static ExportGunServerFile ReadServerMultipliersFromJson(string jsonText, string resultSoFar, out string resultText, string game = null, string filePath = null) { resultText = resultSoFar; - var exportedServerMultipliers = JsonConvert.DeserializeObject(jsonText); if (string.IsNullOrEmpty(jsonText)) { - resultText = $"Error when importing file {filePath}: {resultText}"; + resultText = $"The file is empty and cannot be imported: {filePath}{Environment.NewLine}{resultText}"; + return null; + } + var exportedServerMultipliers = JsonConvert.DeserializeObject(jsonText); + + // check if the file is a valid server settings file + if (exportedServerMultipliers?.WildLevel == null + || exportedServerMultipliers.TameLevel == null + || exportedServerMultipliers.TameAdd == null + || exportedServerMultipliers.TameAff == null + ) + { + resultText = $"The file is not a valid server multipliers file and cannot be imported: {filePath}{Environment.NewLine}{resultText}"; return null; } From ce4463bdce8ad7109d032e3519acd5877c19b232 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 18 Feb 2024 16:42:34 +0100 Subject: [PATCH 31/32] blueprint lookup case insensitive --- ARKBreedingStats/values/Values.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ARKBreedingStats/values/Values.cs b/ARKBreedingStats/values/Values.cs index c23f5016..40b670fb 100644 --- a/ARKBreedingStats/values/Values.cs +++ b/ARKBreedingStats/values/Values.cs @@ -674,7 +674,7 @@ private void UpdateSpeciesBlueprintDictionaries() { if (!string.IsNullOrEmpty(s.blueprintPath)) { - _blueprintToSpecies[s.blueprintPath] = s; + _blueprintToSpecies[s.blueprintPath.ToLowerInvariant()] = s; string speciesName = s.name; if (_nameToSpecies.TryGetValue(speciesName, out var existingSpecies)) @@ -693,10 +693,7 @@ private void UpdateSpeciesBlueprintDictionaries() if (classNameMatch.Success) { string className = classNameMatch.Value + "_C"; - if (_classNameToSpecies.ContainsKey(className)) - _classNameToSpecies[className] = s; - else - _classNameToSpecies.Add(className, s); + _classNameToSpecies[className] = s; } } } @@ -768,7 +765,7 @@ public Species SpeciesByBlueprint(string blueprintPath) { blueprintPath = realBlueprintPath; } - return _blueprintToSpecies.TryGetValue(blueprintPath, out var s) ? s : null; + return _blueprintToSpecies.TryGetValue(blueprintPath.ToLowerInvariant(), out var s) ? s : null; } /// From 0629dd03f72dcdc8e3ae15d2e823a5af2e8cd731 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 18 Feb 2024 20:22:16 +0100 Subject: [PATCH 32/32] ver --- ARKBreedingStats/Properties/AssemblyInfo.cs | 2 +- ARKBreedingStats/_manifest.json | 2 +- ARKBreedingStats/json/values/_manifest.json | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ARKBreedingStats/Properties/AssemblyInfo.cs b/ARKBreedingStats/Properties/AssemblyInfo.cs index 5d8f973b..325608e7 100644 --- a/ARKBreedingStats/Properties/AssemblyInfo.cs +++ b/ARKBreedingStats/Properties/AssemblyInfo.cs @@ -30,6 +30,6 @@ // Revision // [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("0.60.0.1")] +[assembly: AssemblyFileVersion("0.60.1.0")] [assembly: NeutralResourcesLanguage("en")] diff --git a/ARKBreedingStats/_manifest.json b/ARKBreedingStats/_manifest.json index 82b580e6..5609047c 100644 --- a/ARKBreedingStats/_manifest.json +++ b/ARKBreedingStats/_manifest.json @@ -4,7 +4,7 @@ "ARK Smart Breeding": { "Id": "ARK Smart Breeding", "Category": "main", - "version": "0.60.0.1" + "version": "0.60.1.0" }, "SpeciesColorImages": { "Id": "SpeciesColorImages", diff --git a/ARKBreedingStats/json/values/_manifest.json b/ARKBreedingStats/json/values/_manifest.json index 21f4bd4b..c33131e0 100644 --- a/ARKBreedingStats/json/values/_manifest.json +++ b/ARKBreedingStats/json/values/_manifest.json @@ -168,8 +168,8 @@ "mod": { "id": "1696957410", "tag": "MarniimodsTest", "title": "Marnii's Equines" } }, "1729386191-BonusDinoMod.json": { - "version": "358.17.1699996351", - "mod": { "id": "1729386191", "tag": "BonusDinoMod", "title": "AC: Kami Creations" } + "version": "358.17.1707066185", + "mod": { "id": "1729386191", "tag": "BonusDinoMod", "title": "AC: Part 2" } }, "1729512589-Brachiosaurus.json": { "version": "304.453.1574651748", @@ -258,7 +258,7 @@ "mod": { "id": "2000326197", "tag": "ExtraResources", "title": "Event Assets" } }, "2003934830-Beasts.json": { - "version": "358.17.1705183647", + "version": "358.17.1707708288", "mod": { "id": "2003934830", "tag": "Beasts", "title": "Prehistoric Beasts" } }, "2019846325-ApexMod.json": {