ask for save/discard/back only when actually switching to a diffrent dialog
This commit is contained in:
		
							parent
							
								
									ca438dd71b
								
							
						
					
					
						commit
						f1bd0cb8a0
					
				@ -2588,8 +2588,14 @@ minetest.register_on_player_receive_fields(
 | 
			
		||||
	        end
 | 
			
		||||
	    end
 | 
			
		||||
            -- if there are any changes done: ask first and don't switch to the new dialog yet
 | 
			
		||||
            yl_speak_up.save_changes_and_switch_to_other_dialog(player, fields, show_dialog)
 | 
			
		||||
	    return
 | 
			
		||||
            if(show_dialog ~= d_id) then
 | 
			
		||||
	        yl_speak_up.save_changes_and_switch_to_other_dialog(player, fields, show_dialog)
 | 
			
		||||
	    -- show the same dialog again
 | 
			
		||||
            else
 | 
			
		||||
                minetest.show_formspec(pname, "yl_speak_up:talk", get_fs_talkdialog(player, n_id, d_id))
 | 
			
		||||
	    end
 | 
			
		||||
	    -- no option was selected - so we need to end this here
 | 
			
		||||
            return
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user