1
0
mirror of https://github.com/t-affeldt/regional_weather.git synced 2025-07-15 23:10:33 +02:00

Adjust lightning chances and update speed buff to new API

This commit is contained in:
Till Affeldt
2020-05-12 16:01:13 +02:00
parent 231642af2f
commit e874daa894
4 changed files with 18 additions and 8 deletions

View File

@ -13,14 +13,14 @@ local function handle_effect(player_data)
for weather, value in pairs(data) do
product = product * value
end
climate_api.utility.add_physics(EFFECT_NAME, player, "speed", product)
climate_api.player_physics.add(EFFECT_NAME, player, "speed", product)
end
end
local function remove_effect(player_data)
for playername, data in ipairs(player_data) do
local player = minetest.get_player_by_name(playername)
climate_api.utility.remove_physics(EFFECT_NAME, player, "speed")
climate_api.player_physics.remove(EFFECT_NAME, player, "speed")
end
end