REPENTOGON icon indicating copy to clipboard operation
REPENTOGON copied to clipboard

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

Open drpandacat opened this issue 1 year ago • 2 comments

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)

drpandacat avatar May 08 '24 23:05 drpandacat

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

  • Returned TargetIdx appears to be completely ignored unless you're in the same room as your returned TargetIdx
  • All but one door will return you to the same room. One door will have you exit, but...in an odd way that I can't accurately describe.

BenevolusGoat avatar May 08 '24 23:05 BenevolusGoat

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

drpandacat avatar May 09 '24 00:05 drpandacat