mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 20:41:11 +01:00
fix possible crash
This commit is contained in:
parent
08b36e3eb3
commit
e5806215f0
1 changed files with 2 additions and 2 deletions
|
@ -1118,8 +1118,8 @@ local trade_inventory = {
|
||||||
-- First-time trade unlock all trades and unlock next trade tier
|
-- First-time trade unlock all trades and unlock next trade tier
|
||||||
if trade.tier + 1 > trader._max_trade_tier then
|
if trade.tier + 1 > trader._max_trade_tier then
|
||||||
trader._max_trade_tier = trader._max_trade_tier + 1
|
trader._max_trade_tier = trader._max_trade_tier + 1
|
||||||
if trader._max_trade_tier > #professions[trader._profession].trades then
|
if trader._max_trade_tier > 5 then
|
||||||
trader._max_trade_tier = #professions[trader._profession].trades
|
trader._max_trade_tier = 5
|
||||||
end
|
end
|
||||||
set_textures(trader)
|
set_textures(trader)
|
||||||
update_max_tradenum(trader)
|
update_max_tradenum(trader)
|
||||||
|
|
Loading…
Reference in a new issue