After some testing I found that a niche issue arises from the combination of the alphabetical sorting and the for loop. This aims to band-aid the issue as best possible until proper rework is done.
Renamed fields
Appended main areas (BB) which house other locations with `_ZONE` .
Example
Old → `HOSIDIUS("Hosidius", new Location(1737, 3627, 1789, 3582), 0),`
New → `HOSIDIUS_ZONE("Hosidius", new Location(1737, 3627, 1789, 3582), 0),`
Reason for this is to solve a problem with the `for loop` responsible for iterating over all locations to find which one the player is located in.
Since they are sorted alphabetically, `HOSIDIUS` comes before `HOSIDIUS_BANK` or any other location prefixed with "hosidius".
Disregarding if `worldArea ∈ BB`.
So, coincidentally, appending BB areas with `_ZONE` is just a lucky "solution" as a result of the alphabetical sorting to push the area down in the hierarchy.
To be clear; This is a hack, not a proper solution.
Ideally, in a perfect world the entire thing would be replaced by a proper R-Tree or other spatial access method.
However, for now, this is as good as it gets seeing as it'd be a pretty big task.
Added over 500 new locations.
Some locations were merged together, or split further into finer segments.
Removed few locations.
Spelling corrections
Renamed and organised fields.
Renamed few field display labels to give a more intuitive description of the intended world point.
Limited margin of "distance to area" to 128 squares(region length*2) to prevent mislabeling areas. Particularly in instances.
Fixed error which caused each world area to be placed on wrong coordinates along y-axis.
Added Math.abs() to get absolute value when calculating polygon dimensions from coordinates.
`RING_OF_ENDURANCE_24844` is the ingame item which can actually be
obtained. `RING_OF_ENDURANCE` is the original ring ID for [the ring
which could not be traded on the Grand Exchange on Darkmeyer's day of
release][1]. This commit corrects the mapping to map to the tradeable
ring.
[1]: https://secure.runescape.com/m=news/darkmeyer-day-one-feedback-changes?oldschool=1
The bank widget can become null before the bank build script finishes by
holding the bank close key as the bank is opened. This commit adds a
null check to avoid this possible NPE.
Invoking the tab separator removal allowed tab separators to be visible
and interactable for a frame. On slower computers, users could click and
navigate to a tab during that period. The removal no longer needs to be
invoked after e4b43d9 so we can just invoke the script run.