summaryrefslogtreecommitdiff
path: root/src/engine_gui.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-08-30 17:54:11 +0000
committeralberth <alberth@openttd.org>2009-08-30 17:54:11 +0000
commit1ba000be12130d0f955feaba05f0ac65c1519115 (patch)
tree649000ae80cf774b103b2565d40afdf0ca3867a3 /src/engine_gui.cpp
parentdb120540a0db62530d61c4e9ebd1e8a6984d13a5 (diff)
downloadopenttd-1ba000be12130d0f955feaba05f0ac65c1519115.tar.xz
(svn r17327) -Codechange: Allow external use of GetEngineCategoryName().
Diffstat (limited to 'src/engine_gui.cpp')
-rw-r--r--src/engine_gui.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp
index 0ecd94d15..9c41e38ad 100644
--- a/src/engine_gui.cpp
+++ b/src/engine_gui.cpp
@@ -27,6 +27,10 @@
#include "table/strings.h"
#include "table/sprites.h"
+/** Return the category of an engine.
+ * @param engine Engine to examine.
+ * @return String describing the category ("road veh", "train". "airplane", or "ship") of the engine.
+ */
StringID GetEngineCategoryName(EngineID engine)
{
switch (Engine::Get(engine)->type) {