Make wind dependent on height, add additional control commands, improve docu

This commit is contained in:
Till Affeldt
2020-05-13 16:03:28 +02:00
parent f42b4183e5
commit d4e00db432
14 changed files with 142 additions and 55 deletions

View File

@ -33,13 +33,13 @@ climate_api.register_influence("biome", function(pos)
return biome
end)
climate_api.register_global_influence("windspeed", function()
local wind = climate_api.environment.get_wind()
climate_api.register_influence("windspeed", function(pos)
local wind = climate_api.environment.get_wind(pos)
return vector.length(wind)
end)
climate_api.register_global_influence("wind_yaw", function()
local wind = climate_api.environment.get_wind()
local wind = climate_api.environment.get_wind({x = 0, y = 0, z = 0})
if vector.length(wind) == 0 then return 0 end
return minetest.dir_to_yaw(wind)
end)