get rid of commands becuase arenalib does it

This commit is contained in:
MisterE 2024-12-23 11:42:35 -05:00
parent 0de6f236d9
commit 10fda814a8
3 changed files with 1 additions and 64 deletions

View File

@ -1,62 +0,0 @@
local S = minetest.get_translator("sumo")
ChatCmdBuilder.new("sumo", function(cmd)
-- create arena
cmd:sub("create :arena", function(name, arena)
arena_lib.create_arena(name, "sumo", arena)
end)
cmd:sub("create :arena :minplayers:int :maxplayers:int", function(name, arena, min_players, max_players)
arena_lib.create_arena(name, "sumo", arena, min_players, max_players)
end)
-- remove arena
cmd:sub("remove :arena", function(name, arena)
arena_lib.remove_arena(name, "sumo", arena)
end)
-- list of the arenas
cmd:sub("list", function(name)
arena_lib.print_arenas(name, "sumo")
end)
-- info about an arena
cmd:sub("info :arena", function(sender, arena)
arena_lib.print_arena_info(sender, "sumo", arena)
end)
-- enter editor mode
cmd:sub("edit :arena", function(sender, arena)
arena_lib.enter_editor(sender, "sumo", arena)
end)
-- enable and disable arenas
cmd:sub("enable :arena", function(name, arena)
arena_lib.enable_arena(name, "sumo", arena)
end)
cmd:sub("disable :arena", function(name, arena)
arena_lib.disable_arena(name, "sumo", arena)
end)
cmd:sub("version", function(name)
minetest.chat_send_player(name, S("The version of Sumo is @1", sumo.version))
end)
end, {
description = "\n"..
"\n"..
S("(/help sumo)").."\n"..
"\n"..
S("Use this to configure your arena:").."\n"..
"- create <"..S("arena name").."> ["..S("min players").."] ["..S("max players").."]".."\n"..
"- edit <"..S("arena name")..">".."\n"..
"- enable <"..S("arena name")..">".."\n"..
"\n"..
S("Other commands:").."\n"..
"- remove <"..S("arena name")..">".."\n"..
"- disable <"..S("arena")..">".."\n"..
"- version".."\n",
privs = { sumo_admin = true }
})

View File

@ -55,7 +55,6 @@ local player_jump = sumo.player_jump -- when in the minigame, though players can
})
dofile(minetest.get_modpath("sumo") .. "/commands.lua")
dofile(minetest.get_modpath("sumo") .. "/items.lua")
dofile(minetest.get_modpath("sumo") .. "/minigame_manager.lua")
dofile(minetest.get_modpath("sumo") .. "/nodes.lua")

View File

@ -1,4 +1,4 @@
name = sumo
description = Sumo subgame
depends = default, arena_lib, lib_chatcmdbuilder
depends = default, arena_lib
optional_depends = visible_wielditem