MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ValidateVehicleType

Method ValidateVehicleType

src/story.cpp:205–209  ·  view source on GitHub ↗

Verity that the data stored a valid VehicleType value */

Source from the content-addressed store, hash-verified

203
204/** Verity that the data stored a valid VehicleType value */
205bool StoryPageButtonData::ValidateVehicleType() const
206{
207 uint8_t vehtype = GB(this->referenced_id, 16, 8);
208 return vehtype == VEH_INVALID || vehtype < VEH_COMPANY_END;
209}
210
211/**
212 * Create a new story page.

Callers 2

Calls 1

GBFunction · 0.85

Tested by

no test coverage detected