various fixes
parent
2594d4e10f
commit
18dfd96be1
|
@ -6,9 +6,10 @@ function epic_score.form_highscore_configure(pos, playername)
|
|||
local topic = meta:get_string("topic")
|
||||
|
||||
local formspec = "size[8,2;]" ..
|
||||
"field[0,0;8,1;topic;Topic;" .. topic .. "]" ..
|
||||
"button_exit[0,1;4,1;start;Start]" ..
|
||||
"button_exit[4,1;4,1;show;Show]"
|
||||
"field[0.2,0.5;8,1;topic;Topic;" .. topic .. "]" ..
|
||||
|
||||
"button_exit[0,1.2;4,1;save;Save]" ..
|
||||
"button_exit[4,1.2;4,1;show;Show]"
|
||||
|
||||
minetest.show_formspec(playername,
|
||||
FORMNAME .. ";" .. minetest.pos_to_string(pos),
|
||||
|
|
|
@ -12,6 +12,11 @@ minetest.register_node("epic_score:highscore", {
|
|||
groups = {cracky=3,oddly_breakable_by_hand=3,epic=1},
|
||||
on_rotate = screwdriver.rotate_simple,
|
||||
|
||||
on_punch = function(pos, _, puncher)
|
||||
-- view
|
||||
epic_score.form_highscore_view(pos, puncher:get_player_name())
|
||||
end,
|
||||
|
||||
on_rightclick = function(pos, _, player)
|
||||
local playername = player:get_player_name()
|
||||
if minetest.is_protected(pos, playername) then
|
||||
|
|
|
@ -5,7 +5,7 @@ local update_formspec = function(meta)
|
|||
|
||||
meta:set_string("formspec", "size[8,3;]" ..
|
||||
"field[0.2,0.5;8,1;amount;Amount;" .. amount .. "]" ..
|
||||
"field[1.2,0.5;8,1;seconds;Per seconds;" .. seconds .. "]" ..
|
||||
"field[0.2,1.5;8,1;seconds;Per seconds;" .. seconds .. "]" ..
|
||||
|
||||
"button_exit[2.1,1.5;8,1;save;Save]"
|
||||
)
|
||||
|
|
|
@ -84,7 +84,7 @@ function epic_score.update_score(topic, playername, score)
|
|||
table.insert(new_score, entry)
|
||||
end
|
||||
|
||||
save_score(score_table, new_score)
|
||||
save_score(topic, new_score)
|
||||
end
|
||||
|
||||
function epic_score.get_score(topic)
|
||||
|
|
Loading…
Reference in New Issue