From 446def12946424f6de040d511d5575f4b7b82e5f Mon Sep 17 00:00:00 2001 From: ANAND Date: Tue, 21 Apr 2020 07:38:31 +0530 Subject: [PATCH] Rename on_skip_map to on_skip_match (#581) --- mods/ctf/ctf_match/vote.lua | 10 +++++----- mods/ctf/ctf_stats/init.lua | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mods/ctf/ctf_match/vote.lua b/mods/ctf/ctf_match/vote.lua index 16ed854..263f67b 100644 --- a/mods/ctf/ctf_match/vote.lua +++ b/mods/ctf/ctf_match/vote.lua @@ -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 diff --git a/mods/ctf/ctf_stats/init.lua b/mods/ctf/ctf_stats/init.lua index 74fc529..1e2e5ac 100644 --- a/mods/ctf/ctf_stats/init.lua +++ b/mods/ctf/ctf_stats/init.lua @@ -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