Page MenuHomeWildfire Games

Test for phase techs' tech requirements in Structure Tree
ClosedPublic

Authored by s0600204 on May 14 2017, 10:06 PM.

Details

Summary

A bug revealed by rP19569, the tech requirements of phase techs are not checked in the structree.

Thus, the civic centres of all civs currently have the athen-specific and the generic phase techs listed side-by-side.

This patch resolves that.

Test Plan

Run 0ad and open the structree. Each civ centre should now have the correct phase techs displayed, and only the correct phase techs displayed.

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

s0600204 created this revision.May 14 2017, 10:06 PM
elexis accepted this revision.May 14 2017, 11:33 PM

This is correct, because reqs is assigned the return value of DeriveTechnologyRequirements which returns the value of InterpretTechRequirements which is false if the civ cannot research the tech.
Thanks to #3993 this was quick to lookup and we didn't have to deal with specific AI or tech tree parsing code :-)
This extension should also make the tech tree more suitable to mods.

This revision is now accepted and ready to land.May 14 2017, 11:33 PM

Great patch, I'm working on the tree right now and this solved one of my problems.

Vulcan added a subscriber: Vulcan.May 15 2017, 12:46 AM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/1204/ for more details.

This revision was automatically updated to reflect the committed changes.