Save and load the current planned hyperjump in the save file#5721
Save and load the current planned hyperjump in the save file#5721sturnclaw merged 4 commits intopioneerspacesim:masterfrom
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.
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 |
sturnclaw
left a comment
There was a problem hiding this comment.
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.