diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-07-24 20:57:17 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-07-24 20:57:17 +0300 |
commit | 2ac20982e0772b94b21d95b53519bd2164632d98 (patch) | |
tree | 3a2e7b783ff4362ac723dee22809a8e6b7f8750a /games/minimal | |
parent | 96eac87d47e4d9e815dff5c9f830326e515d4ea2 (diff) | |
download | minetest-2ac20982e0772b94b21d95b53519bd2164632d98.tar.gz minetest-2ac20982e0772b94b21d95b53519bd2164632d98.tar.bz2 minetest-2ac20982e0772b94b21d95b53519bd2164632d98.zip |
Detached inventories
Diffstat (limited to 'games/minimal')
-rw-r--r-- | games/minimal/mods/experimental/init.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/games/minimal/mods/experimental/init.lua b/games/minimal/mods/experimental/init.lua index 3f50263e0..498c64623 100644 --- a/games/minimal/mods/experimental/init.lua +++ b/games/minimal/mods/experimental/init.lua @@ -524,6 +524,12 @@ minetest.register_craft({ end) end)]] +-- Create a detached inventory +local inv = minetest.create_detached_inventory("test_inventory") +inv:set_size("main", 4*6) +inv:add_item("main", "experimental:tester_tool_1") +inv:add_item("main", "experimental:tnt 5") + minetest.register_chatcommand("test1", { params = "", description = "Test 1: Modify player's inventory view", @@ -538,6 +544,7 @@ minetest.register_chatcommand("test1", { "list[current_player;main;5,3.5;8,4;]".. "list[current_player;craft;8,0;3,3;]".. "list[current_player;craftpreview;12,1;1,1;]".. + "list[detached:test_inventory;main;0,0;4,6;0]".. "button[0.5,7;2,1;button1;Button 1]".. "button_exit[2.5,7;2,1;button2;Exit Button]" ) |