RealBadAngel
2013-02-21 e23f87d20c59c1a9fa0fbb3e887a87072f57d5e8
commit | author | age
82cba9 1 minetest.register_craft({
R 2     output = 'technic:project_table 1',
3     recipe = {
4         {'default:wood','default:wood','default:wood'},
5         {'default:wood','default:chest','default:wood'},
6         {'default:stone','default:stone','default:stone'},
7     }
8 })
9
10
11 minetest.register_craftitem("technic:project_table", {
12     description = "Project Table",
13     stack_max = 99,
14 })
15
16 minetest.register_node("technic:project_table", {
17     description = "Project Table",
18     tiles = {"technic_iron_chest_top.png", "technic_iron_chest_top.png", "technic_iron_chest_side.png",
19         "technic_iron_chest_side.png", "technic_iron_chest_side.png", "technic_iron_chest_front.png"},
20     paramtype2 = "facedir",
21     groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
22     legacy_facedir_simple = true,
23     sounds = default.node_sound_wood_defaults(),
24     on_construct = function(pos)
25         local meta = minetest.env:get_meta(pos)
26         meta:set_string("formspec",
27                 "invsize[9,9;]"..
28                 "list[current_name;main;0,2;8,2;]"..
29                 "list[current_player;main;0,5;8,4;]")
30         meta:set_string("infotext", "Iron Chest")
31         local inv = meta:get_inventory()
32         inv:set_size("main", 8*4)
33     end,
34     can_dig = function(pos,player)
35         local meta = minetest.env:get_meta(pos);
36         local inv = meta:get_inventory()
37         return inv:is_empty("main")
38     end,
39 })