diff --git a/init.lua b/init.lua index 728e245..1fa900e 100644 --- a/init.lua +++ b/init.lua @@ -44,6 +44,10 @@ if minetest.settings:get("telepro_autogen") == "false" then telepro.var.autogen telepro.var.limite_diario = true if minetest.settings:get("telepro_daily_limit") == "false" then telepro.var.limite_diario = false end +-- Desabilitar botão de geração de balão aleatorio +telepro.var.disable_random_balloon_button = false +if minetest.settings:get("telepro_disable_random_balloon_button") == "true" then telepro.var.disable_random_balloon_button = true end + -- Tempo de verificação do balao proprio telepro.var.tempo_verificar_balao = tonumber(minetest.setting_get("telepro_time_check_balloon") or 15) if telepro.var.tempo_verificar_balao < 5 then telepro.var.tempo_verificar_balao = 5 end diff --git a/interface_jogador.lua b/interface_jogador.lua index 9f8f617..a467098 100644 --- a/interface_jogador.lua +++ b/interface_jogador.lua @@ -23,9 +23,13 @@ telepro.acessar = function(player) ..default.gui_bg ..default.gui_bg_img .."image[0,0;3.5,3.5;telepro_mapa.png]" - .."button_exit[0,3.25;3,1;gerar_balao;"..S("Gerar Balao").."]" .."button_exit[0,4.25;3,1;por_balao_aqui;"..S("Por Balao Aqui").."]" - + + -- Botão de gerar balão aleatorio + if telepro.var.disable_random_balloon_button == false then + formspec = formspec.."button_exit[0,3.25;3,1;gerar_balao;"..S("Gerar Balao").."]" + end + -- Exibir formspec minetest.show_formspec(player:get_player_name(), "telepro:jogador", formspec) end diff --git a/settingtypes.txt b/settingtypes.txt index 6875b28..65e8789 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -1,19 +1,23 @@ # Configurações aplicaveis para o menu gráfico -#Gera automaticamente um balao proprio para jogadores -#que ainda nunca geraram -#Automatically generates a balloon for players who -#have never yet generated it +# Gera automaticamente um balao proprio para jogadores +# que ainda nunca geraram +# Automatically generates a balloon for players who +# have never yet generated it telepro_autogen (Autogerar Balao proprio) bool true -#Limita a geração de balões proprios em lugares aleatorios do mapa -#Limite de 1 a cada 24 horas -#Limits the generation of own balloons in random places on the map -#Limit of 24 hours for a new generation +# Limita a geração de balões proprios em lugares aleatorios do mapa +# Limite de 1 a cada 24 horas +# Limits the generation of own balloons in random places on the map +# Limit of 24 hours for a new generation telepro_daily_limit (Limite diario para gerar) bool true -#Tempo entre cada vez que o balão do jogador é verificado -#Time step which balloon is verified +# Desabilita o botão de gerar balão aleatorio no mapa +# Disable the button generate random balloon on the map +telepro_disable_random_balloon_button (Desabilitar botão de geração randomica) bool false + +# Tempo entre cada vez que o balão do jogador é verificado +# Time step which balloon is verified telepro_time_check_balloon (Tempo do iterador de checagem do balao) int 15 5