Ralith / hypermine

A hyperbolic voxel game
Apache License 2.0
160 stars 20 forks source link

Store all `Material` types in an array #407

Closed patowen closed 5 months ago

patowen commented 5 months ago

The ability to walk through the list of available materials will likely come in handy in many situations. For me, it came up when I thought about implementing scrolling through different items in the inventory, which is why I made that change now, although I later decided to defer that feature until later.

Rather than throwing away the code I wrote, I believe it's probably best to just put it in its own PR.

Probably the most controversial decision here is calling it Material::ALL. I'm open to other suggestions.