OpenTTD Source 20261129-master-g72a8bdc861
ERNWChunkHandler Struct Reference
Inheritance diagram for ERNWChunkHandler:
ChunkHandler

Public Member Functions

void Load () const override
 Load the chunk.
Public Member Functions inherited from ChunkHandler
 ChunkHandler (ChunkId id, ChunkType type)
 Create this ChunkHandler.
virtual ~ChunkHandler ()=default
 Ensure the destructor of the sub classes are called as well.
virtual void Save () const
 Save the chunk.
virtual void FixPointers () const
 Fix the pointers.
virtual void LoadCheck (size_t len=0) const
 Load the chunk for game preview.
std::string GetName () const
 Get the name of this chunk.

Static Public Attributes

static const SaveLoad description []
 Saveload description for handler.

Additional Inherited Members

Data Fields inherited from ChunkHandler
ChunkId id
 Unique ID (4 letters).
ChunkType type
 Type of the chunk.

Detailed Description

Definition at line 23 of file autoreplace_sl.cpp.

Constructor & Destructor Documentation

◆ ERNWChunkHandler()

ERNWChunkHandler::ERNWChunkHandler ( )
inline

Definition at line 24 of file autoreplace_sl.cpp.

Member Function Documentation

◆ Load()

void ERNWChunkHandler::Load ( ) const
inlineoverridevirtual

Field Documentation

◆ description

const SaveLoad ERNWChunkHandler::description[]
inlinestatic
Initial value:
= {
SaveLoad::Variable<VarFileType::U16>("from", SLE_OBJECT_ADDRESS(OldEngineRenewPool::Item, value.from)),
SaveLoad::Variable<VarFileType::U16>("to", SLE_OBJECT_ADDRESS(OldEngineRenewPool::Item, value.to)),
SaveLoad::Variable<VarFileType::U16>("group_id", SLE_OBJECT_ADDRESS(OldEngineRenewPool::Item, value.group_id), SaveLoadVersion::VehicleGroups),
SaveLoad::Variable<VarFileType::Bool>("replace_when_old", SLE_OBJECT_ADDRESS(OldEngineRenewPool::Item, value.replace_when_old), SaveLoadVersion::AutoreplaceWhenOldTreeLimit),
}
#define SLE_OBJECT_ADDRESS(base, variable)
Macro to be able to pass the variable type and construct the SaveLoad::AddressFunction given a base c...
Definition saveload.h:752
@ MoreCargoPackets
Saveload version: 69, SVN revision: 10319 Allow more than ~65k cargo packets.
Definition saveload.h:130
@ VehicleGroups
Saveload version: 60, SVN revision: 9874 Arbitrary grouping, by the player, of vehicles.
Definition saveload.h:120
@ AutoreplaceWhenOldTreeLimit
Saveload version: 175, SVN revision: 24136 Autoreplace vehicle only when they are old,...
Definition saveload.h:258
@ MinVersion
First savegame version.
Definition saveload.h:35
static SaveLoad Variable(std::string name, AddressFunction< T > address_func, SaveLoadVersion from=SaveLoadVersion::MinVersion, SaveLoadVersion to=SaveLoadVersion::MaxVersion, size_t extra=0)
Storage of a variable in some savegame versions.
Definition saveload.h:923

Saveload description for handler.

Definition at line 27 of file autoreplace_sl.cpp.

Referenced by Load().


The documentation for this struct was generated from the following file: