Switch function:
sortRoomExits
to using a room area table rather than math.
example code:
--Find exits that touch this room
local roomArea = parthiaMap.getRoomArea(exitTable.room.size, exitTable.room.xpos, exitTable.room.ypos) --get the area of this room
local possibleRoomExits = {} --an table to hold the rooms exits
for _,exitToCheck in ipairs(parthiaMap.TECMapExits) do --loop through all exits that appear on the tec map when player is in this room
local xposRounded = round(exitToCheck.xpos)
local yposRounded = round(exitToCheck.ypos)
if roomArea[xposRounded] then --if the exit shares a xposition with the current room on the TECMap
if roomArea[xposRounded][yposRounded] then --if the exit shares both an x and y position with the current room.
table.insert(possibleRoomExits, table.deepcopy(exitToCheck)) --exit on map is one for this room. Keep track of it
end --if roomArea[xposRounded][yposRounded]
end --if roomArea[xposRounded]
end --for ipairs(parthiaMap.TECMapExits)
Check if this has a positive impact on local function mapVerSortAdjacentRooms in parthiaMap.createMapVerification.
if it does than make the method global by replacing sortAdjacentRooms with its code. Keeping sortAdjacentRooms name space and removing local function
Switch function: sortRoomExits to using a room area table rather than math. example code:
Check if this has a positive impact on local function mapVerSortAdjacentRooms in parthiaMap.createMapVerification. if it does than make the method global by replacing sortAdjacentRooms with its code. Keeping sortAdjacentRooms name space and removing local function