forked from Sokomine/yl_speak_up
always show let's trade or show me your inventory
This commit is contained in:
parent
5bd0bf23f3
commit
b5fa3dd4c2
@ -893,8 +893,8 @@ yl_speak_up.get_fs_talkdialog = function(player, n_id, d_id, alternate_text, rec
|
||||
|
||||
|
||||
-- add a Let's trade button to the first dialog if the NPC has trades
|
||||
if(is_a_start_dialog and dialog.trades) then
|
||||
local has_trades = nil
|
||||
if(is_a_start_dialog and dialog.trades) then
|
||||
for k, v in pairs(dialog.trades) do
|
||||
-- has the NPC any *public* trades that are not effects/results?
|
||||
if(not(v.hide) and not(v.d_id)) then
|
||||
@ -902,6 +902,8 @@ yl_speak_up.get_fs_talkdialog = function(player, n_id, d_id, alternate_text, rec
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
if(has_trades) then
|
||||
h = yl_speak_up.add_edit_button_fs_talkdialog(formspec, h,
|
||||
"show_trade_list",
|
||||
"Show a list of trades the NPC has to offer.",
|
||||
|
Loading…
Reference in New Issue
Block a user