diff options
author | rubidium <rubidium@openttd.org> | 2007-10-17 20:09:16 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-10-17 20:09:16 +0000 |
commit | e21b7634bfbe680308344afe04e070ce91356754 (patch) | |
tree | 56fa2e827c98faaabb1202da34159d2fe15e61db /src/newgrf_industrytiles.cpp | |
parent | 5e347f80e1aa9ad6a4e8bee0a983701841eb5329 (diff) | |
download | openttd-e21b7634bfbe680308344afe04e070ce91356754.tar.xz |
(svn r11287) -Codechange: add support for pushing paramaters into NewIndustries' error messages. Patch by Csaboka.
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r-- | src/newgrf_industrytiles.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index f090d12c5..ae69591d5 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -265,6 +265,11 @@ bool PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind_tile, return callback_res != 0; } + /* Copy some parameters from the registers to the error message text ref. stack */ + SwitchToErrorRefStack(); + PrepareTextRefStackUsage(4); + SwitchToNormalRefStack(); + switch (callback_res) { case 0x400: return true; case 0x401: _error_message = STR_0239_SITE_UNSUITABLE; return false; |