Add auto repay/take functionality for loans.
Motivation / Problem
Founding new company can be boring. While in single player there is speed up button it is not available in multiplayer, therefore players leave running company and go afk in order to collect funds for expansion. In that time they are paying interest even after own funds have become positive.
Description
Adds "Auto Repay" toggle to Finances window. Loans are auto repaid before interest is calculated if the toggle is lowered. Toggle is raised whenever Borrow button has been pressed.
Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.
- The bug fix is important enough to be backported? (label: 'backport requested')
- This PR touches english.txt or translations? Check the guidelines
- This PR affects the GS/AI API? (label 'needs review: Script API')
- ai_changelog.hpp, game_changelog.hpp need updating.
- The compatibility wrappers (compat_*.nut) need updating.
- This PR affects the NewGRF API? (label 'needs review: NewGRF')
- newgrf_debug_data.h may need updating.
- PR must be added to API tracker
No strong opinion either way, but, as auto-renew vehicles is a setting, auto-repay loans seems like a reasonable setting. OTOH, are more settings wanted.
I don't think the game needs a feature designed to help players to not play. It's so easy to make money in openttd, it would be much better for new players to spend that wait analyzing their mistakes. So they can start faster next time instead of going afk.
Tyler's proposal is a bit better as repaying the loan once you're swimming in money makes sense for every player. But honestly, loan is so insignificant already, if you don't want to micro-manage it just remove it completely.
After further consideration, the Tyler's proposal could be made as a GS with the current API. The problem arises in the lack of feature allowing to use more than one game script, therefore such feature would need to be contained as an library that would be used by GS authors. Additionally game scripts are more like a niche tool used by less that 10% of the players (25% for JGRPP).
I don't think this is a useful thing to do. Players should just manually manage their loan.