2021-09-11 02:48:40 -04:00
|
|
|
|
|
|
|
|
|
|
|
if not minetest.get_modpath("lib_chatcmdbuilder") then
|
|
|
|
dofile(minetest.get_modpath("gems") .. "/chatcmdbuilder.lua")
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
arena_lib.register_minigame("gems_4", {
|
|
|
|
|
|
|
|
prefix = "[Gems]",
|
|
|
|
show_minimap = true,
|
|
|
|
teams = {
|
|
|
|
"ruby", -- red
|
|
|
|
"sapphire", --blue
|
|
|
|
"emerald", --green
|
|
|
|
"opal", --yellow
|
|
|
|
},
|
|
|
|
teams_color_overlay = { "orange", "blue", "green", "yellow"},
|
|
|
|
properties = {
|
|
|
|
schem_name = "You_dont_need_the_file_extention",
|
|
|
|
schem_location = { x = 0, y = 0, z = 0 },
|
|
|
|
area_to_clear_pos_1 = { x = 0, y = 0, z = 0 },
|
|
|
|
area_to_clear_pos_2 = { x = 0, y = 0, z = 0 },
|
|
|
|
ruby_gem = { x = 0, y = 0, z = 0 },
|
|
|
|
sapphire_gem = { x = 0, y = 0, z = 0 },
|
|
|
|
emerald_gem = { x = 0, y = 0, z = 0 },
|
|
|
|
opal_gem = { x = 0, y = 0, z = 0 },
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
team_properties = {
|
|
|
|
gem_exists = true,
|
|
|
|
},
|
|
|
|
disabled_damage_types = {},
|
|
|
|
is_team_chat_default = false,
|
|
|
|
time_mode = "incremental",
|
2021-09-16 07:21:33 -04:00
|
|
|
--join_while_in_progress = true,
|
2021-09-11 02:48:40 -04:00
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dofile(minetest.get_modpath("gems_4") .. "/auto.lua")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ChatCmdBuilder.new("gems_4", function(cmd)
|
|
|
|
-- create arena
|
|
|
|
cmd:sub("create :arena", function(name, arena_name)
|
|
|
|
arena_lib.create_arena(name, "gems_4", arena_name)
|
|
|
|
end)
|
|
|
|
|
|
|
|
cmd:sub("create :arena :minplayers:int :maxplayers:int", function(name, arena_name, min_players, max_players)
|
|
|
|
arena_lib.create_arena(name, "gems_4", arena_name, min_players, max_players)
|
|
|
|
end)
|
|
|
|
|
|
|
|
-- remove arena
|
|
|
|
cmd:sub("remove :arena", function(name, arena_name)
|
|
|
|
arena_lib.remove_arena(name, "gems_4", arena_name)
|
|
|
|
end)
|
|
|
|
|
|
|
|
-- list of the arenas
|
|
|
|
cmd:sub("list", function(name)
|
|
|
|
arena_lib.print_arenas(name, "gems_4")
|
|
|
|
end)
|
|
|
|
|
|
|
|
-- enter editor mode
|
|
|
|
cmd:sub("edit :arena", function(sender, arena)
|
|
|
|
arena_lib.enter_editor(sender, "gems_4", arena)
|
|
|
|
end)
|
|
|
|
|
|
|
|
-- enable and disable arenas
|
|
|
|
cmd:sub("enable :arena", function(name, arena)
|
|
|
|
arena_lib.enable_arena(name, "gems_4", arena)
|
|
|
|
end)
|
|
|
|
|
|
|
|
cmd:sub("disable :arena", function(name, arena)
|
|
|
|
arena_lib.disable_arena(name, "gems_4", arena)
|
|
|
|
end)
|
|
|
|
|
|
|
|
end, {
|
|
|
|
description = [[
|
|
|
|
|
|
|
|
(/help gems_4)
|
|
|
|
|
|
|
|
Use this to configure your arena:
|
|
|
|
- create <arena name> [min players] [max players]
|
|
|
|
- edit <arena name>
|
|
|
|
- enable <arena name>
|
|
|
|
|
|
|
|
Other commands:
|
|
|
|
- remove <arena name>
|
|
|
|
- disable <arena>
|
|
|
|
]],
|
|
|
|
privs = {
|
|
|
|
gems_admin = true
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|