I really like this mod, and I wanted to use it on the latest Beat Saber version, so I've taken the liberty of fixing it up. 🙂
The biggest breaking change is that class methods are no longer virtualized by BSIPA (afaik), and while I did add BepInExp.AssemblyPublicizer to the project, that doesn't make otherwise normal methods virtual. This means that the approach of replacing the built in FlyingScoreEffect with the HsvFlyingScoreEffect subclass no longer works, since the subclass can't override the methods it needs to replace.
My solution is to simply use Harmony patches to patch FlyingScoreEffect with the same code that HsvFlyingScoreEffect used. This now lives in FlyingCoreEffectPatch and HsvFlyingScoreEffect has been deleted. Most of the patching logic that used to live in the FlyingCoreEffectPatch.cs file was about patching EffectPoolsManualInstaller to install HsvFlyingScoreEffect as a replacement. This is no longer required. The only logic retained was the configuration of the bloom font on the FlyingScoreEffect's _text, which has been moved to the new EffectPoolsManualInstallerPatch.
The other breaking change is that PersistentSingleton is not built in any more and has been replaced with a substitute from BSML. The usage of MenuButtons class (which is a PersistentSingleton) used in SettingsControllerManager has been updated to reflect this, removing logic that is no longer necessary.
I really like this mod, and I wanted to use it on the latest Beat Saber version, so I've taken the liberty of fixing it up. 🙂
The biggest breaking change is that class methods are no longer virtualized by BSIPA (afaik), and while I did add
BepInExp.AssemblyPublicizer
to the project, that doesn't make otherwise normal methods virtual. This means that the approach of replacing the built inFlyingScoreEffect
with theHsvFlyingScoreEffect
subclass no longer works, since the subclass can't override the methods it needs to replace.My solution is to simply use Harmony patches to patch
FlyingScoreEffect
with the same code thatHsvFlyingScoreEffect
used. This now lives inFlyingCoreEffectPatch
andHsvFlyingScoreEffect
has been deleted. Most of the patching logic that used to live in theFlyingCoreEffectPatch.cs
file was about patchingEffectPoolsManualInstaller
to installHsvFlyingScoreEffect
as a replacement. This is no longer required. The only logic retained was the configuration of the bloom font on theFlyingScoreEffect
's_text
, which has been moved to the newEffectPoolsManualInstallerPatch
.The other breaking change is that
PersistentSingleton
is not built in any more and has been replaced with a substitute from BSML. The usage ofMenuButtons
class (which is aPersistentSingleton
) used inSettingsControllerManager
has been updated to reflect this, removing logic that is no longer necessary.