If there are more than one exit to the same room, they will overwrite each other in this table.... the result being that only the last entry for a roomID will be reported to the user. (making the first exit for that destination unavalible for pathfinding) The only way to return usefull lock information in a Lua table with the roomID as the key is to filter the list of values before they are put into the table(hence my suggestion to be able to request just locked or unlocked rooms).... Of course, if they are filtered before they are returned.... there is no need to return a table of tables but just the key and value.chris wrote:...
Here is the output now, which should restore the old behavior and add the one that I like:
getSpecialExits
table {
42: '0enter'
}
...
getSpecialExitsTable
table {
42: table {
'enter': '0'
}
}
}
table {
12: "enter"
}
(That should also make it easy for people to change pathfinding scripts to just use unlocked exits.... they would just need to add the parameter to the function call and all other scripting would still work)
Yes, values would/could still be overwritten when calling these functions(even with a filter) but it should not cause an issue as at least one valid locked/unlocked room would be returned.