no_clouds
parent
9b4041391f
commit
60477a6baa
1
init.lua
1
init.lua
|
@ -26,3 +26,4 @@ if minetest.get_modpath("epic_weather") then
|
|||
end
|
||||
|
||||
dofile(MP.."/integrations/day_night.lua")
|
||||
dofile(MP.."/integrations/no_clouds.lua")
|
||||
|
|
|
@ -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
|
||||
})
|
Loading…
Reference in New Issue