aboutsummaryrefslogtreecommitdiff
path: root/games/devtest/mods/chest
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2020-05-26 00:17:52 +0200
committerGitHub <noreply@github.com>2020-05-26 00:17:52 +0200
commit083b285f4319c470f307f0b52f03a2fb68facd38 (patch)
treebdd02540ad58756a38606f03a995ab837a176709 /games/devtest/mods/chest
parentb546e8938d41aa9e3101fb9d4d5b02924ed73b60 (diff)
downloadminetest-083b285f4319c470f307f0b52f03a2fb68facd38.tar.gz
minetest-083b285f4319c470f307f0b52f03a2fb68facd38.tar.bz2
minetest-083b285f4319c470f307f0b52f03a2fb68facd38.zip
Rename “Minimal development test” to “Development Test” (#9928)
Diffstat (limited to 'games/devtest/mods/chest')
-rw-r--r--games/devtest/mods/chest/init.lua27
-rw-r--r--games/devtest/mods/chest/mod.conf2
-rw-r--r--games/devtest/mods/chest/textures/chest_chest.pngbin0 -> 163 bytes
3 files changed, 29 insertions, 0 deletions
diff --git a/games/devtest/mods/chest/init.lua b/games/devtest/mods/chest/init.lua
new file mode 100644
index 000000000..c44522cb9
--- /dev/null
+++ b/games/devtest/mods/chest/init.lua
@@ -0,0 +1,27 @@
+minetest.register_node("chest:chest", {
+ description = "Chest",
+ tiles ={"chest_chest.png^[sheet:2x2:0,0", "chest_chest.png^[sheet:2x2:0,0",
+ "chest_chest.png^[sheet:2x2:1,0", "chest_chest.png^[sheet:2x2:1,0",
+ "chest_chest.png^[sheet:2x2:1,0", "chest_chest.png^[sheet:2x2:0,1"},
+ paramtype2 = "facedir",
+ groups = {dig_immediate=2,choppy=3},
+ is_ground_content = false,
+ on_construct = function(pos)
+ local meta = minetest.get_meta(pos)
+ meta:set_string("formspec",
+ "size[8,9]"..
+ "list[current_name;main;0,0;8,4;]"..
+ "list[current_player;main;0,5;8,4;]" ..
+ "listring[]")
+ meta:set_string("infotext", "Chest")
+ local inv = meta:get_inventory()
+ inv:set_size("main", 8*4)
+ end,
+ can_dig = function(pos,player)
+ local meta = minetest.get_meta(pos);
+ local inv = meta:get_inventory()
+ return inv:is_empty("main")
+ end,
+})
+
+
diff --git a/games/devtest/mods/chest/mod.conf b/games/devtest/mods/chest/mod.conf
new file mode 100644
index 000000000..0d7500164
--- /dev/null
+++ b/games/devtest/mods/chest/mod.conf
@@ -0,0 +1,2 @@
+name = chest
+description = A simple chest to store items
diff --git a/games/devtest/mods/chest/textures/chest_chest.png b/games/devtest/mods/chest/textures/chest_chest.png
new file mode 100644
index 000000000..824b4d502
--- /dev/null
+++ b/games/devtest/mods/chest/textures/chest_chest.png
Binary files differ