-
Notifications
You must be signed in to change notification settings - Fork 35
add tarot universe meropis exits #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
add tarot universe meropis exits #201
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will work, but I'm not quite happy with the implementation. If you don't know what I mean, please ignore this comment and we will merge this in a few days. If you do and find the comment useful, feel free to implement it or comment that you would like to do so.
There are two things that make me unhappy. First, the actual creation of the special exits is duplicated. And second, every time a new path is calculated, one of the two tables is created from scratch. This probably doesn't matter for modern computers, but still...
You could get rid of both things by pulling the table out if the function and into the script proper, using two subtables:
local tarot locations = {
Main = { ...},
Meropis = { ... }
}
Then in the actual function, just check, if the subtable for the current continent exists and if it does, run the code to add the temp special exits.
mudlet-mapper.xml
Outdated
yggdrasil = 12207, | ||
} | ||
for village, roomnum in pairs(tarotLocations) do | ||
local continent = mmp.getareacontinents(area)[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't like this one, but I figured the way mmp.oncontinent is implemented, at some point someone agreed for Achaea special exits to not care for multiple continent areas. Or maybe I'm missing something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked at other continent related handling of other special exits, but we could probably loop this:
local continents = mmp.getareacontinents(area)
for _, continent in ipairs(continents) do
local universeExits = universeLocations[continent]
-- the rest of the function
end
I don't have someone to test this at the moment, also I would like an input on my comment |
I like the new implementation. Thanks for revising it 🫶 |
This suggested change brings universe in line with other fast travel methods assumptions. |
added temporary exits for the tarot universe skill that were missing. previously mapper would only use the ability on mainland