Skip to content

Fix for QuestCommander deck editor#5598

Merged
tehdiplomat merged 1 commit into
Card-Forge:masterfrom
Jetz72:master
Jul 23, 2024
Merged

Fix for QuestCommander deck editor#5598
tehdiplomat merged 1 commit into
Card-Forge:masterfrom
Jetz72:master

Conversation

@Jetz72
Copy link
Copy Markdown
Contributor

@Jetz72 Jetz72 commented Jul 13, 2024

Resolves an issue where quest commander was functioning as quest mode in some ways, like commander mode in other ways, and like quest commander in no way whatsoever.

In doing this, I deleted this condition from the deck editor's constructor:

if (editorType0 == EditorType.QuestCommander) //fix saving quest commander
    editorType = EditorType.Quest;
else
    editorType = editorType0;

Removing something commented with the words "fix saving" leaves me very nervous because I'm not sure exactly what the issue there was. I did run into these lines in QuestMenu.java that seem like they could cause a quest commander deck saving issue since they don't include EditorType.QuestCommander:

((DeckController<Deck>)EditorType.Quest.getController()).setRootFolder(FModel.getQuest().getMyDecks());
((DeckController<DeckGroup>)EditorType.QuestDraft.getController()).setRootFolder(FModel.getQuest().getDraftDecks());

I added such a line in, and haven't encountered any issues while testing it. Still, if that's all it needed, I'm not sure why the workaround solution was used.

All this to say, if anybody knows any more details about this, please chime in.

@tehdiplomat
Copy link
Copy Markdown
Contributor

@Jetz72 the person who added commander quest was very unfamiliar with the codebase and slapped it together without knowing how things should be done

@tehdiplomat tehdiplomat merged commit 983f2d2 into Card-Forge:master Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants