|
OpenTTD Source 20251116-master-g21329071df
|
Code handling saving and loading of stations. More...
#include "../stdafx.h"#include "saveload.h"#include "compat/station_sl_compat.h"#include "../station_base.h"#include "../waypoint_base.h"#include "../roadstop_base.h"#include "../vehicle_base.h"#include "../newgrf_station.h"#include "../newgrf_roadstop.h"#include "../timer/timer_game_calendar.h"#include "table/strings.h"#include "../safeguards.h"Go to the source code of this file.
Data Structures | |
| struct | FlowSaveLoad |
| class | SlStationSpecList< T > |
| class | SlStationCargo |
| class | SlStationFlow |
| class | SlStationGoods |
| struct | STNSChunkHandler |
| class | SlRoadStopTileData |
| class | SlStationBase |
| SaveLoad handler for the BaseStation, which all other stations / waypoints make use of. More... | |
| class | SlStationNormal |
| SaveLoad handler for a normal station (read: not a waypoint). More... | |
| class | SlStationWaypoint |
| struct | STNNChunkHandler |
| struct | ROADChunkHandler |
Typedefs | |
| typedef std::pair< const StationID, std::list< CargoPacket * > > | StationCargoPair |
Functions | |
| static void | UpdateWaypointOrder (Order &o) |
| Update the buoy orders to be waypoint orders. | |
| void | MoveBuoysToWaypoints () |
| Perform all steps to upgrade from the old station buoys to the new version that uses waypoints. | |
| void | AfterLoadStations () |
| void | AfterLoadRoadStops () |
| (Re)building of road stop caches after loading a savegame. | |
| static void | SwapPackets (GoodsEntry *ge) |
| Swap the temporary packets with the packets without specific destination in the given goods entry. | |
| const ChunkHandlerTable | _station_chunk_handlers (station_chunk_handlers) |
Variables | |
| static const SaveLoad | _roadstop_desc [] |
| static uint16_t | _waiting_acceptance |
| static uint32_t | _old_num_flows |
| static uint16_t | _cargo_source |
| static uint32_t | _cargo_source_xy |
| static uint8_t | _cargo_periods |
| static Money | _cargo_feeder_share |
| std::list< CargoPacket * > | _packets |
| uint32_t | _old_num_dests |
| static OldPersistentStorage | _old_st_persistent_storage |
| static const SaveLoad | _old_station_desc [] |
| static const SaveLoad | _station_desc [] |
| static const STNSChunkHandler | STNS |
| static const STNNChunkHandler | STNN |
| static const ROADChunkHandler | ROAD |
| static const ChunkHandlerRef | station_chunk_handlers [] |
Code handling saving and loading of stations.
Definition in file station_sl.cpp.
| typedef std::pair<const StationID, std::list<CargoPacket *> > StationCargoPair |
Definition at line 182 of file station_sl.cpp.
| void AfterLoadRoadStops | ( | ) |
(Re)building of road stop caches after loading a savegame.
Definition at line 144 of file station_sl.cpp.
References RoadStop::BaseEntry, DIAGDIR_NE, DIAGDIR_NW, IsDriveThroughStopTile(), and Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_roadstop_pool >::Iterate().
Referenced by AfterLoadGame().
| void AfterLoadStations | ( | ) |
Definition at line 111 of file station_sl.cpp.
| void MoveBuoysToWaypoints | ( | ) |
Perform all steps to upgrade from the old station buoys to the new version that uses waypoints.
This includes some old saveload mechanics.
Definition at line 45 of file station_sl.cpp.
References BaseStation::build_date, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_station_pool >::CanAllocateItem(), BaseStation::delete_ctr, Dock, BaseStation::facilities, GetStationIndex(), GetTileOwner(), HVOT_WAYPOINT, INVALID_TILE, IsBuoyTile(), IsInsideBS(), IsTileType(), SpecializedStation< Station, false >::Iterate(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_vehicle_pool >::Iterate(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_orderlist_pool >::Iterate(), Tile::m6(), MP_STATION, BaseStation::name, Town::name, BaseStation::owner, OWNER_NONE, BaseStation::rect, SB(), BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Set(), BaseStation::string_id, to_underlying(), BaseStation::town, Waypoint::town_cn, Train, BaseStation::train_station, UpdateWaypointOrder(), VEH_SHIP, and VEH_TRAIN.
Referenced by AfterLoadGame().
|
static |
Swap the temporary packets with the packets without specific destination in the given goods entry.
Assert that at least one of those is empty.
| ge | Goods entry to swap with. |
Definition at line 191 of file station_sl.cpp.
References GoodsEntry::GoodsEntryData::cargo, GoodsEntry::GetOrCreateData(), and CargoList< Tinst, Tcont >::Packets().
|
static |
Update the buoy orders to be waypoint orders.
| o | the order 'list' to check. |
Definition at line 31 of file station_sl.cpp.
References SpecializedStation< Station, false >::Get(), Order::GetDestination(), HVOT_WAYPOINT, Order::IsType(), and Order::MakeGoToWaypoint().
Referenced by MoveBuoysToWaypoints().
|
static |
Definition at line 170 of file station_sl.cpp.
|
static |
Definition at line 169 of file station_sl.cpp.
|
static |
Definition at line 167 of file station_sl.cpp.
|
static |
Definition at line 168 of file station_sl.cpp.
| uint32_t _old_num_dests |
Definition at line 173 of file station_sl.cpp.
|
static |
Definition at line 166 of file station_sl.cpp.
|
static |
Definition at line 184 of file station_sl.cpp.
|
static |
Definition at line 456 of file station_sl.cpp.
| std::list<CargoPacket *> _packets |
Definition at line 172 of file station_sl.cpp.
|
static |
Definition at line 159 of file station_sl.cpp.
|
static |
Definition at line 683 of file station_sl.cpp.
|
static |
Definition at line 165 of file station_sl.cpp.
|
static |
Definition at line 771 of file station_sl.cpp.
|
static |
Definition at line 772 of file station_sl.cpp.
|
static |
Definition at line 770 of file station_sl.cpp.
|
static |
Definition at line 769 of file station_sl.cpp.