OpenTTD Source 20260512-master-g20b387b91f
newgrf_act0_ships.cpp File Reference

NewGRF Action 0x00 handler for ships. 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 "newgrf_stringmapping.h"
#include "../safeguards.h"

Go to the source code of this file.

Functions

static ChangeInfoResult ShipVehicleChangeInfo (uint first, uint last, int prop, ByteReader &buf)
 Define properties for ships.

Detailed Description

NewGRF Action 0x00 handler for ships.

Definition in file newgrf_act0_ships.cpp.

Function Documentation

◆ ShipVehicleChangeInfo()

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

Define properties for ships.

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 31 of file newgrf_act0_ships.cpp.

References _gted, _loaded_newgrf_features, ShipVehicleInfo::acceleration, AlterVehicleListOrder(), BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::base(), EngineInfo::base_intro, EngineInfo::callback_mask, ShipVehicleInfo::canal_speed_frac, EngineInfo::cargo_age_period, CommonVehicleChangeInfo(), CT_INVALID, CUSTOM_VEHICLE_SPRITENUM, GetCargoTranslation(), GetNewEngine(), GetNewGRFSoundID(), HasBit(), InvalidId, IsValidCargoType(), IsValidNewGRFImageIndex(), ShipVehicleInfo::max_speed, EngineInfo::misc_flags, ShipVehicleInfo::ocean_speed_frac, ShipVehicleInfo::old_refittable, PROP_SHIP_CARGO_AGE_PERIOD, PROP_SHIP_CARGO_CAPACITY, PROP_SHIP_COST_FACTOR, PROP_SHIP_RUNNING_COST_FACTOR, PROP_SHIP_SPEED, ReadBadgeList(), ByteReader::ReadByte(), ByteReader::ReadDWord(), ByteReader::ReadExtendedByte(), ByteReader::ReadWord(), BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Reset(), EngineInfo::retire_early, SB(), BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Set(), Ship, Ships, Success, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), TranslateRefitMask(), Uses2CC, EngineInfo::variant_id, VE_DEFAULT, VE_DISABLE_EFFECT, VE_TYPE_COUNT, VE_TYPE_START, and ShipVehicleInfo::visual_effect.

Referenced by GrfChangeInfoHandler< TFeature >::Activation().