Add option to disable lavacooling (#1726)

This commit is contained in:
Ezhh 2017-05-07 17:25:53 +01:00 committed by SmallJoker
parent 6737952fbf
commit 08706313f4
3 changed files with 19 additions and 12 deletions

View File

@ -27,6 +27,9 @@
# Enable flame sound. # Enable flame sound.
#flame_sound = true #flame_sound = true
# Whether lavacooling should be enabled.
#enable_lavacooling = true
# Whether the stuff in initial_stuff should be given to new players # Whether the stuff in initial_stuff should be given to new players
#give_initial_stuff = false #give_initial_stuff = false
#initial_stuff = default:pick_steel,default:axe_steel,default:shovel_steel,default:torch 99,default:cobble 99 #initial_stuff = default:pick_steel,default:axe_steel,default:shovel_steel,default:torch 99,default:cobble 99

View File

@ -131,7 +131,8 @@ default.cool_lava = function(pos, node)
{pos = pos, max_hear_distance = 16, gain = 0.25}) {pos = pos, max_hear_distance = 16, gain = 0.25})
end end
minetest.register_abm({ if minetest.setting_getbool("enable_lavacooling") ~= false then
minetest.register_abm({
label = "Lava cooling", label = "Lava cooling",
nodenames = {"default:lava_source", "default:lava_flowing"}, nodenames = {"default:lava_source", "default:lava_flowing"},
neighbors = {"group:cools_lava", "group:water"}, neighbors = {"group:cools_lava", "group:water"},
@ -141,8 +142,8 @@ minetest.register_abm({
action = function(...) action = function(...)
default.cool_lava(...) default.cool_lava(...)
end, end,
}) })
end
-- --
-- optimized helper to put all items in an inventory into a drops list -- optimized helper to put all items in an inventory into a drops list

View File

@ -16,6 +16,9 @@ enable_fire (Fire) bool true
# Enable flame sound. # Enable flame sound.
flame_sound (Flame sound) bool true flame_sound (Flame sound) bool true
# Enable lavacooling.
enable_lavacooling (Lavacooling) bool true
# If enabled, steel tools, torches and cobblestone will be given to new # If enabled, steel tools, torches and cobblestone will be given to new
# players. # players.
give_initial_stuff (Give initial items) bool false give_initial_stuff (Give initial items) bool false