___I have only done theoretical work on this, but I have enough deep digging experience to know that above all it is highly dangerous. No doubt codes apply one way or the other, & likely stricter in cities. It may also depend on how you define the room's function as some laws may regard the use, eg bomb shelter vs rumpus room, vs secret room.
___Whatever you do, use caution. That said, digging is way fun! I used to mine &I still treasure hunt with a metal detector. Well, any turtle worth their salt knows how to dig.

__________________

Nemo me impune lacesset. ~Unattested