commit | author | age
|
fd3f25
|
1 |
-- Minetest 0.4.6 mod: technic_chests |
R |
2 |
-- namespace: technic |
|
3 |
-- (c) 2012-2013 by RealBadAngel <mk@realbadangel.pl> |
|
4 |
|
c17732
|
5 |
local modpath = minetest.get_modpath("technic_chests") |
fd3f25
|
6 |
|
49e82a
|
7 |
technic = rawget(_G, "technic") or {} |
78cacd
|
8 |
technic.chests = {} |
S |
9 |
|
|
10 |
dofile(modpath.."/common.lua") |
|
11 |
dofile(modpath.."/register.lua") |
fd3f25
|
12 |
dofile(modpath.."/iron_chest.lua") |
R |
13 |
dofile(modpath.."/copper_chest.lua") |
|
14 |
dofile(modpath.."/silver_chest.lua") |
|
15 |
dofile(modpath.."/gold_chest.lua") |
|
16 |
dofile(modpath.."/mithril_chest.lua") |
78cacd
|
17 |
|
44cb8d
|
18 |
-- undo all of the locked wooden chest recipes created by default and |
VD |
19 |
-- moreblocks, and just make them use a padlock. |
|
20 |
|
|
21 |
if minetest.get_modpath("moreblocks") then |
|
22 |
minetest.clear_craft({ |
|
23 |
type = "shapeless", |
|
24 |
recipe = { |
|
25 |
"default:chest", |
|
26 |
"default:gold_ingot", |
|
27 |
} |
|
28 |
}) |
|
29 |
|
|
30 |
minetest.clear_craft({ |
|
31 |
type = "shapeless", |
|
32 |
recipe = { |
|
33 |
"default:chest", |
|
34 |
"default:bronze_ingot", |
|
35 |
} |
|
36 |
}) |
|
37 |
|
|
38 |
minetest.clear_craft({ |
|
39 |
type = "shapeless", |
|
40 |
recipe = { |
|
41 |
"default:chest", |
|
42 |
"default:copper_ingot", |
|
43 |
} |
|
44 |
}) |
|
45 |
end |
|
46 |
|
|
47 |
minetest.clear_craft({ |
|
48 |
type = "shapeless", |
|
49 |
recipe = { |
|
50 |
"default:chest", |
|
51 |
"default:steel_ingot", |
|
52 |
} |
|
53 |
}) |
|
54 |
|
|
55 |
minetest.clear_craft({output = "default:chest_locked"}) |
|
56 |
|
|
57 |
minetest.register_craft({ |
|
58 |
output = "default:chest_locked", |
|
59 |
recipe = { |
|
60 |
{ "group:wood", "group:wood", "group:wood" }, |
|
61 |
{ "group:wood", "basic_materials:padlock", "group:wood" }, |
|
62 |
{ "group:wood", "group:wood", "group:wood" } |
|
63 |
} |
|
64 |
}) |
|
65 |
|
|
66 |
minetest.register_craft({ |
|
67 |
output = "default:chest_locked", |
|
68 |
type = "shapeless", |
|
69 |
recipe = { |
|
70 |
"default:chest", |
|
71 |
"basic_materials:padlock" |
|
72 |
} |
|
73 |
}) |
|
74 |
|
68fac3
|
75 |
minetest.register_lbm({ |
V |
76 |
name = "technic_chests:fix_wooden_chests", |
|
77 |
nodenames = {"default:chest"}, |
|
78 |
action = function(pos, node) |
|
79 |
local meta = minetest.get_meta(pos) |
|
80 |
meta:set_string("formspec", "") |
|
81 |
end |
|
82 |
}) |