Skip to content

Commit

Permalink
Trim quotes from ability value strings (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekolis committed Mar 12, 2023
1 parent c7415f6 commit 3496eea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions FrEee/Modding/Field.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using FrEee.Game.Interfaces;
using FrEee.Game.Interfaces;
using FrEee.Utility.Extensions;
using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -78,9 +78,9 @@ public Formula<T> CreateFormula<T>(object context)
var replacedText = txt;
replacedText = "'" + replacedText + "'"; // make it a string
replacedText = replacedText.Replace("{{", "' + str(");
replacedText = replacedText.Replace("}}", ") + '");
replacedText = replacedText.Replace("}}", ").strip('\"') + '"); // strip to trim start/end quotes that get added by str
replacedText = replacedText.Replace("{", "' + str(");
replacedText = replacedText.Replace("}", ") + '");
replacedText = replacedText.Replace("}", ").strip('\"') + '");
return new ComputedFormula<T>(replacedText, context, isDynamic);
}
return new LiteralFormula<T>(txt);
Expand Down Expand Up @@ -261,4 +261,4 @@ public override string ToString()
return Name + " := " + Value;
}
}
}
}

0 comments on commit 3496eea

Please sign in to comment.