src/order_cmd.cpp
changeset 6206 67358999d80d
parent 6173 c6cf6600a82c
child 6254 abc6ad7c035c
child 6357 a09d43cd3e6c
equal deleted inserted replaced
6205:d1d1b0d60fed 6206:67358999d80d
   158  * another order gets added), but assume the player will notice the problems,
   158  * another order gets added), but assume the player will notice the problems,
   159  * when (s)he's changing the orders.
   159  * when (s)he's changing the orders.
   160  */
   160  */
   161 static void DeleteOrderWarnings(const Vehicle* v)
   161 static void DeleteOrderWarnings(const Vehicle* v)
   162 {
   162 {
   163 	DeleteVehicleNews(v->index, STR_TRAIN_HAS_TOO_FEW_ORDERS  + (v->type - VEH_Train) * 4);
   163 	DeleteVehicleNews(v->index, STR_TRAIN_HAS_TOO_FEW_ORDERS  + v->type * 4);
   164 	DeleteVehicleNews(v->index, STR_TRAIN_HAS_VOID_ORDER      + (v->type - VEH_Train) * 4);
   164 	DeleteVehicleNews(v->index, STR_TRAIN_HAS_VOID_ORDER      + v->type * 4);
   165 	DeleteVehicleNews(v->index, STR_TRAIN_HAS_DUPLICATE_ENTRY + (v->type - VEH_Train) * 4);
   165 	DeleteVehicleNews(v->index, STR_TRAIN_HAS_DUPLICATE_ENTRY + v->type * 4);
   166 	DeleteVehicleNews(v->index, STR_TRAIN_HAS_INVALID_ENTRY   + (v->type - VEH_Train) * 4);
   166 	DeleteVehicleNews(v->index, STR_TRAIN_HAS_INVALID_ENTRY   + v->type * 4);
   167 }
   167 }
   168 
   168 
   169 
   169 
   170 /** Add an order to the orderlist of a vehicle.
   170 /** Add an order to the orderlist of a vehicle.
   171  * @param tile unused
   171  * @param tile unused
  1003 		if (n_st < 2 && problem_type == -1) problem_type = 0;
  1003 		if (n_st < 2 && problem_type == -1) problem_type = 0;
  1004 
  1004 
  1005 		/* We don't have a problem */
  1005 		/* We don't have a problem */
  1006 		if (problem_type < 0) return;
  1006 		if (problem_type < 0) return;
  1007 
  1007 
  1008 		message = STR_TRAIN_HAS_TOO_FEW_ORDERS + ((v->type - VEH_Train) << 2) + problem_type;
  1008 		message = STR_TRAIN_HAS_TOO_FEW_ORDERS + (v->type << 2) + problem_type;
  1009 		//DEBUG(misc, 3, "Triggered News Item for vehicle %d", v->index);
  1009 		//DEBUG(misc, 3, "Triggered News Item for vehicle %d", v->index);
  1010 
  1010 
  1011 		SetDParam(0, v->unitnumber);
  1011 		SetDParam(0, v->unitnumber);
  1012 		AddNewsItem(
  1012 		AddNewsItem(
  1013 			message,
  1013 			message,