parent
5fcd8e817e
commit
0cc22f37df
|
@ -4,14 +4,12 @@ local function select_kit(pl_name, kit_items)
|
|||
for i=1, #kit_items do
|
||||
player_inv:add_item("main", ItemStack(kit_items[i]))
|
||||
end
|
||||
minetest.sound_play("sw_kit_selector", { pos = minetest.get_player_by_name(pl_name):get_pos(), to_player = pl_name })
|
||||
end
|
||||
|
||||
|
||||
|
||||
local function create_formspec(arena)
|
||||
local width = 5
|
||||
local height = 6
|
||||
|
||||
local formspec = {
|
||||
"formspec_version[3]",
|
||||
"size[12,12]",
|
||||
|
@ -70,7 +68,6 @@ end
|
|||
|
||||
function skywars.show_kit_selector(pl_name, arena)
|
||||
if #arena.kits == 0 then return end
|
||||
|
||||
minetest.show_formspec(pl_name, "skywars:kit_selector", create_formspec(arena))
|
||||
end
|
||||
|
||||
|
|
|
@ -91,6 +91,8 @@ function(cmd)
|
|||
]])
|
||||
end)
|
||||
|
||||
|
||||
|
||||
-- create arena
|
||||
cmd:sub("create :arena", function(name, arena_name)
|
||||
arena_lib.create_arena(name, "skywars", arena_name)
|
||||
|
@ -128,7 +130,7 @@ function(cmd)
|
|||
-- this sets the spawns using the player position
|
||||
cmd:sub("setspawn :arena", function(name, arena)
|
||||
arena_lib.set_spawner(name, "skywars", arena)
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
|
||||
|
@ -220,7 +222,6 @@ function(cmd)
|
|||
break
|
||||
end
|
||||
end
|
||||
|
||||
arena_lib.change_arena_property(sender, "skywars", arena_name, "treasures", arena.treasures, false)
|
||||
|
||||
if found then skywars.print_msg(sender, skywars.T("@1 removed from @2", treasure_name, arena_name))
|
||||
|
@ -252,8 +253,8 @@ function(cmd)
|
|||
for i=1, #from_arena.treasures do
|
||||
to_arena.treasures[i] = from_arena.treasures[i]
|
||||
end
|
||||
|
||||
arena_lib.change_arena_property(sender, "skywars", to, "treasures", to_arena.treasures, false)
|
||||
|
||||
skywars.print_msg(sender, skywars.T("@1 treasures have been copied to @2!", from, to))
|
||||
end)
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Loading…
Reference in New Issue