TeamREPENTOGON / REPENTOGON

Script extender for The Binding of Isaac: Repentance
https://repentogon.com/
GNU General Public License v2.0
114 stars 11 forks source link

[Bug?] MC_PRE_CHANGE_ROOM return table likely not behaving as intended #441

Open drpandacat opened 2 months ago

drpandacat commented 2 months ago

Returning an index other than the one of the current room you are in will cause a loop of constantly being sent to the same room over and over again, instead of being sent to the target room

mod:AddCallback(ModCallbacks.MC_PRE_CHANGE_ROOM, function (_, idx, dimension)
    local level = game:GetLevel()
    local new = level:GetRandomRoomIndex(false, Random() + 1)

    return {new, dimension}
end)
Sanio46 commented 2 months ago

This isn't what I described from my loose testing when you originally commented about this. Here's what I said:

drpandacat commented 2 months ago

ahh thanks for the clarification, i tried to explain what i found from the limited amount of testing i did