OpenTTD Source 20260208-master-g43af8e94d0
newgrf_act0_trains.cpp File Reference

NewGRF Action 0x00 handler for trains. More...

#include "../stdafx.h"
#include "../debug.h"
#include "../newgrf_cargo.h"
#include "../newgrf_engine.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

ChangeInfoResult RailVehicleChangeInfo (uint first, uint last, int prop, ByteReader &buf)
 Define properties for rail vehicles.

Detailed Description

NewGRF Action 0x00 handler for trains.

Definition in file newgrf_act0_trains.cpp.

Function Documentation

◆ RailVehicleChangeInfo()

ChangeInfoResult RailVehicleChangeInfo ( uint first,
uint last,
int prop,
ByteReader & buf )

Define properties for rail 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 29 of file newgrf_act0_trains.cpp.

References _gted, _loaded_newgrf_features, RailVehicleInfo::ai_passenger_only, RailVehicleInfo::air_drag, AlterVehicleListOrder(), BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::base(), EngineInfo::base_intro, EngineInfo::callback_mask, RailVehicleInfo::capacity, EngineInfo::cargo_age_period, CIR_INVALID_ID, CIR_SUCCESS, CommonVehicleChangeInfo(), ConvertTTDBasePrice(), RailVehicleInfo::cost_factor, CT_INVALID, RailVehicleInfo::curve_speed_mod, CUSTOM_VEHICLE_SPRITENUM, EC_DIESEL, EC_ELECTRIC, EC_MAGLEV, EC_MONORAIL, EC_STEAM, RailVehicleInfo::engclass, GetCargoTranslation(), GetNewEngine(), HasBit(), IsValidCargoType(), IsValidNewGRFImageIndex(), RailVehicleInfo::max_speed, EngineInfo::misc_flags, RailVehicleInfo::pow_wag_power, RailVehicleInfo::pow_wag_weight, RailVehicleInfo::power, PROP_TRAIN_CARGO_AGE_PERIOD, PROP_TRAIN_CARGO_CAPACITY, PROP_TRAIN_COST_FACTOR, PROP_TRAIN_CURVE_SPEED_MOD, PROP_TRAIN_POWER, PROP_TRAIN_RUNNING_COST_FACTOR, PROP_TRAIN_SHORTEN_FACTOR, PROP_TRAIN_SPEED, PROP_TRAIN_TRACTIVE_EFFORT, PROP_TRAIN_USER_DATA, PROP_TRAIN_WEIGHT, RAILVEH_MULTIHEAD, RAILVEH_SINGLEHEAD, RAILVEH_WAGON, ReadBadgeList(), ByteReader::ReadByte(), ByteReader::ReadDWord(), ByteReader::ReadExtendedByte(), ByteReader::ReadWord(), EngineInfo::retire_early, RailVehicleInfo::running_cost, SB(), SetBit(), RailVehicleInfo::shorten_factor, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), RailVehicleInfo::tractive_effort, TranslateRefitMask(), RailVehicleInfo::user_def_data, Uses2CC, EngineInfo::variant_id, VE_DEFAULT, VE_DISABLE_EFFECT, VE_TYPE_COUNT, VE_TYPE_START, VEH_TRAIN, RailVehicleInfo::visual_effect, and RailVehicleInfo::weight.