Add: CommandCost supports an optional second error string

This commit is contained in:
Tyler Trahan
2018-11-19 18:59:25 +00:00
parent e3169c73bd
commit 44848f4edf
6 changed files with 70 additions and 21 deletions

View File

@@ -259,7 +259,7 @@ void CommandHelperBase::InternalPostResult(const CommandCost &res, TileIndex til
if (res.Failed()) {
/* Only show the error when it's for us. */
if (estimate_only || (IsLocalCompany() && err_message != 0 && my_cmd)) {
ShowErrorMessage(err_message, res.GetErrorMessage(), WL_INFO, x, y, res.GetTextRefStackGRF(), res.GetTextRefStackSize(), res.GetTextRefStack());
ShowErrorMessage(err_message, x, y, res);
}
} else if (estimate_only) {
ShowEstimatedCostOrIncome(res.GetCost(), x, y);