Add support for adding a third error line to the error GUI

Add support for a second error string ID to CommandCost
This commit is contained in:
Jonathan G Rennison
2018-11-19 18:59:25 +00:00
parent 6df12e77b6
commit 989577d40c
4 changed files with 56 additions and 8 deletions

View File

@@ -785,7 +785,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac
/* Only show the error when it's for us. */
StringID error_part1 = GB(cmd, 16, 16);
if (estimate_only || (IsLocalCompany() && error_part1 != 0 && my_cmd)) {
ShowErrorMessage(error_part1, res.GetErrorMessage(), WL_INFO, x, y, res.GetTextRefStackGRF(), res.GetTextRefStackSize(), res.GetTextRefStack());
ShowErrorMessage(error_part1, res.GetErrorMessage(), WL_INFO, x, y, res.GetTextRefStackGRF(), res.GetTextRefStackSize(), res.GetTextRefStack(), res.GetExtraErrorMessage());
}
} else if (estimate_only) {
ShowEstimatedCostOrIncome(res.GetCost(), x, y);