diff options
Diffstat (limited to 'src/engine_base.h')
-rw-r--r-- | src/engine_base.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/engine_base.h b/src/engine_base.h index a2dd0b1dd..f118b8387 100644 --- a/src/engine_base.h +++ b/src/engine_base.h @@ -101,6 +101,18 @@ struct Engine : EnginePool::PoolItem<&_engine_pool> { { return this->type == VEH_TRAIN || this->type == VEH_ROAD; } + + /** + * Retrieve the NewGRF the engine is tied to. + * This is the GRF providing the Action 3. + * @return NewGRF associated to the engine. + */ + const GRFFile *GetGRF() const + { + return this->grf_prop.grffile; + } + + uint32 GetGRFID() const; }; struct EngineIDMapping { |