File diff r12233:9d0861714103 → r12234:fd1a494e7620
src/industry_cmd.cpp
Show inline comments
 
@@ -351,13 +351,13 @@ static Foundation GetFoundation_Industry
 
			if (callback_res == 0) return FOUNDATION_NONE;
 
		}
 
	}
 
	return FlatteningFoundation(tileh);
 
}
 

	
 
static void GetAcceptedCargo_Industry(TileIndex tile, AcceptedCargo ac)
 
static void AddAcceptedCargo_Industry(TileIndex tile, AcceptedCargo ac)
 
{
 
	IndustryGfx gfx = GetIndustryGfx(tile);
 
	const IndustryTileSpec *itspec = GetIndustryTileSpec(gfx);
 

	
 
	/* When we have to use a callback, we put our data in the next two variables */
 
	CargoID raw_accepts_cargo[lengthof(itspec->accepts_cargo)];
 
@@ -382,14 +382,13 @@ static void GetAcceptedCargo_Industry(Ti
 
			for (uint i = 0; i < lengthof(itspec->accepts_cargo); i++) raw_acceptance[i] = GB(res, i * 4, 4);
 
		}
 
	}
 

	
 
	for (byte i = 0; i < lengthof(itspec->accepts_cargo); i++) {
 
		CargoID a = accepts_cargo[i];
 
		/* Only set the value once. */
 
		if (a != CT_INVALID && ac[a] == 0) ac[a] = acceptance[i];
 
		if (a != CT_INVALID) ac[a] += acceptance[i];
 
	}
 
}
 

	
 
static void GetTileDesc_Industry(TileIndex tile, TileDesc *td)
 
{
 
	const Industry *i = GetIndustryByTile(tile);
 
@@ -2382,13 +2381,13 @@ static CommandCost TerraformTile_Industr
 
}
 

	
 
extern const TileTypeProcs _tile_type_industry_procs = {
 
	DrawTile_Industry,           // draw_tile_proc
 
	GetSlopeZ_Industry,          // get_slope_z_proc
 
	ClearTile_Industry,          // clear_tile_proc
 
	GetAcceptedCargo_Industry,   // get_accepted_cargo_proc
 
	AddAcceptedCargo_Industry,   // add_accepted_cargo_proc
 
	GetTileDesc_Industry,        // get_tile_desc_proc
 
	GetTileTrackStatus_Industry, // get_tile_track_status_proc
 
	ClickTile_Industry,          // click_tile_proc
 
	AnimateTile_Industry,        // animate_tile_proc
 
	TileLoop_Industry,           // tile_loop_proc
 
	ChangeTileOwner_Industry,    // change_tile_owner_proc