summaryrefslogtreecommitdiff
path: root/src/newgrf_object.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-04-22 16:28:27 +0000
committerfrosch <frosch@openttd.org>2012-04-22 16:28:27 +0000
commit34969178db5433cbe8e198d420976c899e72ae2a (patch)
treebbc47721773f360007e03639a9ebc8e8042d2e19 /src/newgrf_object.cpp
parent6d9a0ff72396fc99151878e551fd0756ef71ce64 (diff)
downloadopenttd-34969178db5433cbe8e198d420976c899e72ae2a.tar.xz
(svn r24169) -Add: Make NewGRFClass distinguish between defined specs and specs visible for the user.
Diffstat (limited to 'src/newgrf_object.cpp')
-rw-r--r--src/newgrf_object.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/newgrf_object.cpp b/src/newgrf_object.cpp
index 1c92c4293..e38fa9c9e 100644
--- a/src/newgrf_object.cpp
+++ b/src/newgrf_object.cpp
@@ -113,6 +113,12 @@ template <typename Tspec, typename Tid, Tid Tmax>
ObjectClass::Assign(&_object_specs[OBJECT_TRANSMITTER]);
}
+template <typename Tspec, typename Tid, Tid Tmax>
+bool NewGRFClass<Tspec, Tid, Tmax>::IsUIAvailable(uint index) const
+{
+ return this->GetSpec(index)->IsEverAvailable();
+}
+
INSTANTIATE_NEWGRF_CLASS_METHODS(ObjectClass, ObjectSpec, ObjectClassID, OBJECT_CLASS_MAX)