-
Notifications
You must be signed in to change notification settings - Fork 77
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
Wine addon #1673
Wine addon #1673
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.
Just took a quick look for ideas and potential issues and improvements
I think the implementation is now feature complete. I will provide a new build in the next days for testing.
|
That would have been my question too: When the addon is disabled everything should look and work as before. I guess having the wares in the internal lists such as distribution is fine as it won't affect gameplay without those wares but for inventory screen, settings screen etc. it might matter. |
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.
Awesome work implementing this feature! Just some minor remarks but looks fine in general!
The failing replay test indicates you need to a) increase the gamedataversion and b) add compatibility code to allow loading older save games. From a quick look it seems that s25client/libs/s25main/GamePlayer.cpp Line 280 in 7bf8281
|
What was the reason for this? I think the combination of this with the previous is the best:
This removes the need for the seemingly random extend parameter for the temple window. I mean the file for the subclass is less than 50 lines with only the changes required for it which looks very clean |
This was a misunderstanding. I changed it accordingly :) |
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 was a misunderstanding. I changed it accordingly :)
Alright. Could have been that the implementation turned out harder than I thought or blocked by something. Hence the question :)
I added compatibility code for old savegames. But the replay test does not use this code. Does the replay not only record GameCommands? Is there also a possibility for compatibility for GameCommands? For example the ChangeDistribution Command fails. |
I don't see a way to do this, the GameCommands use the basic serializer because they are used in the game where versioning doesn't make sense. While we could change that such that a version is added for those (and only those) we'd need to add the version to the replay file. And I cant see where/how without breaking backwards compatibility. Maybe we can use the Otherwise we need to declare a new version rendering previous replays unusable. s25client/libs/s25main/Replay.cpp Line 23 in 7bf8281
|
If you think it's worse the effort we can do this. I think we should simply increase the version and live with the breaking loading of old replays, as lat done in 2023. |
Yes I think it is worth it and I already have a good idea how to do that. One of the reasons is that there are still some open issues with replays attached which are required to reproduce the issue. Breaking compatibility will make that impossible I'll work on it over the weekend |
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.
Just some style improvements :)
@Flamefire Are you working on this topic? Or do we increase the version for now and record the replays with the new version? |
The implementation is finished. Only the topic in the above comment is unresolved. After this is finished i will provide a last test version to @aztimh. If everything is fine we can squash the commits into one and rebase the master. |
Yes and almost done testing. See #1677 |
Translate comments and improve naming and comments
Only used in one place and includes costly PointQuality calculation which needs to happen twice due to this.
Easier handling for derived classes that need to check for available wares.
Translate comments and use `static_vector` instead of array and size
The startDirection was added to a valid direction which may result in an invalid direction. Use a random index instead.
Skip loop iteration if there are no people of a job. This also avoids asyncs when adding/removing jobs and improves speed by not calling RANDOM_RAND in that case.
We only provide backwards compatibility. So we need to reject any newer version to avoid corrupting memory due to unexpected changes.
Co-authored-by: Alexander Grund <[email protected]>
Squash finished. We can merge it as soon as ci is through. |
🥳 🎉 |
Awesome work thanks so much! I'll get some screenshots and write up a news post for Spike to put on the RTTR website. I'll be sure to credit all the work you both did programming and refining the code :) Thanks again,
|
Fixes #1669