(svn r23615) -Add: more API functions exposed to NoGo (part 2)

This commit is contained in:
truebrain
2011-12-19 20:57:34 +00:00
parent 436cf09923
commit 9359c6fc47
49 changed files with 914 additions and 46 deletions

View File

@@ -996,11 +996,11 @@ bool IsEngineBuildable(EngineID engine, VehicleType type, CompanyID company)
if (e->type != type) return false;
/* check if it's available */
if (!HasBit(e->company_avail, company)) return false;
if (company != OWNER_DEITY && !HasBit(e->company_avail, company)) return false;
if (!e->IsEnabled()) return false;
if (type == VEH_TRAIN) {
if (type == VEH_TRAIN && company != OWNER_DEITY) {
/* Check if the rail type is available to this company */
const Company *c = Company::Get(company);
if (((GetRailTypeInfo(e->u.rail.railtype))->compatible_railtypes & c->avail_railtypes) == 0) return false;