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

Abstract references to bepinexconfig out. #28

Merged
merged 1 commit into from
Jun 14, 2022
Merged

Conversation

Bubbet
Copy link
Contributor

@Bubbet Bubbet commented Jun 13, 2022

I'm writing a mod that is basically config files but you can use zio filesystems, which means steam cloud. To write the risk of options side I need to abstract references to ConfigEntryBase because my type does not derive from that.

@Bubbet
Copy link
Contributor Author

Bubbet commented Jun 13, 2022

Another thing i came across while working on this is your slider code is pretty slow, because it triggers saves every frame when dragging them. Not sure what you can do about that but it'd be nice if you did something.

@Bubbet
Copy link
Contributor Author

Bubbet commented Jun 13, 2022

https://github.com/Bubbet/Risk-Of-Rain-Mods/tree/master/ZioRiskOfOptions Here is the mod i've made using this pr.

@Rune580
Copy link
Owner

Rune580 commented Jun 14, 2022

After a precursory look, everything seems good. But I currently have sick brain so I'll give this another look through after my brain is done being dead.

@Rune580
Copy link
Owner

Rune580 commented Jun 14, 2022

Also I know that slider code is slow, I could probably have it check its value changing before submitting, but it's mostly so volume sliders don't get shafted, if that makes sense. Having the slider only submit after the user lets go of control wouldn't work well for having live changes. I could probably add in a config for changing this behavior though.

@Rune580 Rune580 merged commit 82c9ea1 into Rune580:master Jun 14, 2022
@Bubbet
Copy link
Contributor Author

Bubbet commented Jun 14, 2022

There is a field in configfile to not save when updating the value. You could set that so it doesnt save to disk while scrubbing and then upon release set it back and set the value again.

That value was added per config entry for zio's but that shouldnt be something you'll have to worry about as long as you offer a way i can override for enabling/disabling the saving.

@Rune580
Copy link
Owner

Rune580 commented Jun 14, 2022

That could work. I'll add that to my todo list for after I'm sickn't. Override as in just provide a method to toggle serializing off of BaseOption?

@Bubbet
Copy link
Contributor Author

Bubbet commented Jun 14, 2022

Yeah something I can override to toggle the same thing but in my type.

@Rune580
Copy link
Owner

Rune580 commented Jun 14, 2022

should be doable, added to todo list

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