* Get the amount of money that a company has available, or INT64_MAX * if there is no such valid company. * * @param company Company to check * @return The available money of the company or INT64_MAX */
| 236 | * @return The available money of the company or INT64_MAX |
| 237 | */ |
| 238 | Money GetAvailableMoney(CompanyID company) |
| 239 | { |
| 240 | if (_settings_game.difficulty.infinite_money) return INT64_MAX; |
| 241 | if (!Company::IsValidID(company)) return INT64_MAX; |
| 242 | return Company::Get(company)->money; |
| 243 | } |
| 244 | |
| 245 | /** |
| 246 | * This functions returns the money which can be used to execute a command. |
no outgoing calls
no test coverage detected