This looks like some data it'd be good to stick in some json somewhere, possibly materials.json
Take a look at material.cpp/material.h, in particular load_material.  You can define it in there, then just look up the material to load the properties, in this case the material/scrap mapping, whether it has such a mapping (replaces your whitelist), and the conversion modifier.