Editor: show what team you are editing spawners for when entering the spawner section (closes #293)

This commit is contained in:
marco_a 2024-02-07 19:48:44 +01:00
parent 42819e8e2b
commit c6265a6077
2 changed files with 2 additions and 2 deletions

View File

@ -1286,8 +1286,6 @@ function handle_leaving_callbacks(mod, arena, p_name, p_properties, reason, xc_n
if reason == 0 then
arena_lib.send_message_in_arena(arena, "both", minetest.colorize(msg_color, "<<< " .. p_name .. spect_str))
local sound
if not is_spectator and mod_ref.sounds.disconnect then
for pl_name, _ in pairs(arena.players) do
audio_lib.play_sound(mod_ref.sounds.disconnect, {to_player = pl_name})

View File

@ -12,6 +12,7 @@ local spawners_tools_team = {
"arena_lib:editor_return",
"arena_lib:editor_quit",
}
local spawners_tools_noteam = {
"arena_lib:spawner_add",
"arena_lib:spawner_remove",
@ -173,6 +174,7 @@ function arena_lib.give_spawners_tools(player)
if arena.teams_enabled then
player:get_inventory():set_list("main", spawners_tools_team)
minetest.chat_send_player(player:get_player_name(), S("Selected team: @1", arena_lib.mods[mod].teams[1]))
else
player:get_inventory():set_list("main", spawners_tools_noteam)
end