File diff r25654:e264fd698eb2 → r25655:1030dcb7eb52
src/script/api/script_rail.cpp
Show inline comments
 
@@ -195,7 +195,7 @@
 
		int index = 0;
 
		const StationSpec *spec = StationClass::GetByGrf(file->grfid, res, &index);
 
		if (spec == nullptr) {
 
			DEBUG(grf, 1, "%s returned an invalid station ID for 'AI construction/purchase selection (18)' callback", file->filename);
 
			Debug(grf, 1, "{} returned an invalid station ID for 'AI construction/purchase selection (18)' callback", file->filename);
 
		} else {
 
			/* We might have gotten an usable station spec. Try to build it, but if it fails we'll fall back to the original station. */
 
			if (ScriptObject::DoCommand(tile, p1, p2 | spec->cls_id | index << 8, CMD_BUILD_RAIL_STATION)) return true;