diff options
author | RealBadAngel <mk@realbadangel.pl> | 2013-01-27 13:55:14 +0100 |
---|---|---|
committer | RealBadAngel <mk@realbadangel.pl> | 2013-01-27 13:55:14 +0100 |
commit | a30f1db52dfbd76845fa618d1399dd800f0382b3 (patch) | |
tree | e6dc64374b9763493b455bec712f392e31930012 /technic/project_table.lua | |
parent | 704a410fa1391318766927c8baa8a93b0731e7d0 (diff) |
fix to mod directory structure
Diffstat (limited to 'technic/project_table.lua')
-rw-r--r-- | technic/project_table.lua | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/technic/project_table.lua b/technic/project_table.lua new file mode 100644 index 0000000..355295c --- /dev/null +++ b/technic/project_table.lua @@ -0,0 +1,39 @@ +minetest.register_craft({ + output = 'technic:project_table 1', + recipe = { + {'default:wood','default:wood','default:wood'}, + {'default:wood','default:chest','default:wood'}, + {'default:stone','default:stone','default:stone'}, + } +}) + + +minetest.register_craftitem("technic:project_table", { + description = "Project Table", + stack_max = 99, +}) + +minetest.register_node("technic:project_table", { + description = "Project Table", + tiles = {"technic_iron_chest_top.png", "technic_iron_chest_top.png", "technic_iron_chest_side.png", + "technic_iron_chest_side.png", "technic_iron_chest_side.png", "technic_iron_chest_front.png"}, + paramtype2 = "facedir", + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, + legacy_facedir_simple = true, + sounds = default.node_sound_wood_defaults(), + on_construct = function(pos) + local meta = minetest.env:get_meta(pos) + meta:set_string("formspec", + "invsize[9,9;]".. + "list[current_name;main;0,2;8,2;]".. + "list[current_player;main;0,5;8,4;]") + meta:set_string("infotext", "Iron Chest") + local inv = meta:get_inventory() + inv:set_size("main", 8*4) + end, + can_dig = function(pos,player) + local meta = minetest.env:get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("main") + end, +})
\ No newline at end of file |