moved frashion to yl_speak_up.show_fs
This commit is contained in:
parent
4095be4e43
commit
4c9c66e7c1
@ -1799,9 +1799,17 @@ yl_speak_up.show_fs = function(player, fs_name, param)
|
||||
end
|
||||
local pname = player:get_player_name()
|
||||
|
||||
if(fs_name == "trade_list") then
|
||||
minetest.show_formspec(pname,
|
||||
"yl_speak_up:trade_list",
|
||||
if(fs_name == "TODO") then
|
||||
elseif(fs_name == "fashion") then
|
||||
minetest.show_formspec(pname, "yl_speak_up:fashion",
|
||||
yl_speak_up.get_fs_fashion(pname))
|
||||
|
||||
elseif(fs_name == "inventory") then
|
||||
minetest.show_formspec(pname, "yl_speak_up:inventory",
|
||||
yl_speak_up.get_fs_inventory(player))
|
||||
|
||||
elseif(fs_name == "trade_list") then
|
||||
minetest.show_formspec(pname, "yl_speak_up:trade_list",
|
||||
yl_speak_up.get_fs_trade_list(player))
|
||||
|
||||
elseif(fs_name == "trade_simple") then
|
||||
@ -1809,8 +1817,7 @@ yl_speak_up.show_fs = function(player, fs_name, param)
|
||||
if(not(param) and yl_speak_up.speak_to[pname]) then
|
||||
param = yl_speak_up.speak_to[pname].trade_id
|
||||
end
|
||||
minetest.show_formspec(pname,
|
||||
"yl_speak_up:do_trade_simple",
|
||||
minetest.show_formspec(pname, "yl_speak_up:do_trade_simple",
|
||||
yl_speak_up.get_fs_trade_simple(player, param))
|
||||
|
||||
elseif(fs_name == "add_trade_simple") then
|
||||
@ -1818,8 +1825,7 @@ yl_speak_up.show_fs = function(player, fs_name, param)
|
||||
if(not(param) and yl_speak_up.speak_to[pname]) then
|
||||
param = yl_speak_up.speak_to[pname].trade_id
|
||||
end
|
||||
minetest.show_formspec(pname,
|
||||
"yl_speak_up:add_trade_simple",
|
||||
minetest.show_formspec(pname, "yl_speak_up:add_trade_simple",
|
||||
yl_speak_up.get_fs_add_trade_simple(player, param))
|
||||
-- fallback in case of wrong call
|
||||
else
|
||||
@ -2939,7 +2945,7 @@ yl_speak_up.input_talk = function(player, formname, fields)
|
||||
-- the player wants to access the inventory of the NPC
|
||||
if(edit_mode and fields.show_inventory) then
|
||||
-- the inventory is just an inventory with a back button; come back to this dialog here
|
||||
minetest.show_formspec(pname, "yl_speak_up:inventory", yl_speak_up.get_fs_inventory(player))
|
||||
yl_speak_up.show_fs(player, "inventory")
|
||||
return
|
||||
end
|
||||
|
||||
@ -2948,7 +2954,7 @@ yl_speak_up.input_talk = function(player, formname, fields)
|
||||
local dialog = yl_speak_up.speak_to[pname].dialog
|
||||
-- necessary so that the fashin formspec can be created
|
||||
yl_speak_up.speak_to[pname].n_npc = dialog.n_npc
|
||||
minetest.show_formspec(pname, "yl_speak_up:fashion", yl_speak_up.get_fs_fashion(pname))
|
||||
yl_speak_up.show_fs(player, "fashion")
|
||||
return
|
||||
end
|
||||
|
||||
@ -3748,7 +3754,7 @@ yl_speak_up.input_fashion = function(player, formname, fields)
|
||||
--yl_speak_up.speak_to[pname].textures = textures
|
||||
end
|
||||
|
||||
minetest.show_formspec(pname, "yl_speak_up:fashion", yl_speak_up.get_fs_fashion(pname))
|
||||
yl_speak_up.show_fs(player, "fashion")
|
||||
end
|
||||
|
||||
function yl_speak_up.fashion(player, obj)
|
||||
@ -3772,7 +3778,7 @@ function yl_speak_up.fashion(player, obj)
|
||||
yl_speak_up.speak_to[pname].n_npc = "Unknown"
|
||||
end
|
||||
|
||||
minetest.show_formspec(pname, "yl_speak_up:fashion", yl_speak_up.get_fs_fashion(pname))
|
||||
yl_speak_up.show_fs(player, "fashion")
|
||||
end
|
||||
|
||||
|
||||
|
@ -36,8 +36,7 @@ yl_speak_up.input_trade_list = function(player, formname, fields)
|
||||
|
||||
-- show the inventory of the NPC
|
||||
if(fields.show_inventory) then
|
||||
minetest.show_formspec(pname, "yl_speak_up:inventory",
|
||||
yl_speak_up.get_fs_inventory(player))
|
||||
yl_speak_up.show_fs(player, "inventory")
|
||||
return
|
||||
end
|
||||
-- TODO: and otherwise?
|
||||
|
Loading…
Reference in New Issue
Block a user