Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Two relatively minor improvements to the config GUI.
Other than speed scale, none of these affect how config is stored, saved or loaded. Out of bounds numbers are still permidded and disabled options can still be modified in the config file or by modifying and saving in code. Only the GUI widget is actually disabled as a visual cue.
Collision mode requirements
Taking advantage of the experimental Cloth Config requirements API added in shedaniel/cloth-config#204, "Ignore Transparent" and "Ignore Openable" are now disabled when "Ignore All" is switched "ON".
Alternative approach
Rather than disabling "Ignore Transparent" and "Ignore Openable", we could also hide them instead. This would probably need some text added to hint at the hidden options.
We could also move them into a nested sub-category and disable that. The current implementation is the simplest option, but I'm open to doing things differently.
Implementation note
It's technically a bit hacky to the AutoConfig transformer system for this;
The main issue you might run into is run order: another transformer could run after ours, which could decide to remove/replaced the widget we've captured, rather than mutating it.
Luckily AutoConfig will never do that to boolean entries and we won't either. So for us it's a non-issue.
Incidentally, that edge-case is why I opened shedaniel/cloth-config#215.
I've left a FIXME note as a reminder anyway. If I ever finish a Requirements API for AutoConfig, we can move over to that once its merged.
Movement speed sliders
Moved to #190
Details
Replace the text-entry widgets with number slider widgets.
This meant I had to a) set an upper bound on the value and b) convert to a scaled up
int
.Some users will still have the old scaled-down values and they will move very slowly unless they reset/adjust their settings after upgrading.
We could avoid that by renaming the fields, however the current names are pretty good (
horizontalSpeed
&verticalSpeed
)...Minor Enum cleanup
I almost pushed this to #122, but figured this PR was more topical. This minor tweak was made while working on #116, but felt unrelated to the core change of that PR.
Demo
2023-12-03.01-44-33.trimmed.mp4