FS#6631 - In singleplayer, you cannot buyout one human-player company as another.

Attached to Project: OpenTTD
Opened by James (james1101) - Sunday, 29 October 2017, 23:39 GMT
Type Bug
Category Core
Status New
Assigned To No-one
Operating System Windows
Severity Low
Priority Normal
Reported Version 1.7.1
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


To Reproduce:
1. Launch OpenTTD. Start multiplayer game.
2. Create 2 companies of the 'Human Player' type.
3. Save the game in multiplayer.
4. Load the game in singleplayer.
5. Make sure...
- that Company #1 has enough money to buyout Company #2 (use money cheat if needed),
- both companies are at least 6 years old (use date cheat if needed), and
- the setting "Allow buying shares" under "Competitors" is set to true.
6. BUG: In singleplayer, Attempt to buyout Company #2 as Company #1. This will fail at 75% progress, with no error message and a greyed out "Buy Share" button. (see attached image)
Suggested Fix: When loading a multiplayer save in singleplayer (defined as a save with multiple human-player companies), convert all of the human player companies (except Company #1) to dummy AI companies. AI companies can be completely bought, while human-player companies cannot be completely bought.
This task depends upon