diff --git a/src/admin_tools/entrances.lua b/src/admin_tools/entrances.lua index 7a36c20..996aa42 100644 --- a/src/admin_tools/entrances.lua +++ b/src/admin_tools/entrances.lua @@ -15,7 +15,6 @@ end) function arena_lib.enter_entrance_settings(p_name, mod) - if arena_lib.is_player_in_arena(p_name) then arena_lib.print_error(p_name, S("You can't perform this action while in game!")) return end @@ -25,7 +24,7 @@ function arena_lib.enter_entrance_settings(p_name, mod) return end players_in_entrance_fs[p_name] = mod - minetest.show_formspec(p_name, "arena_lib:entrance_settings", get_formspec(p_name, mod)) + minetest.show_formspec(p_name, "arena_lib:entrance_settings", get_formspec(mod)) end @@ -50,17 +49,17 @@ end -function get_formspec(sender, mod, all_value) - +function get_formspec(mod, all_value) local mod_ref = arena_lib.mods[mod] local arenas_amnt = 0 - for _, arena in pairs(mod_ref.arenas) do + for _, _ in pairs(mod_ref.arenas) do arenas_amnt = arenas_amnt + 1 end local row_height = 0.8 local size_y = 2.8 + (row_height * arenas_amnt) + all_value = all_value or entrances[arena_lib.DEFAULT_ENTRANCE] local formspec = { @@ -113,7 +112,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end local entrance_type_id = entrances[entrances_tr_name[fields["all_arenas"]]] - minetest.show_formspec(p_name, "arena_lib:entrance_settings", get_formspec(p_name, mod, entrance_type_id)) + minetest.show_formspec(p_name, "arena_lib:entrance_settings", get_formspec(mod, entrance_type_id)) -- ..sennĂ² solo quella del tasto premuto else diff --git a/src/api/teams.lua b/src/api/teams.lua index 8cb2e47..25864a8 100644 --- a/src/api/teams.lua +++ b/src/api/teams.lua @@ -56,7 +56,7 @@ end function arena_lib.get_teamID(p_name) - if not arena_lib.is_player_in_arena(p_name) then return end + if not arena_lib.is_player_playing(p_name) then return end local arena = arena_lib.get_arena_by_player(p_name)