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

Sugestion: Saving loading filter type. #185

Closed
Trivium1709 opened this issue Dec 24, 2024 · 5 comments
Closed

Sugestion: Saving loading filter type. #185

Trivium1709 opened this issue Dec 24, 2024 · 5 comments

Comments

@Trivium1709
Copy link

image
Currently the option to change the loading filter type always resets after reloading the game, is there a way to add a save state to the last option selected? Unless there's already a way to do it and I missed it.

@loki79uk
Copy link
Owner

It is supposed to save that when you save the game - let me check - but probably not until after Xmas now

@Trivium1709
Copy link
Author

It is supposed to save that when you save the game - let me check - but probably not until after Xmas now

Never saved for me even on fs22. And no worries take your time :)

@loki79uk
Copy link
Owner

loki79uk commented Dec 24, 2024

Never saved for me even on fs22. And no worries take your time :)

You are right - I just made a stupid mistake with the logic and never noticed, so it has been like that ever since 22, lol.

So when writing to the savegame file I had this to protect against writing a nil value:

	xmlFile:setValue(saveKey.."#loadingFilter", spec.currentLoadingFilter or true)
	xmlFile:setValue(saveKey.."#baleCollectionMode", spec.baleCollectionMode or false)
	xmlFile:setValue(saveKey.."#useHorizontalLoading", spec.useHorizontalLoading or false)

But in LUA using the OR operator like that means that currentLoadingFilter ALWAYS evaluates to true

The easiest fix is just to make the default false like the others. I'll do it in the next release!

edit: as a bonus, I should get less bugs about "why won't it load this empty pallet?" :D

@Trivium1709
Copy link
Author

edit: as a bonus, I should get less bugs about "why won't it load this empty pallet?" :D
Good point, hopefully that will do it! Thanks a bunch!

loki79uk added a commit that referenced this issue Dec 24, 2024
Changed default for loadingFilter from true to false.  Should make setting save properly now.
@Trivium1709
Copy link
Author

Can confirm its working now, thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants