-
Notifications
You must be signed in to change notification settings - Fork 24
Questpatches #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Questpatches #86
Conversation
| } | ||
| catch (Exception ex) | ||
| { | ||
| Logger.Error("Failed during SaveManager_Save_Postfix execution.\n" + ex); |
There was a problem hiding this comment.
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")) |
There was a problem hiding this comment.
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.
No description provided.