Rename on_skip_map to on_skip_match (#581)
This commit is contained in:
parent
ffdb5dd799
commit
446def1294
2 changed files with 6 additions and 6 deletions
|
@ -1,9 +1,9 @@
|
||||||
ctf_match.registered_on_skip_map = {}
|
ctf_match.registered_on_skip_match = {}
|
||||||
function ctf_match.register_on_skip_map(func)
|
function ctf_match.register_on_skip_match(func)
|
||||||
if ctf._mt_loaded then
|
if ctf._mt_loaded then
|
||||||
error("You can't register callbacks at game time!")
|
error("You can't register callbacks at game time!")
|
||||||
end
|
end
|
||||||
table.insert(ctf_match.registered_on_skip_map, func)
|
table.insert(ctf_match.registered_on_skip_match, func)
|
||||||
end
|
end
|
||||||
|
|
||||||
function ctf_match.vote_next(name, params)
|
function ctf_match.vote_next(name, params)
|
||||||
|
@ -23,8 +23,8 @@ function ctf_match.vote_next(name, params)
|
||||||
if result == "yes" then
|
if result == "yes" then
|
||||||
minetest.chat_send_all("Vote to skip match passed, " ..
|
minetest.chat_send_all("Vote to skip match passed, " ..
|
||||||
#results.yes .. " to " .. #results.no)
|
#results.yes .. " to " .. #results.no)
|
||||||
for i = 1, #ctf_match.registered_on_skip_map do
|
for i = 1, #ctf_match.registered_on_skip_match do
|
||||||
ctf_match.registered_on_skip_map[i]()
|
ctf_match.registered_on_skip_match[i]()
|
||||||
end
|
end
|
||||||
ctf_match.next()
|
ctf_match.next()
|
||||||
else
|
else
|
||||||
|
|
|
@ -252,7 +252,7 @@ ctf_match.register_on_winner(function(winner)
|
||||||
storage:set_string("prev_match_summary", fs)
|
storage:set_string("prev_match_summary", fs)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
ctf_match.register_on_skip_map(function()
|
ctf_match.register_on_skip_match(function()
|
||||||
_needs_save = true
|
_needs_save = true
|
||||||
ctf_stats.matches.skipped = ctf_stats.matches.skipped + 1
|
ctf_stats.matches.skipped = ctf_stats.matches.skipped + 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue