Changeset - r28696:f70e23bbba27
[Not reviewed]
master
0 1 0
Peter Nelson - 3 months ago 2024-02-05 23:12:56
peter1138@openttd.org
Fix #12001: Use correct valid cargo check for old-style NewGRF town house 3rd cargo set up. (#12006)
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/newgrf.cpp
Show inline comments
 
@@ -2431,7 +2431,7 @@ static ChangeInfoResult TownHouseChangeI
 
					 * in the temperate climate. */
 
					CargoID cid = housespec->accepts_cargo[2];
 
					if (!IsValidCargoID(cid)) cid = GetCargoIDByLabel(housespec->accepts_cargo_label[2]);
 
					if (!IsValidCargoID(cid) || !CargoSpec::Get(cid)->IsValid()) {
 
					if (!IsValidCargoID(cid)) {
 
						housespec->cargo_acceptance[2] = 0;
 
					}
 
				}
 
@@ -2471,7 +2471,7 @@ static ChangeInfoResult TownHouseChangeI
 
						((_settings_game.game_creation.landscape == LT_TOYLAND) ? GetCargoIDByLabel(CT_FIZZY_DRINKS) : GetCargoIDByLabel(CT_FOOD));
 

	
 
				/* Make sure the cargo type is valid in this climate. */
 
				if (!CargoSpec::Get(cid)->IsValid()) goods = 0;
 
				if (!IsValidCargoID(cid)) goods = 0;
 

	
 
				housespec->accepts_cargo[2] = cid;
 
				housespec->accepts_cargo_label[2] = CT_INVALID;
0 comments (0 inline, 0 general)