Skip to content
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

[compatibility] searica's MoreVanillaPrefabs #83

Merged
merged 1 commit into from
May 22, 2024

Conversation

zolantris
Copy link
Owner

Use same approach as MoreVanillaPrefabs for patching PlacePiece.

The proposed solution in #81 did not work because the GameObject type broke the transpiler 😢 .

…izes the CodeMatcher approach for PlacePiece

- Integrate the new fixes within other patches and remove player
  parameter
@searica
Copy link

searica commented May 21, 2024

Replying to your comment from #81 (comment).

I think the issue with the earlier PR probably came from using OpCodes.Call, AccessTools.Method(typeof(Player_Patch), nameof(PlacedPiece)) instead of Transpilers.EmitDelegate<Func<GameObject, GameObject>>(PlacedPiece). I had wondered if using EmitDelegate was necessary but I was trying to be as minimal as possible with changes and didn't confirm that it was needed so sorry about that.

This looks good to me and I'm glad you can use some of the approaches from MVBP, though I think it's worth crediting that I learned the generic method matching from redseiko's PotteryBarn mod. Also, these changes will probably fix the conflict with CustomShips as well since that is triggered by the PlacePiece transpiler as well. So nice work!

@zolantris zolantris merged commit 7fa6deb into main May 22, 2024
1 check failed
@zolantris zolantris deleted the fix/add-compatibility-for-more-vanilla-prefabs branch May 22, 2024 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants
  翻译: