From bc1be13ac87d66a474e33984dd4a4302d0dfe4e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sun, 19 Oct 2025 22:14:19 -0300 Subject: [PATCH] Change to core namespace in wind --- wind.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wind.lua b/wind.lua index 48bdcc4..bd0269b 100644 --- a/wind.lua +++ b/wind.lua @@ -24,7 +24,7 @@ SOFTWARE. local get_wind -if minetest.get_modpath("climate_api") then +if core.get_modpath("climate_api") then get_wind = function(pos, multiplier) multiplier = multiplier or 0.1 local wind = climate_api.environment.get_wind({x=0,y=0,z=0}) @@ -35,7 +35,7 @@ else local yaw = math.random()*math.pi*2-math.pi local speed = math.random()*4.0 airutils.wind={} - airutils.wind.wind = vector.multiply(minetest.yaw_to_dir(yaw),speed) + airutils.wind.wind = vector.multiply(core.yaw_to_dir(yaw),speed) airutils.wind.timer = 0 airutils.wind.ttime = math.random()*5*60+1*60 @@ -44,11 +44,11 @@ else return retVal end - minetest.register_globalstep( + core.register_globalstep( function(dtime) airutils.wind.timer=airutils.wind.timer+dtime if airutils.wind.timer >= airutils.wind.ttime then - local yaw = minetest.dir_to_yaw(airutils.wind.wind) + local yaw = core.dir_to_yaw(airutils.wind.wind) yaw = yaw+math.random()-0.5 local speed = math.random()*4.0 airutils.wind.wind = vector.multiply(minetest.yaw_to_dir(yaw),speed)