3 | | testing: |
4 | | - global function works as expected in all cases I test for the moment |
5 | | - in game test passed for struct tree, sim, tooltips, pair techs, replacement techs |
6 | | |
7 | | code: |
8 | | |
9 | | I am still reviewing it, it takes time! |
10 | | On formal stuff |
11 | | - I try to find how to avoid a simple way to get the value of object with only key but I didn't succeed. A solution would be to use { "op": op, "value": value } for reqs directly in json tech files but I don't think it's wanted. (it would simplify many stuff). |
| 3 | - I have a fail |
| 4 | `template.requirements = { "all": [{ "tech": "phase_town" }, { "notciv": "maur" }, { "notciv": "spart" }] };` |
| 5 | is parsed correctly but not |
| 6 | `template.requirements = { "all": [{ "tech": "phase_town" }, { "all": [{ "notciv": "maur" }, { "notciv": "spart" }] }] }` |
| 7 | Indeed the second way of write it is clumsy, but if we don't want to support such stuff, we should say it. |