Simplify/reduce the number of message dialogs when clearing user dir

This commit is contained in:
the Sane. 2024-08-17 09:58:55 -04:00 committed by GitHub
parent 4fc8781abf
commit 26fe714826
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2062,9 +2062,9 @@ rm_userdir() {
keybinds_exported=1 keybinds_exported=1
fi fi
# Check for exported custom character files # Check for saved custom character files
if [ ! -d "$custom_characters_dir" ] || [ -z "$(ls -A "$custom_characters_dir")" ]; then if [ ! -d "$custom_characters_dir" ] || [ -z "$(ls -A "$custom_characters_dir")" ]; then
if message question "Warning: No exported characters found.\nContinuing will erase your existing characters!\n\nDo you want to continue anyway?"; then if message question "Warning: No saved characters found.\nContinuing will erase your existing character!\n\nDo you want to continue anyway?"; then
characters_exported=0 characters_exported=0
else else
# User said no # User said no
@ -2095,17 +2095,15 @@ rm_userdir() {
if [ "$keybinds_exported" -eq 1 ]; then if [ "$keybinds_exported" -eq 1 ]; then
debug_print continue "Restoring keybinds..." debug_print continue "Restoring keybinds..."
mkdir -p "$keybinds_dir" && cp -r "$backup_path/keybinds/." "$keybinds_dir/" mkdir -p "$keybinds_dir" && cp -r "$backup_path/keybinds/." "$keybinds_dir/"
message info "To re-import your keybinds, select it in-game from the list:\nOptions->Keybindings->Control Profiles"
fi fi
# Restore custom characters # Restore custom characters
if [ "$characters_exported" -eq 1 ]; then if [ "$characters_exported" -eq 1 ]; then
debug_print continue "Restoring custom characters..." debug_print continue "Restoring custom characters..."
mkdir -p "$custom_characters_dir" && cp -r "$backup_path/CustomCharacters/." "$custom_characters_dir/" mkdir -p "$custom_characters_dir" && cp -r "$backup_path/CustomCharacters/." "$custom_characters_dir/"
message info "To re-import your character, select it in-game from the list."
fi fi
message info "Your Star Citizen USER directory has been cleaned up!" message info "Your Star Citizen USER directory has been cleaned up!\n\nExported keybinds can be re-imported in-game from:\nOptions->Keybindings->Control Profiles\n\nSaved characters can be selected in the character creator."
fi fi
} }