Page MenuHomeWildfire Games

Civ:gaia template clear-up
ClosedPublic

Authored by Stan on Oct 2 2018, 7:45 PM.

Details

Reviewers
asterix
Nescio
Summary

Instead of adding <Civ>gaia</Civ> in numerous templates (not always consistently), it makes far more sense to define it only in the first parent. With this patch the Civ:gaia is present only in the following templates:

  • template_gaia.xml
  • template_structure.xml
  • template_unit.xml
  • special/spy.xml

And it's removed from all their descendents.

Test Plan

Effectively nothing should be changed

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 6379
Build 10574: Vulcan BuildJenkins
Build 10573: arc lint + arc unit

Event Timeline

Nescio created this revision.Oct 2 2018, 7:45 PM
Vulcan added a subscriber: Vulcan.Oct 2 2018, 7:50 PM

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

Link to build: https://jenkins.wildfiregames.com/job/differential/738/display/redirect

lyv awarded a token.Oct 2 2018, 8:15 PM
asterix accepted this revision.Oct 3 2018, 10:57 AM
asterix added a subscriber: asterix.

This proposal makes sense so I accept, however, there might be in campaigns or Hyrule Conquest mod or other similar mod a problem with a variety of combinations of unusual characters and their behavior.

This revision is now accepted and ready to land.Oct 3 2018, 10:57 AM
elexis added a comment.Oct 3 2018, 4:15 PM

This proposal makes sense so I accept

By accepting a patch you imply that the patch implements the proposal, has no bugs, is complete and the best solution for the claimed problem.
But how do you know that the patch implements the proposal if you didn't open the parent template templates?
How do you know that this patch isn't going to create a bug if you didn't test it?
How do you know it's complete if you didn't search the xml files for gaia?
How do you know it's the best implementation if you didn't explore and evaluate alternatives?
Those are at least the questions one has to answer when one wants to commit a patch to the repository without wanting to revert or fix it in a second commit later or possibly even leave the program with a regression.
How do we know that you checked these points if you didn't post it?

Nescio added a comment.Oct 3 2018, 5:23 PM

It works fine on my end without any errors or warnings, and I did a grep, but I'm the author, so reviewers shouldn't believe me, and test for themselves.

As for the parent template templates, template_gaia.xml ( https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/templates/template_gaia.xml ) and special/spy.xml (not sure if this is really necessary, but I suppose it doesn't hurt) already have <Civ>gaia</Civ> and this patch adds it to template_structure.xml and template_unit.xml. The only issue I can think of is that it solves the "no civ" warnings if a mod adds structures or units but omits defining a civ.

This proposal makes sense so I accept, however, there might be in campaigns or Hyrule Conquest mod or other similar mod a problem with a variety of combinations of unusual characters and their behavior.

Actually I highly doubt it would break any mods, but please check yourself.

lyv added a subscriber: lyv.Oct 3 2018, 7:23 PM

(It would be cool to have a script which dumps all templates after inheriting and stuff)
(parts of templateanalyzer could be used as well, if anyone got the time and will)

Stan accepted this revision.Dec 29 2018, 1:07 PM

So I made a little C# script that checked all those files and confirmed they had no parents with Civ gaia. Checking for completeness is not really useful as it would make the commit bigger than it already is plus there is D1523 that will take care of animals, which are missing in that patch.

Stan added a comment.Dec 29 2018, 1:13 PM

fixed in rP21975 I think I killed the bot, can you close this one as well ?

Stan commandeered this revision.Dec 29 2018, 4:52 PM
Stan closed this revision.
Stan edited reviewers, added: Nescio; removed: Stan.