src/order_cmd.cpp
changeset 7545 9a4834d48970
parent 7476 7f086e4b2a76
child 7887 5740662fc5ce
equal deleted inserted replaced
7544:74528540f256 7545:9a4834d48970
    16 #include "player.h"
    16 #include "player.h"
    17 #include "news.h"
    17 #include "news.h"
    18 #include "saveload.h"
    18 #include "saveload.h"
    19 #include "vehicle_gui.h"
    19 #include "vehicle_gui.h"
    20 #include "cargotype.h"
    20 #include "cargotype.h"
       
    21 #include "strings.h"
    21 
    22 
    22 /**
    23 /**
    23  * Called if a new block is added to the order-pool
    24  * Called if a new block is added to the order-pool
    24  */
    25  */
    25 static void OrderPoolNewBlock(uint start_item)
    26 static void OrderPoolNewBlock(uint start_item)
   972 
   973 
   973 	/* Safe custom string, if any */
   974 	/* Safe custom string, if any */
   974 	if (!IsCustomName(v->string_id)) {
   975 	if (!IsCustomName(v->string_id)) {
   975 		bak->name[0] = '\0';
   976 		bak->name[0] = '\0';
   976 	} else {
   977 	} else {
   977 		GetName(bak->name, v->string_id & 0x7FF, lastof(bak->name));
   978 		SetDParam(0, v->index);
       
   979 		GetString(bak->name, STR_VEHICLE_NAME, lastof(bak->name));
   978 	}
   980 	}
   979 
   981 
   980 	/* If we have shared orders, store it on a special way */
   982 	/* If we have shared orders, store it on a special way */
   981 	if (IsOrderListShared(v)) {
   983 	if (IsOrderListShared(v)) {
   982 		const Vehicle *u = (v->next_shared) ? v->next_shared : v->prev_shared;
   984 		const Vehicle *u = (v->next_shared) ? v->next_shared : v->prev_shared;