Add support for disable_locking setting

(for minetest.conf). When true, this setting disables the crafting recipes
for stuff which can be locked. Currently, this is the steel door and the
locked chest. When not provided, the setting is assumed to be false.
This commit is contained in:
Wuzzy 2014-07-08 03:47:45 +02:00
parent ca7f6bb97a
commit bde073e521
2 changed files with 20 additions and 16 deletions

View file

@ -334,6 +334,7 @@ minetest.register_craft({
}
})
if(minetest.setting_getbool("disable_locking") ~= true) then
minetest.register_craft({
output = 'default:chest_locked',
recipe = {
@ -342,6 +343,7 @@ minetest.register_craft({
{'group:wood', 'group:wood', 'group:wood'},
}
})
end
minetest.register_craft({
output = 'default:furnace',

View file

@ -321,6 +321,7 @@ doors.register_door("doors:door_steel", {
sunlight = false,
})
if(minetest.setting_getbool("disable_locking") ~= true) then
minetest.register_craft({
output = "doors:door_steel",
recipe = {
@ -329,6 +330,7 @@ minetest.register_craft({
{"default:steel_ingot", "default:steel_ingot"}
}
})
end
doors.register_door("doors:door_glass", {
description = "Glass Door",