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 options to disable disclosure of galaxy seed #2845
Add options to disable disclosure of galaxy seed #2845
Conversation
util/SerializeMultiplayerCommon.cpp
Outdated
ar & BOOST_SERIALIZATION_NVP(m_seed) | ||
& BOOST_SERIALIZATION_NVP(m_size) | ||
if (Archive::is_saving::value && m_encoding_empire != ALL_EMPIRES && (!GetOptionsDB().Get<bool>("network.server.publish-seed"))) { | ||
std::string dummy = "hidden"; |
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 this "hidden" text meant to be shown to the player on the galaxy info pedia page or multiplayer lobby? If so, there shouldn't be localized text in the source code...
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'm not sure what to place here as any localization will happen on the server side with some default language instead of client side. Maybe send "-" or some sign to the client?
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.
Unless an empty string has already another special meaning use that and let the client handle the seed representation.
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.
In the client UI, setting an empty seed sets it to generate a random seed. The universe generation also treats an empty seed as a sign to generate a random one server-side. But neither of those mean an empty seed can't be sent back to the client later...
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.
So I suppose empty seed is fine to send to the client.
Fixes #2820