Thank you for the depth of the post! I think that everyone needs a "back to the basics" read from time to time and this time it yielded fruit for me.
There was something missing in my game and after reading your post I finally grasped what it was. Something so basic and elemental and I had missed it.
I already had a decent sandbox for my players to use but I did not have any real points of conflict or, in my case, scarce resources. I am certain my game will be better for it.
Good point Mattias. Just to explain a bit further what the operator notation is, the '&' will do a bit comparison where both members in the comparison need to have that bit set to 1. Because you are doing the AND operator all the bit places you don't care about need to be set to 1 so they maintain their value. The '~' operator inverts all the bits in the value so where a variable might look like 00010000, the inverse of that would look like 11101111.