ekolis / stars-nova

Clone of the classic 4X game Stars!. Fork of original svn repo on SourceForge.
Other
17 stars 6 forks source link

Racial tech is actually global #7

Open marhawkman opened 4 years ago

marhawkman commented 4 years ago

Describe the bug Items that should be racial tech are available to all races

To Reproduce In this example I managed to simultaneously research Croby Sharmor(an Inner Strength tech) and Shadow Shield(Super Stealth) simultaneously, but it seems to apply to all racial tech as in the menus I also have Heavy mines(Space Demolition) and Super Mass drivers(Packet Physics) racetechc

Expected behavior racial tech is for those races only

Actual behavior everyone seems to get racial tech(Note only components, not ship hulls)

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

marhawkman commented 4 years ago

on second thought I think I am getting some of the racial tech hulls too, it might be certain races affected. IE everyone gets Inner Strength tech, rather than components.

marhawkman commented 4 years ago

Ok, I looked again and realized I also have techs that require minor traits.

In my current test game I'm playing Inner Strength I can use in designs: Depleted Neutronium(Super Stealth), Orbital adjustors(Claim Adjustor), Heavy Mines(Space Demolition), Stargate Any/300(Interstellar Traveller). Also I don't have advanced remote mining or improved starbases but have those techs available anyways.

ekolis commented 4 years ago

Yeah, I think this and #18 are related - there's a bug in the tech requirements code that causes it to think you are unlocking tech you don't actually have, and another bug there where it completely ignores racial traits. I'd fix these bugs but I created a unit test because the logic is kind of tricky and I want to get it right, and the unit tests won't run for some reason...