The earth magnetic field will line up the magnetic'particles'. So metals will pass the field'on' when thus happens. A steel or iron room will block c changing magnetic fields and electricity (cage of Faraday). read more
A compass would work in a steel room (though less robustly), provided the room was made out of carbon steel, which has a relatively low magnetic permeability as compared to electric steel or pure iron (see: relative permeability for various materials ). read more