There’s a boolean that checks whether you’ve entered the dungeon.
If you actually choose to enter it, the boolean is set to true and removes it from the event pool; otherwise, the dungeon can be found again