Feature: Infinite money mode (#11902)

This commit is contained in:
merni-ns
2024-01-30 23:31:02 +05:30
committed by GitHub
parent 7acf78964f
commit 5a88027a19
15 changed files with 63 additions and 27 deletions

View File

@@ -161,21 +161,6 @@ bool IsCommandAllowedWhilePaused(Commands cmd)
return _game_mode == GM_EDITOR || command_type_lookup[_command_proc_table[cmd].type] <= _settings_game.construction.command_pause_level;
}
/*!
* This functions returns the money which can be used to execute a command.
* This is either the money of the current company or INT64_MAX if there
* is no such a company "at the moment" like the server itself.
*
* @return The available money of a company or INT64_MAX
*/
Money GetAvailableMoneyForCommand()
{
CompanyID company = _current_company;
if (!Company::IsValidID(company)) return INT64_MAX;
return Company::Get(company)->money;
}
/**
* Prepare for calling a command proc.
* @param top_level Top level of command execution, i.e. command from a command.