Jump to content

GetModConfigData returns incorrect results without caves, part 2


penguin0616
  • Fixed

@zarklord_klei hi hopefully this helps

Back for round two!

Link to the original issue, as it is mostly relevant, except the situation is INVERTED. Now, it always takes the server options instead of the client options.

Spoiler

 

A quick summary, regardless: In a world without caves, the configuration options used by the server will override the host's configuration options. This appears to be in part due to ModIndex:ApplyConfigOptionOverrides, but as a symptom.

But this time, I have provided the fix, and the mod I used for testing.

Mod used for testing:config_bug.zip

Fixed Files (modindex.lua, modutil.lua)

The modified areas are
ModIndex:UpdateConfigurationOptions, to respect the server/client boundary that is missing in no-caves saves.
ModIndex:LoadModConfigurationOptions (just to pass in an additional argument to UpdateConfigurationOptions)
GetModConfigurationData (the actual one, not the wrapper), to get proper values assigned in UpdateConfigurationOptions
Also a comment

Please let me know if anything else is required :angel:

supercoolfix.zip


Steps to Reproduce

Compare the results of GetModConfigData with TheSim:GetPersistentString()'s data in ModIndex.LoadModConfigurationOptions
In a world without caves, server options will always take precedence.

You can use the provided mod for testing if you would like. 

Once more, please let me know if anything else is required :angel:

  • Like 3



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...