(svn r11287) -Codechange: add support for pushing paramaters into NewIndustries' error messages. Patch by Csaboka.

This commit is contained in:
rubidium
2007-10-17 20:09:16 +00:00
parent 5e347f80e1
commit e21b7634bf
6 changed files with 68 additions and 22 deletions

View File

@@ -458,6 +458,11 @@ bool CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, uint itspe
* the building of the industry, as that's how it's done in TTDP. */
if (group == NULL || group->type != SGT_CALLBACK) return true;
/* Copy some parameters from the registers to the error message text ref. stack */
SwitchToErrorRefStack();
PrepareTextRefStackUsage(4);
SwitchToNormalRefStack();
switch (group->g.callback.result) {
case 0x400: return true;
case 0x401: _error_message = STR_0239_SITE_UNSUITABLE; break;