diff --git a/src/economy.cpp b/src/economy.cpp index ac15a7ac56..c78d0a8a48 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1826,8 +1826,9 @@ static void SaveLoad_PRIC() /** Cargo payment rates */ static void SaveLoad_CAPR() { - SlArray(&_cargo_payment_rates, NUM_CARGO, SLE_INT32); - SlArray(&_cargo_payment_rates_frac, NUM_CARGO, SLE_UINT16); + uint num_cargo = CheckSavegameVersion(55) ? 12 : NUM_CARGO; + SlArray(&_cargo_payment_rates, num_cargo, SLE_INT32); + SlArray(&_cargo_payment_rates_frac, num_cargo, SLE_UINT16); } static const SaveLoad _economy_desc[] = { diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index ff714c10ae..56696b371a 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -26,7 +26,7 @@ static uint _legend_excluded_cargo; /************************/ enum { - GRAPH_MAX_DATASETS = 16, + GRAPH_MAX_DATASETS = 32, GRAPH_AXIS_LABEL_COLOUR = 16, GRAPH_AXIS_LINE_COLOUR = 215, diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 7bb24f3b06..46ac8fd720 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -4108,7 +4108,7 @@ static void InitializeGRFSpecial() | (0 << 0x08) // fifoloading | (0 << 0x09) // townroadbranchprob | (0 << 0x0A) // tempsnowline - | (0 << 0x0B) // newcargo + | (1 << 0x0B) // newcargo | (1 << 0x0C) // enhancemultiplayer | (1 << 0x0D) // onewayroads | ((_patches.nonuniform_stations ? 1 : 0) << 0x0E) // irregularstations diff --git a/src/openttd.h b/src/openttd.h index f4bd4813be..0cbc91909d 100644 --- a/src/openttd.h +++ b/src/openttd.h @@ -317,7 +317,7 @@ enum { CT_PLASTIC = 10, CT_FIZZY_DRINKS = 11, - NUM_CARGO = 12, + NUM_CARGO = 32, CT_NO_REFIT = 0xFE, CT_INVALID = 0xFF diff --git a/src/saveload.cpp b/src/saveload.cpp index 4d3ea107ce..14bfc328af 100644 --- a/src/saveload.cpp +++ b/src/saveload.cpp @@ -28,7 +28,7 @@ #include "variables.h" #include -extern const uint16 SAVEGAME_VERSION = 54; +extern const uint16 SAVEGAME_VERSION = 55; uint16 _sl_version; ///< the major savegame version identifier byte _sl_minor_version; ///< the minor savegame version, DO NOT USE! diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 91d3aae166..eaf0db70d6 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2820,7 +2820,9 @@ static const SaveLoad _station_speclist_desc[] = { static void SaveLoad_STNS(Station *st) { SlObject(st, _station_desc); - for (CargoID i = 0; i < NUM_CARGO; i++) { + + uint num_cargo = CheckSavegameVersion(55) ? 12 : NUM_CARGO; + for (CargoID i = 0; i < num_cargo; i++) { SlObject(&st->goods[i], _goods_desc); }