burli wrote:But what I want to know: why does weather mods use "sunlight_propagates"? Wouldn't it be better to use "walkable"?
Mod indoor check depends on get_node_light method. I would like to use more releable check but unfortunately I did not found replacement. Reason why it's not releable is that nodes with 'sunlight_propagates=true' (like glass) propagates 100% sunlight and there no way to differentiate whetever above (or far above) specific position is glass or air block.
As a workaround I introduce option to to override nodes like 'default:glass' sunlight_propagates value. This is more like expermental and disabled by default. Such glass would be useless for warm house like structures.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
if minetest.setting_getbool("weather_allow_override_nodes") then
if minetest.registered_nodes["default:glass"] then
minetest.override_item("default:glass", {sunlight_propagates = false})
end
Propper way would be update engine that only air could propagates sun 100%. But seeing how many pending tickets already in queue I do not expect such change anytime soon.
Weather particles already uses 'collisiondetection = true' so checking for walkable would not give any positive effect. Unless I misunderstand your concept.