Follow-up Comment #6, patch #4401 (project freeciv):

Given the comments earlier on this patch, and some in other bugs and patches,
I think nobody picked it up when I stopped working on it (although Marko
kindly did a bunch of cleanup where I left things broken or inconsistent).

At least last year, there were semantic differences (especially surrounding
things like is_effect_disabled() and is_effect_useful(), and within
adv_data_city_impr_calc()).  The ruleset cache object is also a bit awkward:
there's assumptions built into the code that uses that, and it wasn't clear to
me whether some of the behaviours related to inconsistencies there were
intentional or accidental (e.g. that the AI apparently didn't check nreqs in
some places was because of optimisation involving the ruleset cache or early
calls to is_effect_disabled()).

While I believe this remains a worthwhile project, in the interest of
unification, it's probably better to just have all new things use the
interfaces from requirements.h, and maybe add some callback iterators for
common cases (e.g. review a requirements vector, and if a requirement matches
a given pattern, adjust some variable).  Making this more robust, and able to
handle things more generally would considerably ease the effort to adjust the
effects later.  Also, there's some stuff that would just be nice, like
something equivalent to get_effect_req_text() for the vectorised requirements.


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to