lack of City_Vision_Radius_Sq effect with no reqs causes assert errors
We can't enforce this in (d3f) S3_0, as there are legal configurations where the "base" effect is needed - anything where there's parallel effects with such requirements that one of them is always active.
In S3_1 we can still declare requirement for base effect part of the format -> making this an S3_1-d3f issue.
At least for the implementation I have in mind, fixing #44371 is a dependency.
Attached patches do not check against the provided base effect having value 0 (or even negative one). If the ruleset author adds such a thing, they at least do it intentionally, and have nobody else to than themselves to blame if it bites them. It can even be handy as a temporary solution in migrating the ruleset from old format to the new.
We may turn that check stricter in the later versions.
In S3_1 version sanity_check_ruleset_data() uses compat without checking against if it's NULL, and there is a call with NULL compat.
Reply To cazfi
In S3_1 version sanity_check_ruleset_data() uses compat without checking against if it's NULL, and there is a call with NULL compat.
Fixed
- Corrections to a comment
If ruleset file effects.ruleset does not contain a City_Vision_Radius_Sq effect with no reqs, get assert errors. Should have ruleset loading time sanity check for this. See forum thread http://forum.freeciv.org/f/viewtopic.php?f=11&p=104769