diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj index 792d08818..be0bb42b4 100644 --- a/ARKBreedingStats/ARKBreedingStats.csproj +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -110,6 +110,15 @@ + + Form + + + Form + + + ColorPickerWindow.cs + UserControl @@ -132,6 +141,9 @@ Component + + UserControl + Form @@ -518,11 +530,11 @@ MultiSetter.cs - - Form + + UserControl - - MyColorPicker.cs + + ColorPickerControl.cs Component @@ -702,6 +714,9 @@ RecognitionTrainingForm.cs + + ColorPickerWindow.cs + CreatureAnalysis.cs @@ -928,8 +943,8 @@ MultiSetter.cs - - MyColorPicker.cs + + ColorPickerControl.cs PedigreeControl.cs diff --git a/ARKBreedingStats/App.config b/ARKBreedingStats/App.config index b4c3c000c..9d448ab77 100644 --- a/ARKBreedingStats/App.config +++ b/ARKBreedingStats/App.config @@ -502,9 +502,6 @@ True - - True - @@ -517,8 +514,11 @@ False - - + + True + + + True diff --git a/ARKBreedingStats/Ark.cs b/ARKBreedingStats/Ark.cs index ec557a328..08a0a43e3 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. @@ -103,14 +105,18 @@ public static class Ark public const byte UndefinedColorIdAsa = 255; /// - /// When choosing a random color for a mutation, ARK can erroneously select an undefined color. Usually this is color id 227 (one too high to be defined). + /// When choosing a random color for a mutation, ARK can erroneously select an undefined color. 227 for ASE, 255 for ASA. /// public static byte UndefinedColorId = UndefinedColorIdAse; /// /// 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. @@ -126,14 +132,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/BreedingPlanning/BreedingPlan.cs b/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs index 6463df3be..45db38386 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 6dfda1caa..e0c19c0c9 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 diff --git a/ARKBreedingStats/CreatureInfoInput.cs b/ARKBreedingStats/CreatureInfoInput.cs index 4b226c548..c8e8fb855 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/FileService.cs b/ARKBreedingStats/FileService.cs index 405e705c7..5c3edff08 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/Form1.Designer.cs b/ARKBreedingStats/Form1.Designer.cs index e97111173..b809cd129 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(); @@ -136,8 +137,11 @@ 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.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(); @@ -310,8 +314,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 +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.currentTokenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).BeginInit(); @@ -431,6 +436,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(); @@ -1015,6 +1021,7 @@ private void InitializeComponent() this.editToolStripMenuItem, this.libraryFilterToolStripMenuItem, this.toolStripMenuItemMutationColumns, + this.nameGeneratorToolStripMenuItem, this.settingsToolStripMenuItem, this.serverToolStripMenuItem, this.helpToolStripMenuItem, @@ -1219,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[] { @@ -1345,33 +1358,54 @@ private void InitializeComponent() this.listenToolStripMenuItem, this.currentTokenToolStripMenuItem, this.listenWithNewTokenToolStripMenuItem, - this.sendExampleCreatureToolStripMenuItem}); + this.sendExampleCreatureToolStripMenuItem, + this.toolStripSeparator28, + this.openModPageInBrowserToolStripMenuItem}); this.serverToolStripMenuItem.Name = "serverToolStripMenuItem"; - this.serverToolStripMenuItem.Size = new System.Drawing.Size(51, 20); - this.serverToolStripMenuItem.Text = "Server"; + this.serverToolStripMenuItem.Size = new System.Drawing.Size(77, 20); + this.serverToolStripMenuItem.Text = "Export gun"; // // listenToolStripMenuItem // this.listenToolStripMenuItem.CheckOnClick = true; this.listenToolStripMenuItem.Name = "listenToolStripMenuItem"; - this.listenToolStripMenuItem.Size = new System.Drawing.Size(194, 22); + this.listenToolStripMenuItem.Size = new System.Drawing.Size(218, 22); 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(218, 22); + this.currentTokenToolStripMenuItem.Text = "Current token"; + this.currentTokenToolStripMenuItem.Click += new System.EventHandler(this.currentTokenToolStripMenuItem_Click); + // // listenWithNewTokenToolStripMenuItem // this.listenWithNewTokenToolStripMenuItem.Name = "listenWithNewTokenToolStripMenuItem"; - this.listenWithNewTokenToolStripMenuItem.Size = new System.Drawing.Size(194, 22); + this.listenWithNewTokenToolStripMenuItem.Size = new System.Drawing.Size(218, 22); this.listenWithNewTokenToolStripMenuItem.Text = "Listen with new token"; this.listenWithNewTokenToolStripMenuItem.Click += new System.EventHandler(this.listenWithNewTokenToolStripMenuItem_Click); // // sendExampleCreatureToolStripMenuItem // this.sendExampleCreatureToolStripMenuItem.Name = "sendExampleCreatureToolStripMenuItem"; - this.sendExampleCreatureToolStripMenuItem.Size = new System.Drawing.Size(194, 22); + this.sendExampleCreatureToolStripMenuItem.Size = new System.Drawing.Size(218, 22); 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[] { @@ -3017,19 +3051,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 +3100,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 +3840,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 +3924,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 +4302,10 @@ 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; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator28; + private System.Windows.Forms.ToolStripMenuItem openModPageInBrowserToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem nameGeneratorToolStripMenuItem; } } diff --git a/ARKBreedingStats/Form1.collection.cs b/ARKBreedingStats/Form1.collection.cs index d2f3af6af..751a6125f 100644 --- a/ARKBreedingStats/Form1.collection.cs +++ b/ARKBreedingStats/Form1.collection.cs @@ -16,7 +16,7 @@ using ARKBreedingStats.uiControls; using ARKBreedingStats.utils; using ARKBreedingStats.AsbServer; -using Newtonsoft.Json.Linq; +using ARKBreedingStats.library; namespace ARKBreedingStats { @@ -57,8 +57,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 +94,10 @@ private void NewCollection(bool resetCollection = false) _creatureCollection.Game = Ark.Asa; ReloadModValuesOfCollectionIfNeeded(true, false, false, false); } + else + { + UpdateAsaIndicator(); + } pedigree1.Clear(); breedingPlan1.Clear(); @@ -797,7 +818,7 @@ private void OpenRecentlyUsedFile(object sender, EventArgs e) /// Imports creature from file created by the export gun mod. /// Returns already existing Creature or null if it's a new creature. /// - 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; @@ -815,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); @@ -861,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: @@ -874,6 +889,14 @@ 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 + DetermineLevelStatusAndSoundFeedback(lastAddedCreature, playImportSound); + } + _creatureCollection.MergeCreatureList(newCreatures, true); UpdateCreatureParentLinkingSort(false); @@ -930,7 +953,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 @@ -946,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. /// @@ -958,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); @@ -980,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/Form1.cs b/ARKBreedingStats/Form1.cs index fec1eac86..2d1f8c1fe 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) @@ -242,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; } @@ -727,7 +742,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); + LibraryInfo.SetColorInfo(speciesSelector1.SelectedSpecies, CbLibraryInfoUseFilter.Checked ? (IList)ApplyLibraryFilterSettings(_creatureCollection.creatures).ToArray() : _creatureCollection.creatures, CbLibraryInfoUseFilter.Checked, libraryInfoControl1.TlpColorInfoText); + libraryInfoControl1.SetSpecies(speciesSelector1.SelectedSpecies); } else if (tabControlMain.SelectedTab == tabPagePedigree) { @@ -953,7 +969,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 /// @@ -1596,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; @@ -1627,7 +1645,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); + LibraryInfo.SetColorInfo(speciesSelector1.SelectedSpecies, CbLibraryInfoUseFilter.Checked ? (IList)ApplyLibraryFilterSettings(_creatureCollection.creatures).ToArray() : _creatureCollection.creatures, CbLibraryInfoUseFilter.Checked, libraryInfoControl1.TlpColorInfoText); + libraryInfoControl1.SetSpecies(speciesSelector1.SelectedSpecies); } else if (tabControlMain.SelectedTab == tabPagePedigree) { @@ -3420,7 +3439,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": @@ -3870,6 +3889,7 @@ private void colorDefinitionsToClipboardToolStripMenuItem_Click(object sender, E private void BtCopyLibraryColorToClipboard_Click(object sender, EventArgs e) { LibraryInfo.SetColorInfo(speciesSelector1.SelectedSpecies, CbLibraryInfoUseFilter.Checked ? (IList)ApplyLibraryFilterSettings(_creatureCollection.creatures).ToArray() : _creatureCollection.creatures, CbLibraryInfoUseFilter.Checked); + libraryInfoControl1.SetSpecies(speciesSelector1.SelectedSpecies); var colorInfo = LibraryInfo.GetSpeciesInfo(); Clipboard.SetText(string.IsNullOrEmpty(colorInfo) ? $"no color info available for species {speciesSelector1.SelectedSpecies}" : colorInfo); SetMessageLabelText($"Color information about {speciesSelector1.SelectedSpecies} has been copied to the clipboard, you can paste it in a text editor to view it.", MessageBoxIcon.Information); @@ -3877,7 +3897,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) @@ -3937,7 +3957,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) @@ -3947,5 +3967,17 @@ private void sendExampleCreatureToolStripMenuItem_Click(object sender, EventArgs } #endregion + + private void openModPageInBrowserToolStripMenuItem_Click(object sender, EventArgs e) + { + 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); + } } } diff --git a/ARKBreedingStats/Form1.extractor.cs b/ARKBreedingStats/Form1.extractor.cs index e489d1331..f4f6bcdd8 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) { @@ -126,7 +135,7 @@ private void ShowSumOfChosenLevels() var statWeights = breedingPlan1.StatWeighting.GetWeightingForSpecies(species); LevelStatusFlags.DetermineLevelStatus(species, highSpeciesLevels, lowSpeciesLevels, highSpeciesMutationLevels, - statWeights, GetCurrentWildLevels(), GetCurrentMutLevels(),GetCurrentBreedingValues(), + statWeights, GetCurrentWildLevels(), GetCurrentMutLevels(), GetCurrentBreedingValues(), out var topStatsText, out var newTopStatsText); for (var s = 0; s < Stats.StatsCount; s++) @@ -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; } } @@ -990,6 +1004,21 @@ void SetExistingValueIfNewValueIsEmpty(ref string newValue, ref string oldValue) SetStatsActiveAccordingToUsage(cv.Species); ExtractLevels(autoExtraction, highPrecisionValues, existingCreature: alreadyExistingCreature, possiblyMutagenApplied: cv.flags.HasFlag(CreatureFlags.MutagenApplied)); + + if (alreadyExistingCreature?.levelsMutated != null) + { + // use already set mutation levels + for (int s = 0; s < Stats.StatsCount; s++) + { + var mutationLevels = alreadyExistingCreature.levelsMutated[s]; + if (mutationLevels > 0 && _statIOs[s].LevelWild > mutationLevels) + { + _statIOs[s].LevelMut = mutationLevels; + _statIOs[s].LevelWild -= mutationLevels; + } + } + } + SetCreatureValuesToInfoInput(cv, creatureInfoInputExtractor); UpdateParentListInput(creatureInfoInputExtractor); // this function is only used for single-creature extractions, e.g. LastExport creatureInfoInputExtractor.AlreadyExistingCreature = alreadyExistingCreature; diff --git a/ARKBreedingStats/Form1.importExported.cs b/ARKBreedingStats/Form1.importExported.cs index 6539b4853..ca14ba1a6 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/Form1.library.cs b/ARKBreedingStats/Form1.library.cs index 9fc5029ab..ad257632b 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; @@ -296,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/Form1.tester.cs b/ARKBreedingStats/Form1.tester.cs index 8148ee3d3..b8f3457e1 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/Properties/AssemblyInfo.cs b/ARKBreedingStats/Properties/AssemblyInfo.cs index 5d8f973b1..325608e72 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/Properties/Settings.Designer.cs b/ARKBreedingStats/Properties/Settings.Designer.cs index 34b57f99e..10db61536 100644 --- a/ARKBreedingStats/Properties/Settings.Designer.cs +++ b/ARKBreedingStats/Properties/Settings.Designer.cs @@ -8,2895 +8,2334 @@ // //------------------------------------------------------------------------------ -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 - { - + [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()))); - - 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; + } + } + + [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 590874c70..a96d3cf76 100644 --- a/ARKBreedingStats/Properties/Settings.settings +++ b/ARKBreedingStats/Properties/Settings.settings @@ -563,9 +563,6 @@ True - - True - @@ -578,8 +575,17 @@ False - + + + 0 + + + True + + + True + \ No newline at end of file diff --git a/ARKBreedingStats/RadarChart.cs b/ARKBreedingStats/RadarChart.cs index 06696bed2..667aefb59 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 diff --git a/ARKBreedingStats/_manifest.json b/ARKBreedingStats/_manifest.json index 82b580e61..5609047cf 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/importExportGun/ImportExportGun.cs b/ARKBreedingStats/importExportGun/ImportExportGun.cs index cf72e7d35..faf3979ae 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; @@ -40,7 +40,7 @@ public static Creature ImportCreature(string filePath, out string resultText, ou 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 ImportCreature(string filePath, out string resultText, ou 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; @@ -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; } diff --git a/ARKBreedingStats/importExported/ImportExported.cs b/ARKBreedingStats/importExported/ImportExported.cs index 9ec313be2..e8bff7dd8 100644 --- a/ARKBreedingStats/importExported/ImportExported.cs +++ b/ARKBreedingStats/importExported/ImportExported.cs @@ -250,8 +250,14 @@ private static byte ParseColorId(string text) { if (r == 0 && g == 0 && b == 0 && a == 1) // no color return 0; - if (r == 1 && g == 1 && b == 1 && a == 1) // undefined color - return Ark.UndefinedColorId; + if (r == 1 && g == 1 && b == 1 && a == 1) + { + // in ASE and ASA this is the undefined color. In ASA it's also the white coloring. + // return undefined id for ASE, use color matching for ASA + // this will result in the white coloring, then the undefined color is added as alternative possible color + if (Ark.UndefinedColorId == Ark.UndefinedColorIdAse) + return Ark.UndefinedColorId; + } return Values.V.Colors.ClosestColorId(r, g, b, a); } diff --git a/ARKBreedingStats/json/equalColorIds.json b/ARKBreedingStats/json/equalColorIds.json index 4c80f176e..1e18deef7 100644 --- a/ARKBreedingStats/json/equalColorIds.json +++ b/ARKBreedingStats/json/equalColorIds.json @@ -4,5 +4,6 @@ [ 3, 206 ], [ 4, 219 ], [ 5, 204 ], - [ 35, 226 ] + [ 35, 226 ], + [ 233, 255 ] ] \ No newline at end of file diff --git a/ARKBreedingStats/json/values/_manifest.json b/ARKBreedingStats/json/values/_manifest.json index 21f4bd4b9..c33131e0f 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": { diff --git a/ARKBreedingStats/library/CreatureInfoGraphic.cs b/ARKBreedingStats/library/CreatureInfoGraphic.cs index 25aa16e7e..94087975a 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) diff --git a/ARKBreedingStats/library/LevelStatusFlags.cs b/ARKBreedingStats/library/LevelStatusFlags.cs index a253c7520..5795124f7 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) { @@ -51,17 +53,21 @@ 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); 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]})"); + sbStatInfoText?.Append(levelsMutated != null + ? $"{statNameAbb}: {levelsWild[s]} | {levelsMutated[s]} ({valuesBreeding[s]})" + : $"{statNameAbb}: {levelsWild[s]} ({valuesBreeding[s]})"); if (weighting == StatWeighting.StatValuePreference.High) { @@ -117,6 +123,8 @@ public static void DetermineLevelStatus(Species species, int[] highSpeciesLevels } sbStatInfoText?.AppendLine(); } + + LevelInfoText = sbStatInfoText.ToString(); } public static void Clear() @@ -124,6 +132,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/local/strings.de.resx b/ARKBreedingStats/local/strings.de.resx index 86fb44e33..386ee0be1 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 ea5a75c37..2ccf57839 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 49d38b1d8..c646eb539 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 } } } diff --git a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs index 9322a01f9..339ba6438 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 e699f76c4..15e480fa4 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}); diff --git a/ARKBreedingStats/settings/Settings.Designer.cs b/ARKBreedingStats/settings/Settings.Designer.cs index 497fdd264..39a95265a 100644 --- a/ARKBreedingStats/settings/Settings.Designer.cs +++ b/ARKBreedingStats/settings/Settings.Designer.cs @@ -124,6 +124,11 @@ 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.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(); this.TbRemoteServerSettingsUri = new System.Windows.Forms.TextBox(); this.BtSettingsToClipboard = new System.Windows.Forms.Button(); this.btExportMultipliers = new System.Windows.Forms.Button(); @@ -164,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(); @@ -185,6 +191,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 +218,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 +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.CbLibraryDisplayZeroMutationLevels = new System.Windows.Forms.CheckBox(); this.groupBoxMultiplier.SuspendLayout(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudTamedDinoCharacterFoodDrain)).BeginInit(); @@ -400,6 +406,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 +1876,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 +1909,63 @@ 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"; + // + // 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; + 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 +2006,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; @@ -2032,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 // @@ -2223,7 +2289,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; @@ -2266,9 +2332,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"; @@ -2309,7 +2375,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 @@ -2334,15 +2400,25 @@ 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"; // + // 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); @@ -2354,7 +2430,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; @@ -2567,6 +2643,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 +2896,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 +2951,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 +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 @@ -3785,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 @@ -3793,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 @@ -3801,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 @@ -4520,16 +4606,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; @@ -4599,6 +4675,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); @@ -4970,7 +5048,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; @@ -5022,5 +5100,11 @@ 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; + 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 480349793..d14185b77 100644 --- a/ARKBreedingStats/settings/Settings.cs +++ b/ARKBreedingStats/settings/Settings.cs @@ -220,10 +220,17 @@ private void LoadSettings(CreatureCollection cc) } else { - RbGameAse.Checked = true; 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; @@ -342,7 +349,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); @@ -440,6 +447,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; @@ -484,13 +492,22 @@ 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; _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; @@ -599,7 +616,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; @@ -680,6 +697,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; @@ -1617,7 +1635,7 @@ private void ShowInfoGraphicPreview() BtInfoGraphicBorderColor.BackColor, CbInfoGraphicCreatureName.Checked, CbInfoGraphicDomLevels.Checked, - CbInfoGraphicMutations.Checked, + CbInfoGraphicMutationCounter.Checked, CbInfoGraphicGenerations.Checked, CbInfoGraphicStatValues.Checked, CbInfoGraphicDisplayMaxWildLevel.Checked, @@ -1684,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; } @@ -1702,7 +1726,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 +1736,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; } @@ -1797,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; } } diff --git a/ARKBreedingStats/species/ARKColors.cs b/ARKBreedingStats/species/ARKColors.cs index b855d41ef..af3f82de9 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. /// diff --git a/ARKBreedingStats/uiControls/ArkVersionDialog.cs b/ARKBreedingStats/uiControls/ArkVersionDialog.cs new file mode 100644 index 000000000..f0153b3c5 --- /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/uiControls/MyColorPicker.Designer.cs b/ARKBreedingStats/uiControls/ColorPickerControl.Designer.cs similarity index 88% rename from ARKBreedingStats/uiControls/MyColorPicker.Designer.cs rename to ARKBreedingStats/uiControls/ColorPickerControl.Designer.cs index 385aa4ed1..fe9e5f198 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. @@ -33,9 +33,9 @@ private void InitializeComponent() this.buttonCancel = new System.Windows.Forms.Button(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.BtNoColor = new System.Windows.Forms.Button(); + this.BtNoColor = new NoPaddingButton(); this.LbAlternativeColor = new System.Windows.Forms.Label(); - this.BtUndefinedColor = new System.Windows.Forms.Button(); + this.BtUndefinedColor = new NoPaddingButton(); this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // @@ -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); @@ -173,8 +167,8 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox checkBoxOnlyNatural; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; - private System.Windows.Forms.Button BtNoColor; + private NoPaddingButton BtNoColor; private System.Windows.Forms.Label LbAlternativeColor; - private System.Windows.Forms.Button BtUndefinedColor; + private NoPaddingButton BtUndefinedColor; } } \ No newline at end of file diff --git a/ARKBreedingStats/uiControls/ColorPickerControl.cs b/ARKBreedingStats/uiControls/ColorPickerControl.cs new file mode 100644 index 000000000..340136032 --- /dev/null +++ b/ARKBreedingStats/uiControls/ColorPickerControl.cs @@ -0,0 +1,303 @@ +using ARKBreedingStats.species; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Windows.Forms; +using ARKBreedingStats.utils; + +namespace ARKBreedingStats.uiControls +{ + public partial class ColorPickerControl : UserControl + { + public byte SelectedColorId; + public byte SelectedColorIdAlternative; + private byte[] _naturalColorIDs; + 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 event Action UserMadeSelection; + public event Action HeightChanged; + + public ColorPickerControl() + { + InitializeComponent(); + _tt = new ToolTip { AutomaticDelay = 200 }; + + BtNoColor.Tag = (byte)0; // id of no color + BtNoColor.Text = Loc.S("noColor"); + 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"); + } + + private void MyColorPicker_Disposed(object sender, EventArgs e) + { + _tt.RemoveAll(); + _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 + _tt.SetToolTip(BtUndefinedColor, $"{Ark.UndefinedColorId}: undefined color"); + } + + /// + /// Clears color buttons. Call if color definitions changed, e.g. when a mod with colors is loaded or unloaded. + /// + private void ResetColors() + { + SetUndefinedColorId(); + foreach (Control c in flowLayoutPanel1.Controls) + { + _tt.SetToolTip(c, null); + c.Dispose(); + } + flowLayoutPanel1.Controls.Clear(); + } + + public void PickColor(byte selectedColorId, string headerText, List naturalColors = null, + byte selectedColorIdAlternative = 0, HashSet existingColors = null) + { + flowLayoutPanel1.SuspendDrawing(); + flowLayoutPanel1.SuspendLayout(); + + label1.Text = headerText; + + if (modListHash != values.Values.V.loadedModsHash) + ResetColors(); + modListHash = values.Values.V.loadedModsHash; + + var colors = values.Values.V.Colors.ColorsList; + + if (_buttonSelectedColor != null && _buttonSelectedColor.Status != NoPaddingButton.ColorStatus.None) + { + _buttonSelectedColor.Status = NoPaddingButton.ColorStatus.None; + _buttonSelectedColor.Invalidate(); + } + SelectedColorId = selectedColorId; + SelectedColorIdAlternative = selectedColorIdAlternative; + _naturalColorIDs = naturalColors?.Select(ac => ac.Id).ToArray(); + checkBoxOnlyNatural.Visible = _naturalColorIDs != null; + + const int colorButtonHeight = 24; + + for (int colorIndex = 1; colorIndex < colors.Length; colorIndex++) + { + int controlIndex = colorIndex - 1; + if (flowLayoutPanel1.Controls.Count <= controlIndex) + { + var np = new NoPaddingButton + { + Width = 44, + Height = colorButtonHeight, + Margin = new Padding(0) + }; + np.Click += ColorChosen; + flowLayoutPanel1.Controls.Add(np); + } + + if (flowLayoutPanel1.Controls[controlIndex] is NoPaddingButton bt) + { + var color = colors[colorIndex]; + var colorId = color.Id; + bt.Visible = ColorVisible(colorId); + SetButtonStatus(bt, colorId); + bt.SetBackColorAndAccordingForeColor(color.Color); + bt.Tag = colorId; + bt.Text = colorId.ToString(); + _tt.SetToolTip(bt, colorId + ": " + color.Name); + } + } + + SetButtonStatus(BtNoColor, 0); + BtNoColor.Invalidate(); + SetButtonStatus(BtUndefinedColor, (byte)BtUndefinedColor.Tag); + BtUndefinedColor.Invalidate(); + + void SetButtonStatus(NoPaddingButton bt, byte colorId) + { + bt.Status = NoPaddingButton.ColorStatus.None; + if (SelectedColorId == colorId) + { + _buttonSelectedColor = bt; + bt.Status = NoPaddingButton.ColorStatus.SelectedColor; + } + if (SelectedColorIdAlternative == colorId && colorId != 0) + { + bt.Status |= NoPaddingButton.ColorStatus.SelectedAlternative; + } + if (existingColors != null) + { + if (existingColors.Contains(colorId)) + bt.Status |= NoPaddingButton.ColorStatus.ExistingColor; + else + bt.Status |= NoPaddingButton.ColorStatus.NonExistingColor; + } + } + + var controlHeight = (int)Math.Ceiling(colors.Length / 10d) * colorButtonHeight + 99; + Height = controlHeight; + HeightChanged?.Invoke(controlHeight); + flowLayoutPanel1.ResumeLayout(); + flowLayoutPanel1.ResumeDrawing(); + if (Window != null) + Window.isShown = true; + } + + private bool ColorVisible(byte id) => !checkBoxOnlyNatural.Checked || (_naturalColorIDs?.Contains(id) ?? true); + + /// + /// Color was chosen and saved in the property SelectedColorId. Window then will be hidden. + /// + private void ColorChosen(object sender, EventArgs e) + { + if ((ModifierKeys & Keys.Control) != 0 && LbAlternativeColor.Visible) + { + // only set alternative color + SelectedColorIdAlternative = (byte)((Control)sender).Tag; + + foreach (var ct in flowLayoutPanel1.Controls) + { + if (ct is NoPaddingButton bt) + { + var buttonIsColorAlternative = SelectedColorIdAlternative == (byte)bt.Tag; + if (bt.Status.HasFlag(NoPaddingButton.ColorStatus.SelectedAlternative) != buttonIsColorAlternative) + { + if (buttonIsColorAlternative) + bt.Status |= NoPaddingButton.ColorStatus.SelectedAlternative; + else + bt.Status &= ~NoPaddingButton.ColorStatus.SelectedAlternative; + bt.Invalidate(); + } + } + } + + UserMadeSelection?.Invoke(true); + return; + } + // remove selection around current button + if (_buttonSelectedColor != null) + { + _buttonSelectedColor.Status &= ~NoPaddingButton.ColorStatus.SelectedColor; + _buttonSelectedColor.Invalidate(); + } + + SelectedColorId = (byte)((Button)sender).Tag; + if (sender is NoPaddingButton bts) + { + _buttonSelectedColor = bts; + _buttonSelectedColor.Status |= NoPaddingButton.ColorStatus.SelectedColor; + _buttonSelectedColor.Invalidate(); + } + else + { + _buttonSelectedColor = null; + } + + UserMadeSelection?.Invoke(true); + } + + 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 + { + public ColorStatus Status; + + protected override void OnPaint(PaintEventArgs pe) + { + pe.Graphics.Clear(SystemColors.Control); + + var defaultVisibleRectangle = ClientRectangle; + if (Status.HasFlag(ColorStatus.NonExistingColor)) + defaultVisibleRectangle.Inflate(-6, -6); + else + defaultVisibleRectangle.Inflate(-3, -3); + using (var b = new SolidBrush(BackColor)) + pe.Graphics.FillRectangle(b, defaultVisibleRectangle); + + if (Status.HasFlag(ColorStatus.SelectedColor)) + { + DrawRectangleAroundButton(Color.Black, ClientRectangle); + } + else if (Status.HasFlag(ColorStatus.SelectedAlternative)) + { + DrawRectangleAroundButton(Color.Red, ClientRectangle); + } + else if (Status.HasFlag(ColorStatus.ExistingColor)) + { + DrawRectangleAroundButton(Color.Green, ClientRectangle); + } + + void DrawRectangleAroundButton(Color color, Rectangle rect) + { + using (var p = new Pen(color, 2)) + { + rect.Inflate(-1, -1); + pe.Graphics.DrawRectangle(p, rect); + p.Color = Color.White; + rect.Inflate(-2, -2); + pe.Graphics.DrawRectangle(p, rect); + } + } + + if (string.IsNullOrEmpty(Text)) return; + StringFormat stringFormat = new StringFormat(); + stringFormat.Alignment = StringAlignment.Center; + stringFormat.LineAlignment = StringAlignment.Center; + using (var b = new SolidBrush(ForeColor)) + pe.Graphics.DrawString(Text, Font, b, ClientRectangle, stringFormat); + } + + [Flags] + public enum ColorStatus + { + None = 0, + SelectedColor = 1 << 0, + SelectedAlternative = 1 << 1, + ExistingColor = 1 << 2, + NonExistingColor = 1 << 3 + } + } + } +} 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 000000000..fee2b0e93 --- /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 000000000..e0dc180d6 --- /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 000000000..1af7de150 --- /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 44d5a2dd9..c712bf325 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