diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..bc0b1db --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1 @@ +WTFPL diff --git a/README.md b/README.md new file mode 100644 index 0000000..49e029e --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +[Mod] connected chests [connected_chests] + +This mod allows making bigger default chests. +Just hold shift and place a chest onto another one's side. +This is not the first mod which adds big chests. + +**Depends:** see [depends.txt](https://raw.githubusercontent.com/HybridDog/connected_chests/master/depends.txt) +**License:** see [LICENSE.txt](https://raw.githubusercontent.com/HybridDog/connected_chests/master/LICENSE.txt) +**Download:** [zip](https://github.com/HybridDog/connected_chests/archive/master.zip), [tar.gz](https://github.com/HybridDog/connected_chests/tarball/master) + +![I'm a screenshot!](http://wiki.minetest.net/images/d/d1/Connected_chest.png) + +If you got ideas or found bugs, please tell them to me. + +[How to install a mod?](http://wiki.minetest.net/Installing_Mods) + + +TODO: +— disallow rotating the chest with a screwdriver diff --git a/README.txt b/README.txt deleted file mode 100644 index 53b95e2..0000000 --- a/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -TODO: -— disallow rotating the chest with a screwdriver diff --git a/init.lua b/init.lua index a2774e0..a579c21 100644 --- a/init.lua +++ b/init.lua @@ -154,7 +154,12 @@ end local top_texture = "connected_chests_top.png^default_chest_top.png^([combine:16x16:5,0=default_chest_top.png^connected_chests_frame.png^[makealpha:255,126,126)^connected_chests_top.png" local side_texture = "connected_chests_side.png^default_chest_side.png^([combine:16x16:5,0=default_chest_side.png^connected_chests_frame.png^[makealpha:255,126,126)^connected_chests_side.png" -local chest = table.copy(minetest.registered_nodes["default:chest"]) +local chest = {} +local origdef = minetest.registered_nodes["default:chest"] +for i in pairs(origdef) do + chest[i] = rawget(origdef, i) +end + chest.description = nil chest.legacy_facedir_simple = nil chest.after_place_node = nil @@ -183,7 +188,12 @@ end minetest.register_node("connected_chests:chest_left", chest) -local chest_locked = table.copy(minetest.registered_nodes["default:chest_locked"]) +local chest_locked = {} +local origdef = minetest.registered_nodes["default:chest_locked"] +for i in pairs(origdef) do + chest_locked[i] = rawget(origdef, i) +end + chest_locked.description = nil chest_locked.legacy_facedir_simple = nil chest_locked.after_place_node = nil