(svn r24169) -Add: Make NewGRFClass distinguish between defined specs and specs visible for the user.

This commit is contained in:
frosch
2012-04-22 16:28:27 +00:00
parent 6d9a0ff723
commit 34969178db
5 changed files with 42 additions and 0 deletions

View File

@@ -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)