Changes between Version 1 and Version 2 of Ticket #4263, comment 10


Ignore:
Timestamp:
Dec 29, 2016, 10:22:07 PM (7 years ago)
Author:
fatherbushido

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4263, comment 10

    v1 v2  
    1 Review of the non ai part (will be edited continuously):
     1(- 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).)
    22
    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" }] };`
     5is parsed correctly but not
     6`template.requirements = { "all": [{ "tech": "phase_town" }, { "all": [{ "notciv": "maur" }, { "notciv": "spart" }] }] }`
     7Indeed the second way of write it is clumsy, but if we don't want to support such stuff, we should say it.