<commit_before>Option Strict On
Option Explicit On

Imports AxeSoftware.Quest.LegacyASL.LegacyGame
Imports System.Collections.Generic

Friend Class RoomExits

    Private m_oDirections As New Dictionary(Of LegacyGame.eDirection, RoomExit)
    Private m_oPlaces As New Dictionary(Of String, RoomExit)
    Private m_lObjID As Integer
    Private m_oAllExits As Dictionary(Of Object, RoomExit)
    Private m_bRegenerateAllExits As Boolean
    Private m_game As LegacyGame

    Public Sub New(ByVal game As LegacyGame)
        m_game = game
        m_bRegenerateAllExits = True
    End Sub

    Private Sub SetDirection(ByRef Direction As LegacyGame.eDirection, ByRef oExit As RoomExit)

        If m_oDirections.ContainsKey(Direction) Then
            oExit = m_oDirections.Item(Direction)
            m_game.Objs(oExit.ObjID).Exists = True
        Else
            oExit = New RoomExit(m_game)
            m_oDirections.Add(Direction, oExit)
        End If

        m_bRegenerateAllExits = True

    End Sub

    Public Function GetDirectionExit(ByRef Direction As LegacyGame.eDirection) As RoomExit
        If m_oDirections.ContainsKey(Direction) Then
            GetDirectionExit = m_oDirections.Item(Direction)
        End If
        Return Nothing
    End Function

    Public Sub AddPlaceExit(ByRef oExit As RoomExit)

        If m_oPlaces.ContainsKey(oExit.ToRoom) Then
            RemoveExit(m_oPlaces.Item(oExit.ToRoom))
        End If

        m_oPlaces.Add(oExit.ToRoom, oExit)
        m_bRegenerateAllExits = True

    End Sub
<commit_msg>Fix broken room exits in LegacyASL<commit_after>Option Strict On
Option Explicit On

Imports AxeSoftware.Quest.LegacyASL.LegacyGame
Imports System.Collections.Generic

Friend Class RoomExits

    Private m_oDirections As New Dictionary(Of LegacyGame.eDirection, RoomExit)
    Private m_oPlaces As New Dictionary(Of String, RoomExit)
    Private m_lObjID As Integer
    Private m_oAllExits As Dictionary(Of Object, RoomExit)
    Private m_bRegenerateAllExits As Boolean
    Private m_game As LegacyGame

    Public Sub New(ByVal game As LegacyGame)
        m_game = game
        m_bRegenerateAllExits = True
    End Sub

    Private Sub SetDirection(ByRef Direction As LegacyGame.eDirection, ByRef oExit As RoomExit)

        If m_oDirections.ContainsKey(Direction) Then
            oExit = m_oDirections.Item(Direction)
            m_game.Objs(oExit.ObjID).Exists = True
        Else
            oExit = New RoomExit(m_game)
            m_oDirections.Add(Direction, oExit)
        End If

        m_bRegenerateAllExits = True

    End Sub

    Public Function GetDirectionExit(ByRef Direction As LegacyGame.eDirection) As RoomExit
        If m_oDirections.ContainsKey(Direction) Then
            Return m_oDirections.Item(Direction)
        End If
        Return Nothing
    End Function

    Public Sub AddPlaceExit(ByRef oExit As RoomExit)

        If m_oPlaces.ContainsKey(oExit.ToRoom) Then
            RemoveExit(m_oPlaces.Item(oExit.ToRoom))
        End If

        m_oPlaces.Add(oExit.ToRoom, oExit)
        m_bRegenerateAllExits = True

    End Sub

{'fraction_non_alphanumeric': 0.047987117552334944, 'fraction_numerical': 0.0, 'mean_word_length': 2.8776529338327093, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6771293', 'n_tokens_mistral': 983, 'n_tokens_neox': 932, 'n_words': 251}