Skip to content

Commit

Permalink
added setting for naming-pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
cadaei committed May 12, 2017
1 parent 03ca2f3 commit 334ea8e
Show file tree
Hide file tree
Showing 6 changed files with 672 additions and 626 deletions.
6 changes: 3 additions & 3 deletions ARKBreedingStats/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@
<setting name="ocrFile" serializeAs="String">
<value>json/ocr.json</value>
</setting>
<setting name="waitBeforeScreenCapture" serializeAs="String">
<value>500</value>
</setting>
<setting name="sequentialUniqueNamePattern" serializeAs="String">
<value>{species} {sex_short}{n}</value>
</setting>
<setting name="waitBeforeScreenCapture" serializeAs="String">
<value>500</value>
</setting>
</ARKBreedingStats.Properties.Settings>
</userSettings>
</configuration>
2 changes: 1 addition & 1 deletion ARKBreedingStats/CreatureInfoInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ private void btnGenerateUniqueName_Click(object sender, EventArgs e)
{ "sex", CreatureSex.ToString() },
{ "sex_short", CreatureSex.ToString().Substring(0, 1) }
};
var r = new Regex("\\{(?<key>" + string.Join("|", tokendict.Keys.Select(x => Regex.Escape(x))) + ")\\}",
var r = new Regex("\\{(?<key>" + string.Join("|", tokendict.Keys.Select(x => Regex.Escape(x))) + ")\\}",
RegexOptions.IgnoreCase | RegexOptions.Singleline | RegexOptions.ExplicitCapture);
var pattern = r.Replace(Properties.Settings.Default.sequentialUniqueNamePattern, (m) =>
{
Expand Down
5 changes: 4 additions & 1 deletion ARKBreedingStats/Values.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ public bool loadValues()
{
_V.version = new Version(_V.ver);
}
catch { }
catch
{
_V.version = new Version(0, 0);
}
_V.speciesNames = new List<string>();
foreach (Species sp in _V.species)
{
Expand Down
2 changes: 1 addition & 1 deletion ARKBreedingStats/json/values.json

Large diffs are not rendered by default.

Loading

0 comments on commit 334ea8e

Please sign in to comment.