From a9ff296c3d608f04a14cd604a94531f5b42b2061 Mon Sep 17 00:00:00 2001 From: frosch Date: Thu, 13 May 2021 15:45:07 +0200 Subject: Codechange: add constant for number of original cargoes. --- src/cargo_type.h | 1 + src/table/cargo_const.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cargo_type.h b/src/cargo_type.h index 89e6f1380..83af40a83 100644 --- a/src/cargo_type.h +++ b/src/cargo_type.h @@ -61,6 +61,7 @@ enum CargoType { CT_PLASTIC = 10, CT_FIZZY_DRINKS = 11, + NUM_ORIGINAL_CARGO = 12, NUM_CARGO = 64, ///< Maximal number of cargo types in a game. CT_AUTO_REFIT = 0xFD, ///< Automatically choose cargo type when doing auto refitting. diff --git a/src/table/cargo_const.h b/src/table/cargo_const.h index 8518a2561..bb6f811a9 100644 --- a/src/table/cargo_const.h +++ b/src/table/cargo_const.h @@ -96,7 +96,7 @@ static const CargoSpec _default_cargo[] = { /** Table of cargo types available in each climate, by default */ -static const CargoLabel _default_climate_cargo[NUM_LANDSCAPE][12] = { +static const CargoLabel _default_climate_cargo[NUM_LANDSCAPE][NUM_ORIGINAL_CARGO] = { { 'PASS', 'COAL', 'MAIL', 'OIL_', 'LVST', 'GOOD', 'GRAI', 'WOOD', 'IORE', 'STEL', 'VALU', 33, }, { 'PASS', 'COAL', 'MAIL', 'OIL_', 'LVST', 'GOOD', 'WHEA', 'WOOD', 34, 'PAPR', 'GOLD', 'FOOD', }, { 'PASS', 'RUBR', 'MAIL', 4, 'FRUT', 'GOOD', 'MAIZ', 11, 'CORE', 'WATR', 'DIAM', 'FOOD', }, -- cgit v1.2.3-70-g09d2