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

Make NEW_ROOM callback be prioritized #311

Closed
wants to merge 1 commit into from

Conversation

guwahavel
Copy link
Contributor

This fixes strange interactions with other mods by making sure the player's position is updated before they run their new room code

This fixes strange interactions with other mods by making sure the player's position is updated before they run their new room code
@@ -373,7 +373,7 @@ function BasementRenovator.RenderDoorSlots(room, doorSlots, enterSlot)
end
end

BasementRenovator.mod:AddCallback(ModCallbacks.MC_POST_NEW_ROOM, function()
BasementRenovator.mod:AddPriorityCallback(ModCallbacks.MC_POST_NEW_ROOM, CallbackPriority.IMPORTANT, function()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since BR is technically supposed to work with the different versions of the game (although it's best effort right now) when using rep only APIs I've been gating them behind checks: b4ffe88#diff-09679ecfabcf35045938309e4229f4c96e65f8392a5b1b6f643aeb53ee16ecf4R211

Could you create some kind of wrapper for AddPriorityCallback that just uses AddCallback when it's not available?

@Zamiell
Copy link
Collaborator

Zamiell commented Sep 17, 2024

closing since guwahavel is not responding

@Zamiell Zamiell closed this Sep 17, 2024
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.

3 participants