forked from Sokomine/yl_speak_up
show_fs: save_or_discard_changes
This commit is contained in:
parent
d7440369b5
commit
7ddf97d49d
@ -121,3 +121,11 @@ yl_speak_up.get_fs_save_or_discard_changes = function(player, param)
|
||||
"tooltip[back_to_dialog_changes;Go back to dialog "..
|
||||
minetest.formspec_escape(d_id).." and continue editing it.]"
|
||||
end
|
||||
|
||||
|
||||
yl_speak_up.register_fs("save_or_discard_changes",
|
||||
yl_speak_up.input_save_or_discard_changes,
|
||||
yl_speak_up.get_fs_save_or_discard_changes,
|
||||
-- no special formspec required:
|
||||
nil
|
||||
)
|
||||
|
10
show_fs.lua
10
show_fs.lua
@ -37,10 +37,6 @@ yl_speak_up.input_handler = function(player, formname, fields)
|
||||
elseif formname == "yl_speak_up:setdialog" then
|
||||
yl_speak_up.input_setdialog(player, formname, fields)
|
||||
return true
|
||||
-- handled in fs_save_or_discard_or_back.lua
|
||||
elseif formname == "yl_speak_up:save_or_discard_changes" then
|
||||
yl_speak_up.input_save_or_discard_changes(player, formname, fields)
|
||||
return true
|
||||
elseif formname == "yl_speak_up:talk" then
|
||||
yl_speak_up.input_talk(player, formname, fields)
|
||||
return true
|
||||
@ -82,12 +78,8 @@ yl_speak_up.show_fs = function(player, fs_name, param)
|
||||
end
|
||||
|
||||
local last_fs = yl_speak_up.speak_to[pname].last_fs
|
||||
-- show the save or discard changes dialog
|
||||
if(fs_name and fs_name == "save_or_discard_changes") then
|
||||
yl_speak_up.show_fs_ver(pname, "yl_speak_up:save_or_discard_changes",
|
||||
yl_speak_up.get_fs_save_or_discard_changes(player, param))
|
||||
return
|
||||
|
||||
if(false) then
|
||||
-- the player either saved or discarded; we may proceed now
|
||||
elseif(fs_name and fs_name == "proceed_after_save") then
|
||||
fs_name = yl_speak_up.speak_to[pname].next_fs
|
||||
|
Loading…
Reference in New Issue
Block a user