OpenTTD Source  1.11.0-beta2
cargopacket_sl.cpp File Reference
#include "../stdafx.h"
#include "../vehicle_base.h"
#include "../station_base.h"
#include "saveload.h"
#include "../safeguards.h"

Go to the source code of this file.

Functions

const SaveLoadGetCargoPacketDesc ()
 Wrapper function to get the CargoPacket's internal structure while some of the variables itself are private. More...
 
static void Save_CAPA ()
 Save the cargo packets.
 
static void Load_CAPA ()
 Load the cargo packets.
 

Variables

const ChunkHandler _cargopacket_chunk_handlers []
 Chunk handlers related to cargo packets. More...
 

Detailed Description

Code handling saving and loading of cargo packets

Definition in file cargopacket_sl.cpp.

Function Documentation

◆ GetCargoPacketDesc()

const SaveLoad* GetCargoPacketDesc ( )

Wrapper function to get the CargoPacket's internal structure while some of the variables itself are private.

We want this to be saved, right?

Returns
the saveload description for CargoPackets.

Definition at line 86 of file cargopacket_sl.cpp.

References SLE_VAR.

Referenced by Load_CAPA().

Variable Documentation

◆ _cargopacket_chunk_handlers

const ChunkHandler _cargopacket_chunk_handlers[]
Initial value:
= {
{ 'CAPA', Save_CAPA, Load_CAPA, nullptr, nullptr, CH_ARRAY | CH_LAST},
}

Chunk handlers related to cargo packets.

CH_LAST
@ CH_LAST
Last chunk in this array.
Definition: saveload.h:410
Save_CAPA
static void Save_CAPA()
Save the cargo packets.
Definition: cargopacket_sl.cpp:109
Load_CAPA
static void Load_CAPA()
Load the cargo packets.
Definition: cargopacket_sl.cpp:120