Skip to content

Conversation

@omar-akermi
Copy link
Collaborator

No description provided.

@omar-akermi omar-akermi changed the base branch from stable to bleeding-edge May 14, 2025 20:57
@omar-akermi omar-akermi requested a review from MaxtorCoder May 15, 2025 20:31
}
catch (Exception ex)
{
Logger.Error("Failed during SaveManager_Save_Postfix execution.\n" + ex);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should consider adding an overload in the Log class that takes in the exception and logs it using the built-in overloads that also take in the exceptions.

But it does seem that there's only an overload for the exception signature with Melon. Shame.

// ✅ Save only non-vanilla modded quests
foreach (Quest quest in QuestManager.Quests)
{
if (!quest.GetType().Namespace.StartsWith("ScheduleOne"))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Since the foreach loop is only doing this one thing and only against one type of thing, you could simplify it with foreach (Quest quest in QuestManager.Quests.Where(q => !q.GetType().Namespace.StartsWith("ScheduleOne")) to remove the if. This would also mean that you're looping over fewer things.

Nit in this case because I'm sure it's a very small collection, but good to keep in mind for future.

@MaxtorCoder MaxtorCoder merged commit 62bff73 into bleeding-edge May 17, 2025
1 check passed
@MaxtorCoder MaxtorCoder deleted the questpatches branch May 17, 2025 10:01
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.

4 participants