File diff r25450:7e9533370994 → r25451:917146b539af
src/subsidy.cpp
Show inline comments
 
@@ -326,13 +326,13 @@ bool FindSubsidyTownCargoRoute()
 
	const Town *src_town = Town::GetRandom();
 
	if (src_town->cache.population < SUBSIDY_CARGO_MIN_POPULATION) return false;
 

	
 
	/* Calculate the produced cargo of houses around town center. */
 
	CargoArray town_cargo_produced;
 
	TileArea ta = TileArea(src_town->xy, 1, 1).Expand(SUBSIDY_TOWN_CARGO_RADIUS);
 
	TILE_AREA_LOOP(tile, ta) {
 
	for (TileIndex tile : ta) {
 
		if (IsTileType(tile, MP_HOUSE)) {
 
			AddProducedCargo(tile, town_cargo_produced);
 
		}
 
	}
 

	
 
	/* Passenger subsidies are not handled here. */
 
@@ -437,13 +437,13 @@ bool FindSubsidyCargoDestination(CargoID
 
			/* Select a random town. */
 
			const Town *dst_town = Town::GetRandom();
 

	
 
			/* Calculate cargo acceptance of houses around town center. */
 
			CargoArray town_cargo_accepted;
 
			TileArea ta = TileArea(dst_town->xy, 1, 1).Expand(SUBSIDY_TOWN_CARGO_RADIUS);
 
			TILE_AREA_LOOP(tile, ta) {
 
			for (TileIndex tile : ta) {
 
				if (IsTileType(tile, MP_HOUSE)) {
 
					AddAcceptedCargo(tile, town_cargo_accepted, nullptr);
 
				}
 
			}
 

	
 
			/* Check if the town can accept this cargo. */