@ -9,9 +9,9 @@ extends Node  
															
														 
														
													
														
															
																 
																 
																
  
																 
																 
																
  
															
														 
														
													
														
															
																 
																 
																signal  apply_complete  
																 
																 
																signal  apply_complete  
															
														 
														
													
														
															
																 
																 
																signal  apply_save  ## Apply the loaded data to the tree. Note: This should happen AFTER load_save()  
																 
																 
																signal  apply_save  ## Apply the loaded data to the tree. Note: This should happen AFTER load_save()  
															
														 
														
													
														
															
																 
																 
																signal  autosave_start  ## Autosave has started  
																 
																 
																 
															
														 
														
													
														
															
																 
																 
																signal  autosave_complete  ## Autosave has completed  
																 
																 
																signal  autosave_complete  ## Autosave has completed  
															
														 
														
													
														
															
																 
																 
																signal  create_auto_save  
																 
																 
																 
															
														 
														
													
														
															
																 
																 
																 
																 
																 
																signal  autosave_start  ## Autosave has started  
															
														 
														
													
														
															
																 
																 
																 
																 
																 
																signal  create_autosave  
															
														 
														
													
														
															
																 
																 
																signal  create_save ( save_name :  String )  
																 
																 
																signal  create_save ( save_name :  String )  
															
														 
														
													
														
															
																 
																 
																signal  delete_save ( filename :  String )  
																 
																 
																signal  delete_save ( filename :  String )  
															
														 
														
													
														
															
																 
																 
																signal  delete_error ( error_message :  String )  
																 
																 
																signal  delete_error ( error_message :  String )  
															
														 
														
													
												
													
														
															
																
																	
																		
																			 
																		 
																	
																	
																		
																			 
																		 
																	
																	
																 
																@ -58,7 +58,7 @@ func _unhandled_input(event: InputEvent) -> void:  
															
														 
														
													
														
															
																 
																 
																		quick_load . emit ( )   
																 
																 
																		quick_load . emit ( )   
															
														 
														
													
														
															
																 
																 
																
  
																 
																 
																
  
															
														 
														
													
														
															
																 
																 
																
  
																 
																 
																
  
															
														 
														
													
														
															
																 
																 
																func  list_saves ( include_quick_saves :  bool  =  true ,  include_auto_ saves :  bool  =  true )  - >  Array [ SaveFileDetailsResource ] :  
																 
																 
																 
															
														 
														
													
														
															
																 
																 
																 
																 
																 
																func  list_saves ( include_quick_saves :  bool  =  true ,  include_autosaves :  bool  =  true )  - >  Array [ SaveFileDetailsResource ] :  
															
														 
														
													
														
															
																 
																 
																	var  save_files :  Array [ SaveFileDetailsResource ]  =  [ ]   
																 
																 
																	var  save_files :  Array [ SaveFileDetailsResource ]  =  [ ]   
															
														 
														
													
														
															
																 
																 
																	if  not  _load_save_settings ( ) :   
																 
																 
																	if  not  _load_save_settings ( ) :   
															
														 
														
													
														
															
																 
																 
																		return  save_files   
																 
																 
																		return  save_files   
															
														 
														
													
												
													
														
															
																
																	
																	
																	
																		
																			 
																		 
																	
																 
																@ -71,7 +71,7 @@ func list_saves(include_quick_saves: bool = true, include_auto_saves: bool = tru  
															
														 
														
													
														
															
																 
																 
																		# TODO: Rework so the settings determine the file_name using prepends   
																 
																 
																		# TODO: Rework so the settings determine the file_name using prepends   
															
														 
														
													
														
															
																 
																 
																		if  filename . begins_with ( _save_game_settings . quicksave_file_name_prepend )  and  not  include_quick_saves :   
																 
																 
																		if  filename . begins_with ( _save_game_settings . quicksave_file_name_prepend )  and  not  include_quick_saves :   
															
														 
														
													
														
															
																 
																 
																			continue   
																 
																 
																			continue   
															
														 
														
													
														
															
																 
																 
																		elif  filename . begins_with ( _save_game_settings . autosave_file_name_prepend )  and  not  include_auto_ saves :   
																 
																 
																 
															
														 
														
													
														
															
																 
																 
																 
																 
																 
																		elif  filename . begins_with ( _save_game_settings . autosave_file_name_prepend )  and  not  include_autosaves :   
															
														 
														
													
														
															
																 
																 
																			continue   
																 
																 
																			continue   
															
														 
														
													
														
															
																 
																 
																		elif  ! filename . begins_with ( _save_game_settings . save_file_name_prepend )  and  ! filename . begins_with ( _save_game_settings . quicksave_file_name_prepend )  and  ! filename . begins_with ( _save_game_settings . autosave_file_name_prepend ) :   
																 
																 
																		elif  ! filename . begins_with ( _save_game_settings . save_file_name_prepend )  and  ! filename . begins_with ( _save_game_settings . quicksave_file_name_prepend )  and  ! filename . begins_with ( _save_game_settings . autosave_file_name_prepend ) :   
															
														 
														
													
														
															
																 
																 
																			continue   
																 
																 
																			continue   
															
														 
														
													
												
													
														
															
																
																	
																		
																			 
																		 
																	
																	
																		
																			 
																		 
																	
																	
																 
																@ -188,7 +188,7 @@ func _move_autosaves() -> void:  
															
														 
														
													
														
															
																 
																 
																		if  ! filename . ends_with ( " .tres " ) :  continue   
																 
																 
																		if  ! filename . ends_with ( " .tres " ) :  continue   
															
														 
														
													
														
															
																 
																 
																		autosaves . append ( filename )   
																 
																 
																		autosaves . append ( filename )   
															
														 
														
													
														
															
																 
																 
																
  
																 
																 
																
  
															
														 
														
													
														
															
																 
																 
																	if  autosaves . size ( )  ==  _save_game_settings . max_auto_ saves :  # Delete oldest save   
																 
																 
																 
															
														 
														
													
														
															
																 
																 
																 
																 
																 
																	if  autosaves . size ( )  ==  _save_game_settings . max_autosaves :  # Delete oldest save   
															
														 
														
													
														
															
																 
																 
																		DirAccess . remove_absolute ( _save_game_settings . save_game_data_path  +  autosaves . pop_back ( ) )   
																 
																 
																		DirAccess . remove_absolute ( _save_game_settings . save_game_data_path  +  autosaves . pop_back ( ) )   
															
														 
														
													
														
															
																 
																 
																
  
																 
																 
																
  
															
														 
														
													
														
															
																 
																 
																	var  filepath :  String  =  _save_game_settings . save_game_data_path  +  _save_game_settings . autosave_file_name_prepend   
																 
																 
																	var  filepath :  String  =  _save_game_settings . save_game_data_path  +  _save_game_settings . autosave_file_name_prepend