Skip to content

Commit

Permalink
Corrected false indentation and error
Browse files Browse the repository at this point in the history
  • Loading branch information
kyooosukedn committed Oct 31, 2023
1 parent 53ecec5 commit 0b5ee21
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions addons/mod_loader/api/profile.gd
Original file line number Diff line number Diff line change
Expand Up @@ -106,25 +106,6 @@ static func rename_profile(old_profile_name: String, new_profile_name: String) -
if not ModLoaderStore.user_profiles.has(old_profile_name):
ModLoaderLog.error("User profile with the name of \"%s\" does not exist." % old_profile_name, LOG_NAME)
return false
<<<<<<< HEAD

# Verify that the new profile_name is not already in use
if ModLoaderStore.user_profiles.has(new_profile_name):
ModLoaderLog.error("User profile with the name of \"%s\" already exists." % new_profile_name, LOG_NAME)
return false

# Rename user profile
var profile_to_rename = ModLoaderStore.user_profiles[old_profile_name].duplicate(true)
profile_to_rename.name = new_profile_name

# Remove old profile entry, replace it with new name entry in the ModLoaderStore
ModLoaderStore.user_profiles.erase(old_profile_name)
ModLoaderStore.user_profiles[new_profile_name] = profile_to_rename

# Set it as the current profile
if ModLoaderStore.current_user_profile == old_profile_name:
ModLoaderStore.current_user_profile = new_profile_name
=======

# Verify that the new profile_name is not already in use
if ModLoaderStore.user_profiles.has(new_profile_name):
Expand All @@ -142,7 +123,6 @@ static func rename_profile(old_profile_name: String, new_profile_name: String) -
# Set it as the current profile
if ModLoaderStore.current_user_profile == ModLoaderStore.user_profiles[old_profile_name]:
ModLoaderStore.current_user_profile[new_profile_name]
>>>>>>> 5e66546 (Corrected false indentation and error)

# Store the new profile in the json file
var is_save_success := _save()
Expand Down

0 comments on commit 0b5ee21

Please sign in to comment.