merge local repository
This commit is contained in:
parent
6709dc40c2
commit
f07b6fa23e
|
@ -26,23 +26,25 @@ minetest.register_node("weather:snow_cover", {
|
||||||
drop = {}
|
drop = {}
|
||||||
})
|
})
|
||||||
|
|
||||||
--[[ Enable this section if you have a very fast PC
|
-- Snow cover ABM when weather_fast_pc setting is set to `true`
|
||||||
minetest.register_abm({
|
if minetest.is_yes(minetest.settings:get_bool('weather_fast_pc')) then
|
||||||
nodenames = {"group:crumbly", "group:snappy", "group:cracky", "group:choppy"},
|
minetest.log('action', '[weather] Loaded fast computer ABM (snow covers when weather:snow is set)')
|
||||||
neighbors = {"default:air"},
|
minetest.register_abm({
|
||||||
interval = 10.0,
|
nodenames = {"group:crumbly", "group:snappy", "group:cracky", "group:choppy"},
|
||||||
chance = 80,
|
neighbors = {"default:air"},
|
||||||
action = function (pos, node, active_object_count, active_object_count_wider)
|
interval = 10.0,
|
||||||
if weather == "snow" then
|
chance = 80,
|
||||||
if minetest.registered_nodes[node.name].drawtype == "normal"
|
action = function (pos, node)
|
||||||
or minetest.registered_nodes[node.name].drawtype == "allfaces_optional" then
|
if weather.type == "weather:snow" then
|
||||||
local np = vector.add(pos, {x=0, y=1, z=0})
|
if minetest.registered_nodes[node.name].drawtype == "normal"
|
||||||
if minetest.env:get_node_light(np, 0.5) == 15
|
or minetest.registered_nodes[node.name].drawtype == "allfaces_optional" then
|
||||||
and minetest.env:get_node(np).name == "air" then
|
local np = vector.add(pos, {x=0, y=1, z=0})
|
||||||
minetest.env:add_node(np, {name="weather:snow_cover"})
|
if minetest.env:get_node_light(np, 0.5) == 15
|
||||||
|
and minetest.env:get_node(np).name == "air" then
|
||||||
|
minetest.env:add_node(np, {name="weather:snow_cover"})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
})
|
||||||
})
|
end
|
||||||
]]
|
|
||||||
|
|
Loading…
Reference in New Issue