Repository navigation
Make Web Library import replace existing challenges - #439
Merged
Merged
Conversation
The Library asks the admin to confirm that the current challenges will be replaced, but the import was then refused with "Challenges already exist in your world" whenever the game mode had any. Importing a database file or a template already wipes and replaces. Wipe the game mode's challenges and levels before loading the download, once the download has parsed, so a broken download cannot leave the world empty. Player data is kept. Remove the now unused exist-challenges-or-levels locale key. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This was referenced Nov 14, 2026
Sonar S2259: Utils.getGameMode returns null when the world does not belong to a game mode, so building the ID prefix could throw. Resolve the game mode addon once up front, report not-a-gamemode-world as the template import does, and reuse the name for the prefix and the wipe. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Installing a pack from the Web Library asks the admin to confirm "that you want to replace your current challenges with the new ones", but the import was then refused with "Challenges already exist in your world. Cannot proceed!" if the game mode had any challenges or levels. Admins had to find Challenge Wipe first. Import Database and Import Template already wipe and replace.
ChallengesImportManager.loadDownloadedChallengesnow wipes the game mode's challenges and levels and loads the download, matching the confirmation prompt and the two file imports. Player data is kept.challenges.errors.exist-challenges-or-levelskey from all locales.Testing
ChallengesImportManagerTest: replaced the two "existing data is refused" tests with tests that existing data is wiped and replaced, that nothing is wiped when the game mode is empty, and that a malformed download does not wipe.mvn testpasses.🤖 Generated with Claude Code