diff options
author | peter1138 <peter1138@openttd.org> | 2007-06-25 14:46:32 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-06-25 14:46:32 +0000 |
commit | d69589b3c2c1844a966ea47c568f27b86d60ce8a (patch) | |
tree | aa01bc9f5e83f354abe440316e280459e85e0fa9 /src/strings.cpp | |
parent | eb6594caa840da0b4d8a16154cc2c0353d3eb238 (diff) | |
download | openttd-d69589b3c2c1844a966ea47c568f27b86d60ce8a.tar.xz |
(svn r10324) -Codechange: reference engine names by index
Diffstat (limited to 'src/strings.cpp')
-rw-r--r-- | src/strings.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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)); |