mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-21 14:53:16 -04:00
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:
parent
ca7f6bb97a
commit
bde073e521
2 changed files with 20 additions and 16 deletions
|
@ -334,6 +334,7 @@ minetest.register_craft({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if(minetest.setting_getbool("disable_locking") ~= true) then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'default:chest_locked',
|
output = 'default:chest_locked',
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -342,6 +343,7 @@ minetest.register_craft({
|
||||||
{'group:wood', 'group:wood', 'group:wood'},
|
{'group:wood', 'group:wood', 'group:wood'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'default:furnace',
|
output = 'default:furnace',
|
||||||
|
|
|
@ -321,6 +321,7 @@ doors.register_door("doors:door_steel", {
|
||||||
sunlight = false,
|
sunlight = false,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if(minetest.setting_getbool("disable_locking") ~= true) then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "doors:door_steel",
|
output = "doors:door_steel",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -329,6 +330,7 @@ minetest.register_craft({
|
||||||
{"default:steel_ingot", "default:steel_ingot"}
|
{"default:steel_ingot", "default:steel_ingot"}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
doors.register_door("doors:door_glass", {
|
doors.register_door("doors:door_glass", {
|
||||||
description = "Glass Door",
|
description = "Glass Door",
|
||||||
|
|
Loading…
Add table
Reference in a new issue