Migrated snapping code into a HarmonyPostfix on Builder.GetAimTransform(), which provides the following benefits:
SnapBuilder should now be generally more compatible as we no longer use a HarmonyPrefix on Builder.SetPlaceOnSurface() which decides for itself whether or not to run the original method.
Can strip out code that was mimicking the guts of how Builder.SetPlaceOnSurface() dealt with rotations, meaning that if SN ever changes this, SnapBuilder should comply with their changes!
Manipulating the return of Builder.GetAimTransform() means that validation is now base on that return, using the correct hit points!
We've also been able to strip out a bunch of code that was dealing with the fact that aim transform was pointing to a different location than where we are snapping to!
Simply put, a more elegant solution, that should make it easier to maintain or add new features to SnapBuilder!
Migrated snapping code into a
HarmonyPostfix
onBuilder.GetAimTransform()
, which provides the following benefits:HarmonyPrefix
onBuilder.SetPlaceOnSurface()
which decides for itself whether or not to run the original method.Builder.SetPlaceOnSurface()
dealt with rotations, meaning that if SN ever changes this, SnapBuilder should comply with their changes!Builder.GetAimTransform()
means that validation is now base on that return, using the correct hit points!Simply put, a more elegant solution, that should make it easier to maintain or add new features to SnapBuilder!