diff options
author | frosch <frosch@openttd.org> | 2017-02-26 19:40:53 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2017-02-26 19:40:53 +0000 |
commit | a56e2bccd0bbeac71e3fa4c406ae5ec5f8e578a8 (patch) | |
tree | 921d348a0938d086c0b7036bedc1e84df7264316 /src/script/api/script_error.cpp | |
parent | f4da8ece0ce02d6fe3dac6f8adc147e8a3d095a3 (diff) | |
download | openttd-a56e2bccd0bbeac71e3fa4c406ae5ec5f8e578a8.tar.xz |
(svn r27756) -Codechange: Add StringTab enum
Diffstat (limited to 'src/script/api/script_error.cpp')
-rw-r--r-- | src/script/api/script_error.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/script/api/script_error.cpp b/src/script/api/script_error.cpp index 87647cfe8..b692c74f4 100644 --- a/src/script/api/script_error.cpp +++ b/src/script/api/script_error.cpp @@ -34,15 +34,16 @@ ScriptError::ScriptErrorMapString ScriptError::error_map_string = ScriptError::S { uint index = GetStringIndex(internal_string_id); switch (GetStringTab(internal_string_id)) { - case 26: case 28: case 29: case 30: // NewGRF strings. - return ERR_NEWGRF_SUPPLIED_ERROR; + case TEXT_TAB_NEWGRF1: + case TEXT_TAB_NEWGRF2: + case TEXT_TAB_NEWGRF3: + return ERR_NEWGRF_SUPPLIED_ERROR; // NewGRF strings. - /* DO NOT SWAP case 14 and 4 because that will break StringToError due - * to the index dependency that relies on FALL THROUGHs. */ - case 14: if (index < 0xE4) break; // Player name - case 4: if (index < 0xC0) break; // Town name - case 15: // Custom name - case 31: // Dynamic strings + case TEXT_TAB_SPECIAL: + if (index < 0xE4) break; // Player name + /* FALL THROUGH */ + case TEXT_TAB_TOWN: + if (index < 0xC0) break; // Town name /* These strings are 'random' and have no meaning. * They actually shouldn't even be returned as error messages. */ return ERR_UNKNOWN; |