OpenTTD Source 20250331-master-g3c15e0c889
newgrf_act0_roadvehs.cpp File Reference

NewGRF Action 0x00 handler for road vehicles. More...

#include "../stdafx.h"
#include "../debug.h"
#include "../newgrf_cargo.h"
#include "../newgrf_engine.h"
#include "../newgrf_sound.h"
#include "../vehicle_base.h"
#include "newgrf_bytereader.h"
#include "newgrf_internal_vehicle.h"
#include "newgrf_internal.h"
#include "../safeguards.h"

Go to the source code of this file.

Functions

static ChangeInfoResult RoadVehicleChangeInfo (uint first, uint last, int prop, ByteReader &buf)
 Define properties for road vehicles.
 

Detailed Description

NewGRF Action 0x00 handler for road vehicles.

Definition in file newgrf_act0_roadvehs.cpp.

Function Documentation

◆ RoadVehicleChangeInfo()

static ChangeInfoResult RoadVehicleChangeInfo ( uint  first,
uint  last,
int  prop,
ByteReader buf 
)
static

Define properties for road vehicles.

Parameters
firstLocal ID of the first vehicle.
lastLocal ID of the last vehicle.
propThe property to change.
bufThe property value.
Returns
ChangeInfoResult.

Definition at line 30 of file newgrf_act0_roadvehs.cpp.

References _gted, _loaded_newgrf_features, RoadVehicleInfo::air_drag, AlterVehicleListOrder(), BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::base(), EngineInfo::base_intro, EngineInfo::callback_mask, EngineInfo::cargo_age_period, CIR_INVALID_ID, CIR_SUCCESS, CommonVehicleChangeInfo(), ConvertTTDBasePrice(), CT_INVALID, GetCargoTranslation(), GetNewEngine(), GetNewGRFSoundID(), GrfProcessingState::grffile, GRFLoadedFeatures::has_2CC, HasBit(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, IsValidCargoType(), RoadVehicleInfo::max_speed, EngineInfo::misc_flags, RoadVehicleInfo::power, PROP_ROADVEH_CARGO_AGE_PERIOD, PROP_ROADVEH_CARGO_CAPACITY, PROP_ROADVEH_COST_FACTOR, PROP_ROADVEH_POWER, PROP_ROADVEH_RUNNING_COST_FACTOR, PROP_ROADVEH_SHORTEN_FACTOR, PROP_ROADVEH_SPEED, PROP_ROADVEH_TRACTIVE_EFFORT, PROP_ROADVEH_WEIGHT, ReadBadgeList(), ByteReader::ReadByte(), ByteReader::ReadDWord(), ByteReader::ReadExtendedByte(), ByteReader::ReadWord(), EngineInfo::retire_early, SB(), SetBit(), RoadVehicleInfo::shorten_factor, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), RoadVehicleInfo::tractive_effort, TranslateRefitMask(), Uses2CC, EngineInfo::variant_id, VE_DEFAULT, VE_DISABLE_EFFECT, VE_TYPE_COUNT, VE_TYPE_START, VEH_ROAD, RoadVehicleInfo::visual_effect, and RoadVehicleInfo::weight.