forked from Sokomine/yl_speak_up
allow to exit initial config menu/aborting
This commit is contained in:
parent
136abc2a23
commit
e57d9cb5c3
@ -30,7 +30,13 @@ yl_speak_up.input_fs_initial_config = function(player, formname, fields)
|
|||||||
and not(fields.show_nametag)
|
and not(fields.show_nametag)
|
||||||
and not(fields.list_may_edit)
|
and not(fields.list_may_edit)
|
||||||
and not(fields.add_may_edit)
|
and not(fields.add_may_edit)
|
||||||
) or (fields and fields.exit)) then
|
) or (fields and fields.Exit)) then
|
||||||
|
local dialog = yl_speak_up.speak_to[pname].dialog
|
||||||
|
-- unconfigured NPC
|
||||||
|
if(fields and fields.Exit and not(dialog) or not(dialog.n_dialogs)) then
|
||||||
|
minetest.chat_send_player(pname, "Aborting initial configuration.")
|
||||||
|
return
|
||||||
|
end
|
||||||
-- is the player editing the npc? then leaving this config
|
-- is the player editing the npc? then leaving this config
|
||||||
-- dialog has to lead back to the talk dialog
|
-- dialog has to lead back to the talk dialog
|
||||||
if(yl_speak_up.edit_mode[pname] == n_id and n_id) then
|
if(yl_speak_up.edit_mode[pname] == n_id and n_id) then
|
||||||
|
Loading…
Reference in New Issue
Block a user