FS#6416 - Add option to ignore local authorities opinion

Attached to Project: OpenTTD
Opened by Milek7 (Milek7) - Wednesday, 27 January 2016, 16:44 GMT
Last edited by Alberth (Alberth) - Sunday, 28 February 2016, 08:50 GMT
Type Patch
Category Core
Status New
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


Patch for trunk in attachment
This task depends upon

Comment by Milek7 (Milek7) - Wednesday, 27 January 2016, 17:05 GMT
fixed indentation and added some comments
Comment by frosch (frosch) - Wednesday, 27 January 2016, 18:26 GMT
Why are you adding a new setting instead of using the existing "town council attitude" one?
(Current values: permissive, tolerant, hostile; new value: submissive/cheating)

What is the meaning of the existing one, when disabling via the new setting?
Comment by Milek7 (Milek7) - Wednesday, 27 January 2016, 19:13 GMT
It was just easier to add this, and I do not want to mess with other code. With this setting the rating calculation stays working, but it is not checked when destroying/building station. When adding an extra option to "town council attitude" it should completlely remove rating calculation, visiblity in "Local authorities" window and bribing function.

If it is important to not add new setting, i can submit new patch.
Comment by Alberth (Alberth) - Sunday, 28 February 2016, 08:37 GMT
It's not just important, it's a hard requirement. New code must be fully integrated into the code base.

You don't want to have multiple settings to achieve one thing (eventually leading to set this option to "yes", that one to "ignore other one", and the the third one to "yes").
Comment by Milek7 (Milek7) - Sunday, 28 February 2016, 11:00 GMT
No, this patch don't make multiple settings to achieve one thing. It disables blocking capabilities of local authority, but no whole rating calculation.
Copy-paste from irc:
<Milek7> while disabling rating calculation, what value use in GSTown.GetRating?
<Milek7> ignoring don't breaks anything, disabling can broke something relying on that
<Milek7> and it even shouldn't be disabled, because gamescript using town rating to calculate growth is very good
<Milek7> but this patch is for that local authority can't block building/destroying
<Milek7> not disabling rating completly
Comment by dP (_dp_) - Sunday, 28 February 2016, 13:51 GMT
I think main source of confusion here is that town_council_tolerance affects multiple things:
1) Max town noise level
2) Speed of noise level reduction with distance
3) Min rating required for demolishing stuff in town
Also, notably, it does NOT affect
4) Town rating calculation (and thus cb scripts)
5) Min rating for placing stations (that's always RATING_VERYPOOR)

And main issue with authority rating is it's blocking behavior (3 and 5).
So I'd suggest splitting airport noise in separate setting and making tolerance affect station placement.
That way adding ignorant/cheating attitude will allow to disable blocking aspect without breaking anything else.
Comment by dP (_dp_) - Sunday, 28 February 2016, 14:08 GMT
Oh, and also ignoring 3 should be removed from magic bulldozer effects imo if this is implemented.