turning edit mode on/off restarts the chat at the first dialog
This commit is contained in:
parent
a9259ed3ba
commit
787550eca1
@ -1679,15 +1679,15 @@ minetest.register_on_player_receive_fields(
|
|||||||
-- enter edit mode with that particular NPC
|
-- enter edit mode with that particular NPC
|
||||||
yl_speak_up.edit_mode[pname] = yl_speak_up.speak_to[pname].n_id
|
yl_speak_up.edit_mode[pname] = yl_speak_up.speak_to[pname].n_id
|
||||||
-- start a new chat - but this time in edit mode
|
-- start a new chat - but this time in edit mode
|
||||||
-- TODO: this continues where the last chat was and does not start from the beginning
|
yl_speak_up.speak_to[pname].d_id = nil
|
||||||
minetest.show_formspec(pname, "yl_speak_up:talk", get_fs_talkdialog(player, yl_speak_up.speak_to[pname].n_id))
|
minetest.show_formspec(pname, "yl_speak_up:talk", get_fs_talkdialog(player, yl_speak_up.speak_to[pname].n_id, nil))
|
||||||
return
|
return
|
||||||
-- end edit mode (does not require the priv; will only switch back to normal behaviour)
|
-- end edit mode (does not require the priv; will only switch back to normal behaviour)
|
||||||
elseif fields.button_end_edit_mode then
|
elseif fields.button_end_edit_mode then
|
||||||
yl_speak_up.edit_mode[pname] = nil
|
yl_speak_up.edit_mode[pname] = nil
|
||||||
-- start a new chat - but this time in normal mode
|
-- start a new chat - but this time in normal mode
|
||||||
-- TODO: this continues where the last chat was and does not start from the beginning
|
yl_speak_up.speak_to[pname].d_id = nil
|
||||||
minetest.show_formspec(pname, "yl_speak_up:talk", get_fs_talkdialog(player, yl_speak_up.speak_to[pname].n_id))
|
minetest.show_formspec(pname, "yl_speak_up:talk", get_fs_talkdialog(player, yl_speak_up.speak_to[pname].n_id, nil))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user