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

Simplifiing the settings and keybinds systems #309

Merged
merged 7 commits into from
Mar 5, 2024

Conversation

cooltexture1
Copy link
Contributor

The original implementation of the settings system used some advanced rust features which made the code hard to read, such as PhantomData mixed with lots of generics and trait-objects. It also had a RefCell inside of a Hashmap which might break the internal structure of the HashMap.
Ive changed the implementation to be more idiomatic rust code. Ive also split the settings from the keybinds and the settings system in general from the console code.
Still WIP becasue i still want to make some changes.

the changes to the settings system where tested and they worked.
the config file will have to be deleted in order for this to work
@terrarier2111
Copy link
Member

There are a couple small conflicts caused by #313
I tried minimizing the conflicts and delayed some of the changes until after this pr.
Sorry for the breaks that this caused still

@cooltexture1 cooltexture1 marked this pull request as ready for review March 5, 2024 15:36
@cooltexture1
Copy link
Contributor Author

I think its ready to merge now. The settings are now split up based on they value type (StringSetting, BoolSetting...) and values have to be retrieved from the SettingStore via their respective methods (settings.get_string(), ...)

@terrarier2111 terrarier2111 merged commit 9647fee into Lea-fish:main Mar 5, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants