You could do it computationally like that but every layer of extra checks you put in place gets more and more expensive. It isn't a matter of "can it be done?" It's a matter of whether or not it can be done without hurting performance.
The idea I suggested (volumes) wouldn't work, either, to be honest. Mostly for logical reasons. It falls apart under scrutiny pretty fast. Like, if you place a hazard-proof volume into a bunker POI, what happens if the player disassembles the bunker? The volume is still there. Oops! Even if you do something like isInHazardVolume() && isIndoors(), the player could disassemble the bunker, build a rickety wood shack in its place, and still pass those checks. So now you need more logic to deal with that, and so on. It's a bottomless rabbit hole.
Okay, so what if that is simplified, instead of thinking of building individual volumes, think of outside is one big volume of atmosphere.
Outside is 100%. The player wouldn't but indirectly would be creating a volume. as they build and remove blocks.
CVAR adlib: Is person inside or outside, If inside then using the same value scheme for lights, adding a single property
value to the blocks, could effect the variable percentage multiplier for effectiveness.
Simplest image terrain or base surface under foot, is set to 100 because it blocks weather underground and plug the hole
or if you create sealed cubicle base. The only thing left is for the above ground builder, the other 5 sides of the cube. Which
is being calculated anyway, or light would not change when you go indoors. If Lightopacity property, ranged from 0 to 100,
instead of 0 to 6. Then the same property could be used to regulate, two aspects. For transparent solid windows you would
have to adjust it to max value, a broken to a lesser.
So if you built anything and it's GTE value is 100+ for being solid, the weather is blocked. And it would use a process that is already
there. The main change would be adding the opening and closing property for a weather resistance buff. That buff could then
be used also for temperature regulation, weather comes in then so does temperature change. Similar to what the clothing and
armor do now. But the foundation would have to be a common value.
Another way could be, and this would need a timer. Still setting Lightopacity to 0-100. All of the cracky blocks, no matter
which material, start the timer if player property IsIndoors applies. And the variable used is the speed at which weather
damage begins to occur. Value 100 or greater no timer, less than 100 timer and debuff.
Same way that <effect_group name="food/water balancing"> works now.