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

Some world options are overwritten by defaults #20265

Closed
Coolthulhu opened this issue Feb 13, 2017 · 3 comments

Comments

Projects
2 participants
@Coolthulhu
Copy link
Contributor

commented Feb 13, 2017

This affects options like NO_VITAMINS, FILTHY_MORALE etc.

In general, it seems that world options are loaded multiple times in some weird order. I added a new flag and wanted to test how is it loaded and found that in a world with FILTHY_MORALE flag, it is set 9 times in one game load. The new flag was only set 2 times, despite being in the same "context" as FILTHY_MORALE.

Now that I think about it, it is probably the same bug that caused the radiation mutation to reset to the default value of true.

@Coolthulhu Coolthulhu added the <Bug> label Feb 13, 2017

@Coolthulhu Coolthulhu added this to the 0.D milestone Feb 13, 2017

@kevingranade kevingranade added this to Blockers in 0.D Release Mar 2, 2017

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Mar 15, 2017

I think I get it now:
The option system doesn't verify if we're asking for world options or global options. So when someone asks for a global option, it gives the default world settings not the current world settings.

Should asking for a world option using the non-world get_option produce a warning, give the world value instead or keep the dangerous behavior?
I think going with world value is safest here.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Mar 15, 2017

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Mar 15, 2017

warning in debug builds

That wouldn't help much. Debug builds are unbearably slow and many of the options would require getting a bit deeper into to test.
I'd much rather do it manually, by greping get_option, correcting all values, then having it hardcoded to always warn.

@Coolthulhu Coolthulhu moved this from Blockers to In Progress Blockers in 0.D Release Mar 16, 2017

@Coolthulhu Coolthulhu moved this from In Progress Blockers to Closed Blockers in 0.D Release Mar 19, 2017

@kevingranade kevingranade removed this from Closed Blockers in 0.D Release Apr 15, 2017

@kevingranade kevingranade added this to Closed Issues in 0.D Release Aug 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.