11-- Minetest 0.4 mod: bones
22-- See README.txt for licensing and other information.
33
4+ bones = {}
5+
46local function is_owner (pos , name )
57 local owner = minetest .get_meta (pos ):get_string (" owner" )
68 if owner == " " or owner == name then
@@ -9,6 +11,16 @@ local function is_owner(pos, name)
911 return false
1012end
1113
14+ bones .bones_formspec =
15+ " size[8,9]" ..
16+ default .gui_bg ..
17+ default .gui_bg_img ..
18+ default .gui_slots ..
19+ " list[current_name;main;0,0.3;8,4;]" ..
20+ " list[current_player;main;0,4.85;8,1;]" ..
21+ " list[current_player;main;0,6.08;8,3;8]" ..
22+ default .get_hotbar_bg (0 ,4.85 )
23+
1224minetest .register_node (" bones:bones" , {
1325 description = " Bones" ,
1426 tiles = {
@@ -158,9 +170,7 @@ minetest.register_on_dieplayer(function(player)
158170 player_inv :set_list (" main" , {})
159171 player_inv :set_list (" craft" , {})
160172
161- meta :set_string (" formspec" , " size[8,9;]" ..
162- " list[current_name;main;0,0;8,4;]" ..
163- " list[current_player;main;0,5;8,4;]" )
173+ meta :set_string (" formspec" , bones .bones_formspec )
164174 meta :set_string (" infotext" , player_name .. " 's fresh bones" )
165175 meta :set_string (" owner" , player_name )
166176 meta :set_int (" time" , 0 )
0 commit comments