Multiplayer icon indicating copy to clipboard operation
Multiplayer copied to clipboard

MultiplayerAsyncQuest - Hardcoded list changed to dynamic

Open PhoenixICE opened this issue 3 years ago • 0 comments

This needs to be changed from:

https://github.com/rwmt/Multiplayer/blob/342760f55f79cc8cb90f05b28a1b80a54c6bd11d/Source/Client/Comp/MultiplayerAsyncQuest.cs#L127-L143

To something like this:

        private static readonly List<Type> questPartsToCheck;

        static MultiplayerAsyncQuest() => questPartsToCheck = typeof(QuestPart)
                .Assembly
                .GetTypes()
                .Where(x => x.Name.StartsWith("QuestPart_") && x.GetField("mapParent") != null)
                .ToList();

Whitelist is harder to maintain so better to just dynamically generate it, creating a blacklist however might be necessary thou.

PhoenixICE avatar Jun 13 '21 04:06 PhoenixICE