no_clouds

master
BuckarooBanzay 2020-05-25 11:44:57 +02:00
parent 9b4041391f
commit 60477a6baa
3 changed files with 30 additions and 0 deletions

View File

@ -26,3 +26,4 @@ if minetest.get_modpath("epic_weather") then
end
dofile(MP.."/integrations/day_night.lua")
dofile(MP.."/integrations/no_clouds.lua")

View File

@ -0,0 +1,25 @@
area_effects.register_effect("no_clouds", "disables the clouds")
area_effects.register_hook({
enter = function(player, id)
local data = area_effects.get(id)
if data.no_clouds then
player:set_clouds({density=0,speed=0})
end
end,
leave = function(player, id)
local data = area_effects.get(id)
if data.no_clouds then
player:set_clouds({
thickness=16,
color={r=243, g=214, b=255, a=229},
ambient={r=0, g=0, b=0, a=255},
density=0.4,
height=100,
speed={y=-2,x=-1}
})
end
end
})

View File

@ -19,3 +19,7 @@ Area based effects
## Weather (epic_weather)
* **/area_effect_set weather Light rain**
## Clouds
* **/area_effect_set no_clouds true**