mirror of
https://github.com/Sokomine/locks.git
synced 2025-07-17 21:30:22 +02:00
Change recipes when basic_materials mod is detected
This commit is contained in:
31
init.lua
31
init.lua
@ -750,22 +750,25 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
return false;
|
||||
end)
|
||||
|
||||
-- craftitem; that can be used to craft shared locked objects
|
||||
minetest.register_craftitem("locks:lock", {
|
||||
description = "Lock to lock and share objects",
|
||||
image = "locks_lock16.png",
|
||||
});
|
||||
if minetest.get_modpath("basic_materials") then
|
||||
minetest.register_alias("locks:lock", "basic_materials:padlock")
|
||||
else
|
||||
-- craftitem; that can be used to craft shared locked objects
|
||||
minetest.register_craftitem("locks:lock", {
|
||||
description = "Lock to lock and share objects",
|
||||
image = "locks_lock16.png",
|
||||
});
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "locks:lock 2",
|
||||
recipe = {
|
||||
{'default:steel_ingot', 'default:steel_ingot','default:steel_ingot'},
|
||||
{'default:steel_ingot', '', 'default:steel_ingot'},
|
||||
{'', 'default:steel_ingot',''},
|
||||
}
|
||||
});
|
||||
|
||||
minetest.register_craft({
|
||||
output = "locks:lock 2",
|
||||
recipe = {
|
||||
{'default:steel_ingot', 'default:steel_ingot','default:steel_ingot'},
|
||||
{'default:steel_ingot', '', 'default:steel_ingot'},
|
||||
{'', 'default:steel_ingot',''},
|
||||
}
|
||||
});
|
||||
end
|
||||
|
||||
-- a key allowes to open your own shared locked objects
|
||||
minetest.register_craftitem("locks:key", {
|
||||
|
Reference in New Issue
Block a user