HomeWildfire Games

Add a couple of string manipulation functions to globalscripts.
AuditedrP21101

Description

Add a couple of string manipulation functions to globalscripts.

(And use them where appropriate.)

Details

Auditors
temple
Committed
s0600204Feb 2 2018, 2:37 AM
Parents
rP21100: Remove dae file from actor folder.
Branches
Unknown
Tags
Unknown
Build Status
Buildable 4793
Build 8309: Post-Commit BuildJenkins

Event Timeline

temple raised a concern with this commit.Mar 5 2018, 9:30 PM
temple added subscribers: bb, temple.
temple added inline comments.
/ps/trunk/binaries/data/mods/public/globalscripts/Templates.js
531–539

In light of the other two comments, it doesn't seem we need this function (at least at this point in time).

/ps/trunk/binaries/data/mods/public/simulation/components/BuildRestrictions.js
236

Since preview merges BuildRestrictions and Identity I think we can just use templateName? (D276)

/ps/trunk/binaries/data/mods/public/simulation/components/SkirmishReplacer.js
38–39

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?

This commit now has outstanding concerns.Mar 5 2018, 9:30 PM
s0600204 added inline comments.
/ps/trunk/binaries/data/mods/public/globalscripts/Templates.js
531–539

It's used in the template viewer (which was committed after this, thus doesn't appear in this commit).

/ps/trunk/binaries/data/mods/public/simulation/components/BuildRestrictions.js
236

That's more a question for the author/reviewers of D276 (Pinging @Grugnas (author), @bb (accepter))

/ps/trunk/binaries/data/mods/public/simulation/components/SkirmishReplacer.js
38–39

Well spotted. Should be fixed in rP21537.

temple accepted this commit.Mar 13 2018, 9:38 PM

Thanks.

All concerns with this commit have now been addressed.Mar 13 2018, 9:38 PM