|
@@ -39,16 +39,16 @@ struct StationScopeResolver : public Sco
|
|
|
*/
|
|
|
StationScopeResolver(ResolverObject &ro, const StationSpec *statspec, BaseStation *st, TileIndex tile)
|
|
|
: ScopeResolver(ro), tile(tile), st(st), statspec(statspec), cargo_type(CT_INVALID), axis(INVALID_AXIS)
|
|
|
{
|
|
|
}
|
|
|
|
|
|
/* virtual */ uint32 GetRandomBits() const;
|
|
|
/* virtual */ uint32 GetTriggers() const;
|
|
|
uint32 GetRandomBits() const override;
|
|
|
uint32 GetTriggers() const override;
|
|
|
|
|
|
/* virtual */ uint32 GetVariable(byte variable, uint32 parameter, bool *available) const;
|
|
|
uint32 GetVariable(byte variable, uint32 parameter, bool *available) const override;
|
|
|
};
|
|
|
|
|
|
/** Station resolver. */
|
|
|
struct StationResolverObject : public ResolverObject {
|
|
|
StationScopeResolver station_scope; ///< The station scope resolver.
|
|
|
TownScopeResolver *town_scope; ///< The town scope resolver (created on the first call).
|
|
@@ -56,13 +56,13 @@ struct StationResolverObject : public Re
|
|
|
StationResolverObject(const StationSpec *statspec, BaseStation *st, TileIndex tile,
|
|
|
CallbackID callback = CBID_NO_CALLBACK, uint32 callback_param1 = 0, uint32 callback_param2 = 0);
|
|
|
~StationResolverObject();
|
|
|
|
|
|
TownScopeResolver *GetTown();
|
|
|
|
|
|
/* virtual */ ScopeResolver *GetScope(VarSpriteGroupScope scope = VSG_SCOPE_SELF, byte relative = 0)
|
|
|
ScopeResolver *GetScope(VarSpriteGroupScope scope = VSG_SCOPE_SELF, byte relative = 0) override
|
|
|
{
|
|
|
switch (scope) {
|
|
|
case VSG_SCOPE_SELF:
|
|
|
return &this->station_scope;
|
|
|
|
|
|
case VSG_SCOPE_PARENT: {
|
|
@@ -73,13 +73,13 @@ struct StationResolverObject : public Re
|
|
|
|
|
|
default:
|
|
|
return ResolverObject::GetScope(scope, relative);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* virtual */ const SpriteGroup *ResolveReal(const RealSpriteGroup *group) const;
|
|
|
const SpriteGroup *ResolveReal(const RealSpriteGroup *group) const override;
|
|
|
};
|
|
|
|
|
|
enum StationClassID {
|
|
|
STAT_CLASS_BEGIN = 0, ///< the lowest valid value
|
|
|
STAT_CLASS_DFLT = 0, ///< Default station class.
|
|
|
STAT_CLASS_WAYP, ///< Waypoint class.
|