1
1
-- Minetest 0.4 mod: bones
2
2
-- See README.txt for licensing and other information.
3
3
4
+ bones = {}
5
+
4
6
local function is_owner (pos , name )
5
7
local owner = minetest .get_meta (pos ):get_string (" owner" )
6
8
if owner == " " or owner == name then
@@ -9,6 +11,16 @@ local function is_owner(pos, name)
9
11
return false
10
12
end
11
13
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
+
12
24
minetest .register_node (" bones:bones" , {
13
25
description = " Bones" ,
14
26
tiles = {
@@ -158,9 +170,7 @@ minetest.register_on_dieplayer(function(player)
158
170
player_inv :set_list (" main" , {})
159
171
player_inv :set_list (" craft" , {})
160
172
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 )
164
174
meta :set_string (" infotext" , player_name .. " 's fresh bones" )
165
175
meta :set_string (" owner" , player_name )
166
176
meta :set_int (" time" , 0 )
0 commit comments