From c54052f3d94c800a2371694d745dbd59a1091716 Mon Sep 17 00:00:00 2001 From: kaadmy Date: Wed, 30 Sep 2015 09:58:28 -0700 Subject: [PATCH] added lock craftitem for making locked stuff --- mods/locks/init.lua | 41 +++++++++++++++++++++++++++-- mods/locks/textures/locks_lock.png | Bin 0 -> 309 bytes mods/locks/textures/locks_lock.xcf | Bin 0 -> 1087 bytes 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 mods/locks/textures/locks_lock.png create mode 100644 mods/locks/textures/locks_lock.xcf diff --git a/mods/locks/init.lua b/mods/locks/init.lua index 73440fc..dd63dd9 100644 --- a/mods/locks/init.lua +++ b/mods/locks/init.lua @@ -65,12 +65,41 @@ minetest.register_tool( 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( "locks:chest", { description = "Locked Chest", 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", groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2}, is_ground_content = false, @@ -129,4 +158,12 @@ minetest.register_node( return inv:is_empty("main") and locks.is_owner(meta, player) end, on_blast = function() end, - }) \ No newline at end of file + }) + +minetest.register_craft( + { + output = "locks:chest", + type = "shapeless", + recipe = {"default:chest", "locks:lock"}, + }) + diff --git a/mods/locks/textures/locks_lock.png b/mods/locks/textures/locks_lock.png new file mode 100644 index 0000000000000000000000000000000000000000..038b8fcab473a05e5b4acaaf7d2f95fb74d9f272 GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~r<{PLnSasWD?lO164!_l=ltB<)VvY~=c3falGGH1 z^30M91$R&1fbd2>aiF5Po-U3d7N?W{{QqyytlH4o=yagT_rj4QEQcf0&&^3xImI9> zJo*1@^Zc{~AgK8EMsnA}9-xe4;Q0<2HZ?W1|3J>k3G?RlB??cn=u(u>n=on8p#mc_ z{f9g*De1z>=bF3~^`b8xW;om+eSWv(q02iYHgpQh_Wqe}aMbRVpd{N3lgGl#>%40I sy_5E2Ggy?aR#VugYiZ0^k;lRiJ;CL|Dx(>mK!-ATy85}Sb4q9e06)uYZ2$lO literal 0 HcmV?d00001 diff --git a/mods/locks/textures/locks_lock.xcf b/mods/locks/textures/locks_lock.xcf new file mode 100644 index 0000000000000000000000000000000000000000..36e748bd7cf5c422df29fc7f485e20ce0fee77b2 GIT binary patch literal 1087 zcmcIiyH3ME5Ij4vlkgC4DvB#ogdzyEH4PMq0*RK=IJP-Cv5{>A6iC#OkZAoA6!{K+ z2R{MMv1^}+5rGO;8t>ff?Ctq%PmHelo$Yd03>}8Csz7`Vp=tQoK(vpZ86#k9BASQ> zVq0zdLowK0=((O94#SA|iqwz1ON;OC?H4hJ9H`PRwqDL@t?K+|Lalf4wPlOI z;|J9&6z}JWO6%VQBH<#iubi0rL)VR+B?qermrIrZN#l4;nLCH`V|E literal 0 HcmV?d00001