mirror of
https://github.com/a-bad-dev/simple-shooter-game.git
synced 2026-06-08 20:12:11 +00:00
Add a lot of new stuff
This commit is contained in:
parent
caaf2481d2
commit
948040e47b
13 changed files with 163 additions and 141 deletions
|
|
@ -28,7 +28,7 @@ core.register_chatcommand("stop", {
|
|||
privs = {match_manager = true},
|
||||
description = "Terminate the match",
|
||||
func = function()
|
||||
if match_state ~= "pre_match" and match_state ~= "post_match" and match_state ~= "not_started" then
|
||||
if match_state ~= "post_match" and match_state ~= "not_started" then
|
||||
core.chat_send_all(core.colorize("red", "Match terminated."))
|
||||
end_match()
|
||||
|
||||
|
|
@ -38,3 +38,17 @@ core.register_chatcommand("stop", {
|
|||
return false, "Match cannot be terminated at the moment."
|
||||
end
|
||||
})
|
||||
|
||||
core.register_chatcommand("list_maps", {
|
||||
params = "",
|
||||
privs = {match_manager = true},
|
||||
description = "List all maps",
|
||||
func = function()
|
||||
local maps = core.get_dir_list(core.get_modpath("maps") .. "/maps", true)
|
||||
local map_list = "Available maps:\n"
|
||||
for _, map in pairs(maps) do
|
||||
map_list = map_list .. map .. "\n"
|
||||
end
|
||||
return true, map_list .. "\nUse /start <map> to start a match."
|
||||
end
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue