OpenTTD Source  20240919-master-gdf0233f4c2
cargopacket.cpp File Reference
#include "stdafx.h"
#include "station_base.h"
#include "core/pool_func.hpp"
#include "core/random_func.hpp"
#include "economy_base.h"
#include "cargoaction.h"
#include "order_type.h"
#include "safeguards.h"

Go to the source code of this file.

Functions

template<>
uint VehicleCargoList::Reassign< VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_TRANSFER > (uint max_move)
 Reassign cargo from MTA_DELIVER to MTA_TRANSFER and take care of the next station the cargo wants to visit. More...
 
template uint VehicleCargoList::Reassign< VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_KEEP > (uint)
 

Variables

CargoPacketPool _cargopacket_pool ("CargoPacket")
 The actual pool with cargo packets.
 

Detailed Description

Implementation of the cargo packets.

Definition in file cargopacket.cpp.

Function Documentation

◆ VehicleCargoList::Reassign< VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_TRANSFER >()

Reassign cargo from MTA_DELIVER to MTA_TRANSFER and take care of the next station the cargo wants to visit.

Parameters
max_moveMaximum amount of cargo to reassign.
Returns
Amount of cargo actually reassigned.

Definition at line 567 of file cargopacket.cpp.

References CargoPacket::Count(), CargoPacket::next_hop, and CargoPacket::Split().