(svn r19796) -Codechange: introduce and use a {DEPOT} string command
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "town.h"
|
||||
#include "screenshot.h"
|
||||
#include "waypoint_base.h"
|
||||
#include "depot_base.h"
|
||||
#include "industry.h"
|
||||
#include "newgrf_text.h"
|
||||
#include "fileio_func.h"
|
||||
@@ -944,6 +945,13 @@ static char *FormatString(char *buff, const char *str, int64 *argv, uint casei,
|
||||
break;
|
||||
}
|
||||
|
||||
case SCC_DEPOT_NAME: { // {DEPOT}
|
||||
VehicleType vt = (VehicleType)GetInt32(&argv);
|
||||
int64 temp[1] = { vt == VEH_AIRCRAFT ? GetInt32(&argv) : Depot::Get(GetInt32(&argv))->town_index };
|
||||
buff = GetStringWithArgs(buff, STR_FORMAT_DEPOT_NAME_TRAIN + vt, temp, last);
|
||||
break;
|
||||
}
|
||||
|
||||
case SCC_TOWN_NAME: { // {TOWN}
|
||||
const Town *t = Town::Get(GetInt32(&argv));
|
||||
|
||||
|
Reference in New Issue
Block a user