Page MenuHomeWildfire Games

Merge entity templates
ClosedPublic

Authored by Nescio on Jan 6 2019, 11:25 AM.

Details

Summary

template_entity_full.xml and template_entity_quasi.xml are two small, virtually identical files, both with only two children each:

  • template_formation.xml and template_rubble.xml have no parent
  • template_gaia.xml and template_trigger_point.xml inherit from template_entity_quasi.xml
  • template_structure.xml and template_unit.xml inherit from template_entity_full.xml

The above is not reflected in the template file names. Because both entity files are only about a dozen lines long, it makes sense to deprecate them and merge the relevant lines into their respective children.

Test Plan

Probably unproblematic, but check nevertheless.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Nescio created this revision.Jan 6 2019, 11:25 AM
Vulcan added a subscriber: Vulcan.Jan 6 2019, 11:47 AM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/930/

Stan added a comment.Jan 7 2019, 11:24 AM

I've never been confident with this so I need a second opinion maybe @elexis ?

elexis added a comment.Jan 7 2019, 1:52 PM

quasi and full aren't really descriptive. Bit more duplication, but doesn't seem that bad, in particular because the parent doesn't have a clear definition indicating its use. Otherwise, otherperson is betterperson to ask.

Stan accepted this revision.Jan 15 2019, 9:43 PM
This revision is now accepted and ready to land.Jan 15 2019, 9:43 PM
This revision was automatically updated to reflect the committed changes.

Perhaps one could have taken the opportunity to explain where did it come from.
Basically, it had code implications and wasn't only cosmetic (a long time ago).

Stan added a comment.Jan 20 2019, 5:08 PM

Feel free to share your endless knowledge on the question, my dear friend.

If I ask, it's that I don't know.

Stan added a comment.Jan 20 2019, 5:20 PM

Ah... shirt.

In D1734#70653, @Stan wrote:

Ah... shirt.

I don't understand what it means.
To rephrase what I said in my post, it was the occasion to discuss about the origin of those templates. Knowing the whole history of this code and discussing it is interesting , isn't it?

Stan added a comment.Jan 20 2019, 5:52 PM

Of course you said it had deeper meaning in the code so I had assumed you had a hint.

Shirt is just my way to swear it replaces another word.

smiley added a subscriber: smiley.Jan 20 2019, 5:54 PM

*commit archeology intensifies*

The answer may very well be in the script "source/tools/entconvert/entconvert.pl"
I didn't care enough to read the thing to figure out what it did exactly. But I guess it was used to convert templates from the old simulation system to the new one.

In D1734#70655, @Stan wrote:

Of course you said it had deeper meaning in the code so I had assumed you had a hint.

Shirt is just my way to swear it replaces another word.

Ah I thought it was an idiom and was looking for it in the whole internet :-)
About hints: the treasure is not the one we look for when we till the field, it's tilling.

the treasure is not the one we look for when we till the field, it's tilling.

Serendipity?

In D1734#70659, @Nescio wrote:

Serendipity?

Yes!