Code cleanups, improved pagination with destinations & other repeated code
Hacky solution introduced allowing you to use LEGACY_ material codes like LEGACY_CONCRETE to match all types of concrete.
All it does is it removes the LEGACY_ from the name and checks if the gate's material contains the rest of the name.
[LEGACY_CONCRETE -> "CONCRETE" is the word searched..]
Will match CYAN_CONCRETE WHITE_CONCRETE BLACK_CONCRETE etc...
[LEGACY_WOOL -> "WOOL" is the word searched..]
Will match CYAN_WOOL WHITE_WOOL BLACK_WOOL etc...
This will work just fine until the deprecated enumerations are actually removed..