-
Notifications
You must be signed in to change notification settings - Fork 191
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
Add a waring about unsupported save files #1683
base: dev
Are you sure you want to change the base?
Conversation
16a3800
to
16cd071
Compare
|
Ready for review: no more conflicts :) |
Who should I ask to review this? |
I'll review this today or tomorrow. |
static inline constexpr int MAJOR = @CMAKE_PROJECT_VERSION_MAJOR@; | ||
static inline constexpr int MINOR = @CMAKE_PROJECT_VERSION_MINOR@; | ||
static inline constexpr int PATCH = @CMAKE_PROJECT_VERSION_PATCH@; | ||
static inline constexpr int TWEAK = @CMAKE_PROJECT_VERSION_TWEAK@; |
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.
TWEAK should be removed, we will not be using it in future releases.
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.
Correct, we had ideas for it but that's unnecessary work for little benefits. Top level project's tweak number will also be removed.
} | ||
else | ||
{ | ||
m_dialog->StartQuestion("Version unsupported. Open anyway?", false, false, false, doRead); |
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 text should be translatable (see restext.cpp, update-pot
).
CMakeLists.txt
Outdated
# Loading save files created by a previous version of the game is | ||
# unsupported with one exception: the first three version components have to match | ||
# and the fourth version component has to be greater or equal. |
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 description has no place in top level CMakeLists.txt. It should be moved near relevant implementation details, like in a comment before the function that checks save file version.
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.
Removing TWEAK made this comment redundant
@@ -168,10 +171,22 @@ bool CScreenIORead::EventProcess(const Event &event) | |||
|
|||
if ( event.type == EVENT_INTERFACE_IOREAD ) | |||
{ | |||
if(IOReadScene() && m_inSimulation) | |||
auto doRead = [&]() { |
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.
Minor: {
should be in next line
@@ -41,6 +42,7 @@ class CScreenIO : public CScreen | |||
void IODeleteScene(); | |||
void IOWriteScene(); | |||
bool IOReadScene(); | |||
std::optional<std::filesystem::path> GetSceneName(); |
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.
Minor: if possible, make the method const
qualified
} | ||
else | ||
{ | ||
m_dialog->StartQuestion("Version unsupported. Open anyway?", false, false, false, doRead); |
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'd change the text to be more descriptive. Something like "This save file is from a different version of the game and might not work correctly. Do you want to open it anyway?"
@tomaszkax86 @Emxx52 Thanks. Done |
Problem
In #1668 (comment) @Emxx52 told me "loading old save files is generally unsupported".
Solution
Note to self: after this is merged I should implement a fix for: