OpenTTD / OpenTTD

OpenTTD is an open source simulation game based upon Transport Tycoon Deluxe
https://www.openttd.org/
Other
6.02k stars 843 forks source link

Fix #12594: Give descriptive error when company takeover fails due to vehicle limit #12676

Closed 2TallTyler closed 2 weeks ago

2TallTyler commented 2 weeks ago

Motivation / Problem

As per #12594, company takeovers that fail due to vehicle limit do not explain why beyond an error, "Can't buy company..."

Description

Clarify the reason with an existing error string and clarify the comment. Despite its broad name, MayCompanyTakeOver() only checks vehicle limits.

Closes #12594.

Limitations

Does not strictly need backporting, but no languages are changed so I don't see a reason to exclude it.

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.