mirror of
https://github.com/t-affeldt/climate_api.git
synced 2025-07-05 01:40:38 +02:00
Make wind dependent on height, add additional control commands, improve docu
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user