diff options
Diffstat (limited to 'src/newgrf_object.h')
-rw-r--r-- | src/newgrf_object.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/newgrf_object.h b/src/newgrf_object.h index 90be24042..1776b760a 100644 --- a/src/newgrf_object.h +++ b/src/newgrf_object.h @@ -98,9 +98,10 @@ struct ObjectSpec { /** Object scope resolver. */ struct ObjectScopeResolver : public ScopeResolver { - struct Object *obj; ///< The object the callback is ran for. - TileIndex tile; ///< The tile related to the object. - uint8 view; ///< The view of the object. + struct Object *obj; ///< The object the callback is ran for. + const ObjectSpec *spec; ///< Specification of the object type. + TileIndex tile; ///< The tile related to the object. + uint8 view; ///< The view of the object. /** * Constructor of an object scope resolver. @@ -109,8 +110,8 @@ struct ObjectScopeResolver : public ScopeResolver { * @param tile %Tile of the object. * @param view View of the object. */ - ObjectScopeResolver(ResolverObject &ro, Object *obj, TileIndex tile, uint8 view = 0) - : ScopeResolver(ro), obj(obj), tile(tile), view(view) + ObjectScopeResolver(ResolverObject &ro, Object *obj, const ObjectSpec *spec, TileIndex tile, uint8 view = 0) + : ScopeResolver(ro), obj(obj), spec(spec), tile(tile), view(view) { } @@ -144,6 +145,9 @@ struct ObjectResolverObject : public ResolverObject { } } + GrfSpecFeature GetFeature() const override; + uint32 GetDebugID() const override; + private: TownScopeResolver *GetTown(); }; |