show_fs: talk in edit mode

This commit is contained in:
Sokomine 2024-02-10 00:11:20 +01:00
parent 7482061868
commit a7d6d07785
2 changed files with 30 additions and 0 deletions

View File

@ -42,3 +42,13 @@ yl_speak_up.input_do_trade_simple = function(player, formname, fields)
return old_input_do_trade_simple(player, formname, fields)
end
yl_speak_up.register_fs("do_trade_simple",
-- new version implemented here:
yl_speak_up.input_do_trade_simple,
-- this is just the old function:
yl_speak_up.get_fs_do_trade_simple_wrapper,
-- force formspec version 1:
1
)

View File

@ -682,3 +682,23 @@ yl_speak_up.get_fs_talkdialog = function(player, n_id, d_id, alternate_text, rec
end
return old_get_fs_talkdialog(player, n_id, d_id, alternate_text, recursion_depth)
end
--[[
yl_speak_up.get_fs_talk_wrapper = function(player, param)
if(not(param)) then
param = {}
end
-- recursion depth from autoanswer: 0 (the player selected manually)
return yl_speak_up.get_fs_talkdialog(player, param.n_id, param.d_id, param.alternate_text,0)
end
--]]
yl_speak_up.register_fs("talk",
-- this function is changed here:
yl_speak_up.input_talk,
-- the underlying function is changed as well - but the wrapper calls that already; so ok:
yl_speak_up.get_fs_talk_wrapper,
-- no special formspec required:
nil
)