@@ -757,25 +757,25 @@ bool IsEngineBuildable(EngineID engine,
/* check if it's an engine that is in the engine array */
if (e == NULL) return false;
/* check if it's an engine of specified type */
if (e->type != type) return false;
/* check if it's available */
if (!HasBit(e->company_avail, company)) return false;
if (type == VEH_TRAIN) {
/* Check if the rail type is available to this company */
const Company *c = Company::Get(company);
if (!HasBit(c->avail_railtypes, RailVehInfo(engine)->railtype)) return false;
if (((GetRailTypeInfo(RailVehInfo(engine)->railtype))->compatible_railtypes & c->avail_railtypes) == 0) return false;
}
return true;
/**
* Check if an engine is refittable.
* Note: Likely you want to use IsArticulatedVehicleRefittable().
* @param engine index of the engine to check.
* @return true if the engine is refittable.
*/
bool IsEngineRefittable(EngineID engine)
Status change: