added lock craftitem for making locked stuff
This commit is contained in:
parent
4213a2fba0
commit
c54052f3d9
@ -65,12 +65,41 @@ minetest.register_tool(
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem(
|
||||||
|
"locks:lock",
|
||||||
|
{
|
||||||
|
description = "Lock",
|
||||||
|
|
||||||
|
inventory_image = "locks_lock.png",
|
||||||
|
wield_image = "locks_lock.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft(
|
||||||
|
{
|
||||||
|
output = "locks:pick",
|
||||||
|
recipe = {
|
||||||
|
{"", "", "default:ingot_steel"},
|
||||||
|
{"", "default:stick", ""},
|
||||||
|
{"default:stick", "", ""},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft(
|
||||||
|
{
|
||||||
|
output = "locks:lock",
|
||||||
|
recipe = {
|
||||||
|
{"", "default:ingot_steel", ""},
|
||||||
|
{"default:ingot_steel", "", "default:ingot_steel"},
|
||||||
|
{"group:planks", "group:planks", "group:planks"},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_node(
|
minetest.register_node(
|
||||||
"locks:chest",
|
"locks:chest",
|
||||||
{
|
{
|
||||||
description = "Locked Chest",
|
description = "Locked Chest",
|
||||||
tiles ={"default_chest_top.png", "default_chest_top.png", "default_chest_sides.png",
|
tiles ={"default_chest_top.png", "default_chest_top.png", "default_chest_sides.png",
|
||||||
"default_chest_sides.png", "default_chest_sides.png", "default_chest_front.png^default_ingot_steel.png"},
|
"default_chest_sides.png", "default_chest_sides.png", "locks_chest_front.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2},
|
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
@ -129,4 +158,12 @@ minetest.register_node(
|
|||||||
return inv:is_empty("main") and locks.is_owner(meta, player)
|
return inv:is_empty("main") and locks.is_owner(meta, player)
|
||||||
end,
|
end,
|
||||||
on_blast = function() end,
|
on_blast = function() end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft(
|
||||||
|
{
|
||||||
|
output = "locks:chest",
|
||||||
|
type = "shapeless",
|
||||||
|
recipe = {"default:chest", "locks:lock"},
|
||||||
|
})
|
||||||
|
|
||||||
|
BIN
mods/locks/textures/locks_lock.png
Normal file
BIN
mods/locks/textures/locks_lock.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 309 B |
BIN
mods/locks/textures/locks_lock.xcf
Normal file
BIN
mods/locks/textures/locks_lock.xcf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user