correção da loja de premios

master
BrunoMine 2018-07-22 22:30:51 -03:00
parent e4c91a689e
commit b55fa396fb
2 changed files with 5 additions and 2 deletions

View File

@ -101,8 +101,7 @@ for _,dados in ipairs({
{name=nil, item="default:mese_crystal", qtd=3, custo=180},
{name=nil, item="default:diamond", qtd=3, custo=250},
{name=nil, item="default:gold_ingot", qtd=5, custo=400},
{name=nil, item="default:steel_ingot", qtd=10, custo=300},
{name=nil, item="default:steel_ingot", qtd=10, custo=200},
{name=nil, item="default:steel_ingot", qtd=10, custo=250},
{name=nil, item="default:coal_lump", qtd=30, custo=100},
{name=nil, item="default:brick", qtd=30, custo=180},
{name=nil, item="default:clay", qtd=40, custo=180},

View File

@ -111,6 +111,10 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
else
player:set_attribute("xpro_xp_gasto", (xp_gasto+escolha.custo))
xpro.acessar_shop(name, minetest.colorize("#0C0", S("Adiquirido")))
-- Limpa o inventario para exibir novo cash disponivel
if sfinv then
sfinv.set_player_inventory_formspec(minetest.get_player_by_name(name))
end
end
end
end