-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
Save and load the current planned hyperjump in the save file #5721
Save and load the current planned hyperjump in the save file #5721
Conversation
This fixes #5178 ? |
@impaktor , only half of it; I'll get onto the rest later - thanks for pointing it out |
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.
Especially given that you're planning on serializing more sector view state, I'd recommend that you marshal the serialized data through a Serializer:Register()
call in map-sector-view.lua
instead of registering the serialization callback in hyperjump-planner.lua
.
The hyperjump planner / sector view split is slightly unconventional / unfinished in that the hyperjump planner is not quite a re-usable class that the sector map owns an instance of (yet), but it's close enough that I'd recommend applying that same mental model.
This is not strictly required, but it will make it easier to clean up / finish encapsulating the hyperjump planner widget in the future.
Hmm... the more I look at this code the more I think the serialization should be entirely handled in |
@Web-eWorks , I think your right; I also suspect that the call to I felt that as this was all to do with the route-planner, it made sense to live in here, although I agree, it really has little to do with that element, which is a UX one. I'll have a crack at moving it to the suggested place and add the other missing bits of #5187 |
Before if the options to draw out of range labels was ticket, they were hidden and unticled they were shown.
7bd2722
to
1d1bb7d
Compare
@Web-eWorks , ready for re-review, all seems to be complete and working, with a bonus bug-fix thrown in at the end :-) |
oh snap, take that back found a bug |
e091ba7
to
d018a27
Compare
OK, fixed that bug (doesn't look like I introduced it, oddly) and then clang formatted a file I touched on the way through. @Web-eWorks now ready to go |
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.
Two very minor tiny nitpicks but the code looks good otherwise. Haven't had time to test this branch, so it's provisionally approved pending a playtest sometime in the next 24 hours.
This is quite the ancient bug oddly enough (4 years old!) but was completely benign up until yesterday when I merged #5724. I had the feeling something was odd with the |
The planned hyperspace route, with all stops is saved along with the save game, and restored on load.