bbradson / Performance-Fish

Performance Mod for RimWorld
Mozilla Public License 2.0
423 stars 34 forks source link

Explicitly requires Harmony when using Prepatcher only to launch. #14

Closed MADxingjin closed 5 months ago

MADxingjin commented 1 year ago

Not really an issue here, But Prepatcher comes with bundled HarmonyLib and since this mod uses Prepatcher why does it still explicitly( checks written in C#) requires a separate harmony mod to function?

bbradson commented 1 year ago

The reason Pardeike published that Harmony mod in the first place was that RimWorld only loads the first copy of any assembly. It's quite common for mods to include their own frequently outdated copies of anything they reference, often out of laziness or lack of know-how on loading processes, and Prepatcher includes a Harmony copy in order to make loading before the official Harmony mod possible. I do not know why that requirement of loading first (instead of second) was added, as its page claims that it technically isn't needed, but Fish's checks are there for consistency's sake and to respect Pardeike's decision of having that separate library mod. This currently doesn't cause any issues to my knowledge. If that changes I'll remove the C# checks.

bbradson commented 5 months ago

I replaced the throw with a warning now, enabling loading without harmony too. I still don't agree with the idea though