summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-05-22 11:53:54 +0000
committerfrosch <frosch@openttd.org>2010-05-22 11:53:54 +0000
commit557c3f7daadd604dbed9b7c6ae290a76eeeb2458 (patch)
tree1037f6b083566933a16c4b2d91608b5635428979 /src
parent9f15e284609494e4b42d39bf51d912dadefb6849 (diff)
downloadopenttd-557c3f7daadd604dbed9b7c6ae290a76eeeb2458.tar.xz
(svn r19879) -Codechange: Also hide invalid engines from purchase lists.
Diffstat (limited to 'src')
-rw-r--r--src/engine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index e0611eccb..0d9371f28 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -821,6 +821,8 @@ bool IsEngineBuildable(EngineID engine, VehicleType type, CompanyID company)
/* check if it's available */
if (!HasBit(e->company_avail, company)) return false;
+ if (e->info.string_id == STR_NEWGRF_INVALID_ENGINE) return false;
+
if (type == VEH_TRAIN) {
/* Check if the rail type is available to this company */
const Company *c = Company::Get(company);