mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-09-02 03:19:10 +00:00
(svn r10324) -Codechange: reference engine names by index
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "newgrf_townname.h"
|
||||
#include "signs.h"
|
||||
#include "vehicle.h"
|
||||
#include "newgrf_engine.h"
|
||||
|
||||
/* for opendir/readdir/closedir */
|
||||
# include "fios.h"
|
||||
@@ -864,6 +865,13 @@ static char* FormatString(char* buff, const char* str, const int64* argv, uint c
|
||||
break;
|
||||
}
|
||||
|
||||
case SCC_ENGINE_NAME: { // {ENGINE}
|
||||
EngineID engine = (EngineID)GetInt32(&argv);
|
||||
|
||||
buff = GetString(buff, GetCustomEngineName(engine), last);
|
||||
break;
|
||||
}
|
||||
|
||||
case SCC_VEHICLE_NAME: { // {VEHICLE}
|
||||
const Vehicle *v = GetVehicle(GetInt32(&argv));
|
||||
|
||||
|
Reference in New Issue
Block a user