Changeset - r26071:d76b94c83da2
[Not reviewed]
master
0 3 0
Jonathan G Rennison - 3 years ago 2021-11-16 22:48:21
j.g.rennison@gmail.com
Codechange: Remove CargoSpec::multipliertowngrowth which is unused (#9701)

This is set by cargo property 19.
This property is only implemented in TTDPatch.
3 files changed with 2 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/cargotype.h
Show inline comments
 
@@ -63,13 +63,12 @@ struct CargoSpec {
 
	uint16 multiplier;               ///< Capacity multiplier for vehicles. (8 fractional bits)
 
	int32 initial_payment;           ///< Initial payment rate before inflation is applied.
 
	uint8 transit_days[2];
 

	
 
	bool is_freight;                 ///< Cargo type is considered to be freight (affects train freight multiplier).
 
	TownEffect town_effect;          ///< The effect that delivering this cargo type has on towns. Also affects destination of subsidies.
 
	uint16 multipliertowngrowth;     ///< Size of the effect.
 
	uint8 callback_mask;             ///< Bitmask of cargo callbacks that have to be called
 

	
 
	StringID name;                   ///< Name of this type of cargo.
 
	StringID name_single;            ///< Name of a single entity of this type of cargo.
 
	StringID units_volume;           ///< Name of a single unit of cargo of this type.
 
	StringID quantifier;             ///< Text for multiple units of cargo of this type.
src/newgrf.cpp
Show inline comments
 
@@ -3016,13 +3016,13 @@ static ChangeInfoResult CargoChangeInfo(
 
					case 0xFF: cs->town_effect = TE_NONE; break;
 
				}
 
				break;
 
			}
 

	
 
			case 0x19: // Town growth coefficient
 
				cs->multipliertowngrowth = buf->ReadWord();
 
				buf->ReadWord();
 
				break;
 

	
 
			case 0x1A: // Bitmask of callbacks to use
 
				cs->callback_mask = buf->ReadByte();
 
				break;
 

	
src/table/cargo_const.h
Show inline comments
 
@@ -41,13 +41,13 @@
 
 *                     CargoSpec->abbrev and CargoSpec->sprite. See above for more detailed information.
 
 * @param str_singular The name suffix used to populate CargoSpec->name_single. See above for more information.
 
 * @param str_volume   Name of a single unit of cargo of this type.
 
 * @param classes      Classes of this cargo type. @see CargoClass
 
 */
 
#define MK(bt, label, colour, weight, mult, ip, td1, td2, freight, te, str_plural, str_singular, str_volume, classes) \
 
		{bt, label, colour, colour, weight, mult, ip, {td1, td2}, freight, te, 0, 0, \
 
		{bt, label, colour, colour, weight, mult, ip, {td1, td2}, freight, te, 0, \
 
		MK_STR_CARGO_PLURAL(str_plural), MK_STR_CARGO_SINGULAR(str_singular), str_volume, MK_STR_QUANTITY(str_plural), MK_STR_ABBREV(str_plural), \
 
		MK_SPRITE(str_plural), classes, nullptr, nullptr, 0}
 

	
 
/** Cargo types available by default. */
 
static const CargoSpec _default_cargo[] = {
 
	MK(   0, 'PASS', 152,  1, 0x400, 3185,  0,  24, false, TE_PASSENGERS,   PASSENGERS,    PASSENGER, STR_PASSENGERS, CC_PASSENGERS),
0 comments (0 inline, 0 general)