Rename on_skip_map to on_skip_match (#581)

This commit is contained in:
ANAND 2020-04-21 07:38:31 +05:30 committed by GitHub
parent ffdb5dd799
commit 446def1294
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -1,9 +1,9 @@
ctf_match.registered_on_skip_map = {}
function ctf_match.register_on_skip_map(func)
ctf_match.registered_on_skip_match = {}
function ctf_match.register_on_skip_match(func)
if ctf._mt_loaded then
error("You can't register callbacks at game time!")
end
table.insert(ctf_match.registered_on_skip_map, func)
table.insert(ctf_match.registered_on_skip_match, func)
end
function ctf_match.vote_next(name, params)
@ -23,8 +23,8 @@ function ctf_match.vote_next(name, params)
if result == "yes" then
minetest.chat_send_all("Vote to skip match passed, " ..
#results.yes .. " to " .. #results.no)
for i = 1, #ctf_match.registered_on_skip_map do
ctf_match.registered_on_skip_map[i]()
for i = 1, #ctf_match.registered_on_skip_match do
ctf_match.registered_on_skip_match[i]()
end
ctf_match.next()
else

View file

@ -252,7 +252,7 @@ ctf_match.register_on_winner(function(winner)
storage:set_string("prev_match_summary", fs)
end)
ctf_match.register_on_skip_map(function()
ctf_match.register_on_skip_match(function()
_needs_save = true
ctf_stats.matches.skipped = ctf_stats.matches.skipped + 1