Hi!
I am interested in finding what rooms have exit to a certain room.
I know that I can always just loop through all the rooms, check if any of their exit points to the room, but that is very inefficient, and my map is over 30.000 room (and growing), this search freezes up the UI (noticably, not for a long period, 1-1.5 sec). I want to get rid of this freeze.
My attempt to make the resolution more efficient is by overwriting exit, stub, specialexit functions and update the target room's "pointshere" userdata anytime these functions are called.
I was really happy to see it do exactly what I wanted... except mapper UI windows don't make use of any of these functions, they must use something internal. Meaning if I deleted/added an exit through the ui, my "pointshere" userdata did not update.
Wondering if I am just over complicating things and there is an existing function that does this for me. Maybe I've missed it.
Rooms pointing to a room
Re: Rooms pointing to a room
Maybe make a table of room -> entrances, then lookup this table, that should be a lot faster I think.
Mapper of Bedlam
Re: Rooms pointing to a room
Hi Silvine,
Problem is the UI doesn't make use of the public functions so I can not be sure my table is up to date at a given time.
Problem is the UI doesn't make use of the public functions so I can not be sure my table is up to date at a given time.
Some things are simply easier with a graphical interface.. like deleting an exit, overwriting one. Anything what my automatic map scanner shouldn't/can't do.My attempt to make the resolution more efficient is by overwriting exit, stub, specialexit functions and update the target room's "pointshere" userdata anytime these functions are called.
I was really happy to see it do exactly what I wanted... except mapper UI windows don't make use of any of these functions, they must use something internal. Meaning if I deleted/added an exit through the ui, my "pointshere" userdata did not update.
Re: Rooms pointing to a room
I'd do your room location in batches, then you wouldn't have a UI freeze. Think that is about the only way to go about it unless we add this in as a function.
The UI doesn't make use of those functions, that would be non-sensical from a design POV. They are just for users scripting purposes.
The UI doesn't make use of those functions, that would be non-sensical from a design POV. They are just for users scripting purposes.
Re: Rooms pointing to a room
Alright, thanks for the answer Vadi. The UI freeze is not a deal breaker, just something I wanted to get rid of if possible.Vadi wrote:I'd do your room location in batches, then you wouldn't have a UI freeze. Think that is about the only way to go about it unless we add this in as a function.
Yeah, I can see why. I was hoping there would be still some undocumented hookup I could use.Vadi wrote:The UI doesn't make use of those functions, that would be non-sensical from a design POV. They are just for users scripting purposes.
Will think of something