|
OpenTTD Source
14.0-beta3
|
Go to the documentation of this file.
12 #ifndef NEWGRF_ROADSTATION_H
13 #define NEWGRF_ROADSTATION_H
59 ROADSTOP_DRAW_MODE_NONE = 0,
92 uint32_t
GetVariable(
byte variable, [[maybe_unused]] uint32_t parameter,
bool *available)
const override;
109 if (tsr !=
nullptr)
return tsr;
136 uint8_t callback_mask = 0;
170 void AnimateRoadStopTile(
TileIndex tile);
171 uint8_t GetRoadStopTileAnimationSpeed(
TileIndex tile);
183 void DeallocateSpecFromRoadStop(
BaseStation *st,
byte specindex);
struct BaseStation * st
Instance of the station.
uint8_t clear_cost_multiplier
Clear cost multiplier per tile.
@ ROADSTOPTYPE_ALL
This RoadStop is for both types of station road stops.
@ RSF_CB141_RANDOM_BITS
Callback 141 needs random bits.
RoadStopAvailabilityType
Various different options for availability, restricting the roadstop to be only for busses or for tru...
Money GetPrice(Price index, uint cost_factor, const GRFFile *grf_file, int shift)
Determine a certain price.
RoadStopType
Types of RoadStops.
StringID name
Name of this stop.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Price
Enumeration of all base prices for use with Prices.
@ RSRT_CARGO_TAKEN
Trigger roadstop when cargo is completely taken.
@ ROADSTOPTYPE_FREIGHT
This RoadStop is for freight (truck) stops.
TileIndex tile
Tile of the station.
Interface for SpriteGroup-s to access the gamestate.
Information about animation.
RoadType roadtype
Road type (used when no tile)
@ RSRT_VEH_DEPARTS
Trigger roadstop when road vehicle leaves.
RoadStopClassID cls_id
The class to which this spec belongs.
bool GetIfNewStopsByType(RoadStopType rs, RoadType roadtype)
Checks if there's any new stations by a specific RoadStopType.
CallbackID
List of implemented NewGRF callbacks.
@ VSG_SCOPE_PARENT
Related object of the resolved one.
@ RSRT_VEH_ARRIVES
Trigger roadstop when road vehicle arrives.
Interface to query and set values specific to a single VarSpriteGroupScope (action 2 scope).
@ ROADSTOP_DRAW_MODE_OVERLAY
Drive-through stops: Draw the road overlay, e.g. pavement.
void TriggerRoadStopRandomisation(Station *st, TileIndex tile, RoadStopRandomTrigger trigger, CargoID cargo_type=INVALID_CARGO)
Trigger road stop randomisation.
@ RSRT_VEH_LOADS
Trigger roadstop when road vehicle loads.
@ VSG_SCOPE_SELF
Resolved object itself.
bool GetIfClassHasNewStopsByType(RoadStopClass *roadstopclass, RoadStopType rs, RoadType roadtype)
Checks if the given RoadStopClass has any specs assigned to it, compatible with the given RoadStopTyp...
void DrawRoadStopTile(int x, int y, RoadType roadtype, const RoadStopSpec *spec, StationType type, int view)
Draw representation of a road stop tile for GUI purposes.
@ RSF_NO_CATENARY
Do not show catenary.
StationType
Station types.
#define DECLARE_POSTFIX_INCREMENT(enum_type)
Some enums need to have allowed incrementing (i.e.
@ RSF_BUILD_MENU_TRAM_ONLY
Only show in the tram build menu (not road).
@ ROADSTOP_CLASS_BEGIN
The lowest valid value.
int spec_id
The ID of this spec inside the class.
@ CBID_NO_CALLBACK
Set when using the callback resolve system, but not to resolve a callback.
Money GetClearCost(Price category) const
Get the cost for clearing a road stop of this type.
uint8_t build_cost_multiplier
Build cost multiplier per tile.
Struct containing information relating to NewGRF classes for stations and airports.
GRFFilePropsBase< NUM_CARGO+3 > grf_prop
Properties related the the grf file.
@ RSF_DRIVE_THROUGH_ONLY
Stop is drive-through only.
virtual ScopeResolver * GetScope(VarSpriteGroupScope scope=VSG_SCOPE_SELF, byte relative=0)
Get a resolver for the scope.
@ RSF_NO_AUTO_ROAD_CONNECTION
No auto road connection.
Scope resolver for a town.
byte CargoID
Cargo slots to indicate a cargo type within a game.
TownScopeResolver * town_scope
The town scope resolver (created on the first call).
ScopeResolver * GetScope(VarSpriteGroupScope scope=VSG_SCOPE_SELF, byte relative=0) override
Get a resolver for the scope.
uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const override
Get a variable value.
CargoID cargo_type
Type of cargo of the station.
@ ROADSTOP_CLASS_WAYP
Waypoint class (unimplemented: this is reserved for future use with road waypoints).
static const int NUM_ROADSTOPS_PER_GRF
The maximum amount of roadstops a single GRF is allowed to add.
@ ROADSTOP_CLASS_DFLT
Default road stop class.
@ ROADSTOP_DRAW_MODE_ROAD
Bay stops: Draw the road itself.
@ ROADSTOP_CLASS_MAX
Maximum number of classes.
const struct RoadStopSpec * roadstopspec
Station (type) specification.
@ RSRT_NEW_CARGO
Trigger roadstop on arrival of new cargo.
StationAnimationTrigger
Animation triggers for station.
Money GetBuildCost(Price category) const
Get the cost for building a road stop of this type.
CallbackID callback
Callback being resolved.
RoadType
The different roadtypes we support.
Base class for all station-ish types.
RoadStopScopeResolver roadstop_scope
The stop scope resolver.
@ RSF_BUILD_MENU_ROAD_ONLY
Only show in the road build menu (not tram).
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
const SpriteGroup * ResolveReal(const RealSpriteGroup *group) const override
Get the real sprites of the grf.
RoadStopDrawMode
Different draw modes to disallow rendering of some parts of the stop or road.
byte bridge_disallowed_pillars[6]
Disallowed pillar flags for a bridge above.
Scope resolver for road stops.
uint32_t GetRandomBits() const override
Get a few random bits.
ResolverObject & ro
Surrounding resolver object.
void RoadStopUpdateCachedTriggers(BaseStation *st)
Update the cached animation trigger bitmask for a station.
const struct GRFFile * grffile
grf file that introduced this entity
byte bridge_height[6]
Minimum height for a bridge above, 0 for none.
uint32_t GetTriggers() const override
Get the triggers.
uint8_t view
Station axis.
bool GetIfStopIsForType(const RoadStopSpec *roadstopspec, RoadStopType rs, RoadType roadtype)
Checks if the given RoadStopSpec is compatible with the given RoadStopType.
CargoTypes cargo_triggers
Bitmask of cargo types which cause trigger re-randomizing.
StationType type
Station type.
@ ROADSTOPTYPE_PASSENGER
This RoadStop is for passenger (bus) stops.