Skip to content
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

Merged
merged 5 commits into from Apr 11, 2020

Conversation

o01eg
Copy link
Contributor

@o01eg o01eg commented Apr 10, 2020

Fixes #2820

@o01eg o01eg added category:feature The Issue/PR describes or implements a new game feature. component:game mechanic The Issue/PR deals with the currently used or planned game mechanics. labels Apr 10, 2020
@o01eg o01eg added this to the next release milestone Apr 10, 2020
@o01eg o01eg self-assigned this Apr 10, 2020
server/SaveLoad.cpp Outdated Show resolved Hide resolved
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";
Copy link
Member

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...

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Member

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...

Copy link
Contributor Author

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.

@geoffthemedio geoffthemedio merged commit f9939fa into freeorion:master Apr 11, 2020
@o01eg o01eg deleted the encoding-empire-serialize branch April 12, 2020 05:19
@Vezzra Vezzra added the status:merged All relevant commits of this PR were merged into the master development branch. label Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:feature The Issue/PR describes or implements a new game feature. component:game mechanic The Issue/PR deals with the currently used or planned game mechanics. status:merged All relevant commits of this PR were merged into the master development branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to hide real galaxy in multiplayer game
4 participants