Add a couple of string manipulation functions to globalscripts.
(And use them where appropriate.)
In light of the other two comments, it doesn't seem we need this function (at least at this point in time).
Since preview merges BuildRestrictions and Identity I think we can just use templateName? (D276)
This isn't equivalent to the old code. (E.g. starting women on Survival of the Fittest weren't getting the undeletable filter.)
let specialFilters = templateName.split("|").slice(0, -1).join("|") + "|";
The old way seems nicer than this?
It's used in the template viewer (which was committed after this, thus doesn't appear in this commit).
That's more a question for the author/reviewers of D276 (Pinging @Grugnas (author), @bb (accepter))
Well spotted. Should be fixed in rP21537.
Thanks.