From d69589b3c2c1844a966ea47c568f27b86d60ce8a Mon Sep 17 00:00:00 2001 From: peter1138 Date: Mon, 25 Jun 2007 14:46:32 +0000 Subject: (svn r10324) -Codechange: reference engine names by index --- src/strings.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/strings.cpp') diff --git a/src/strings.cpp b/src/strings.cpp index 52401b9bd..c9495b89f 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -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)); -- cgit v1.2.3-54-g00ecf