-
Notifications
You must be signed in to change notification settings - Fork 812
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
Core: An attempt at fixing the new connect_entrances bug #4529
Conversation
I'm a bit uncertain of the best approach, for now I wanted something open that passes unit tests, fixes the issue, and can carry the "release blocker" label. What I mostly hope to get from other core maintainers or ppl like alwaysintreble or Mysteryem is opinions on the approach. We can also just revert #4420 for now. I just want to stress though that |
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.
is an enforcement mechanism even needed here? If we fix it everywhere it's relevant then going forward the docs which state entrances must be connected only by connect_entrances should imply that worlds need to worry about it
Assuming there will be one anyway I don't have an opinion on what it should be
allow_partial_entrances | ||
or "connect_entrances" in self.completed_world_stages | ||
or "generate_basic" in self.completed_world_stages | ||
# Worlds have unit tests that don't call connect_entrances because they were written before it was added |
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 definitely feels super hacky, I would rather try to update the tests if relevant than do this and shoot ourselves in the foot in the future somehow
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.
(specifically referring to the generate_basic part of the assertion fwiw)
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 said a similar thing in DMs, but gonna state here that I fully agree with BadMagic's comment
I also feel that option 2 (make dummy connections) also seems quite bad. It would probably be helpful to know why they care about other worlds' region graph - do they actually use it or is it just the state sweep getting extra? If the latter, we may also consider looking into #2427 again |
It's because they use get_all_state, which performs sweeps & which we don't have a per player version of. |
Yeah so then I think #2427 is the real long term solution here. Whether it's feasible to actually wrap that up idk, as it's been waiting on treble forever now. GER would also benefit from this for larger multiworlds |
We could probably actually just steal |
Closing in favor of #4530 |
In #4420, we added a new step called
connect_entrances
.The description of this step reads: "By the end of this step, all Entrances must be connected".
However, there are some worlds that are relying on other worlds not having any dangling entrances in
set_rules
(which is before connect_entrances).The culprit here is
get_all_state
, which does region sweeps on all worlds.This is my attempt at a fix. Only 1 line needs to be changed in Factorio and ALTTP each, but I also wanted to add protection against this happening to unsupported worlds.
This PR also serves as the "release blocker" PR, but this label does not mean this particular implementation is what we want to go with
Other options: