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
Add repeat_dig_time setting #14295
Add repeat_dig_time setting #14295
Conversation
97ceb99
to
9966e88
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try it with the default value and verify that the digging speed remains the same as previously.
The existing minimum value of 0.15
for runData.nodig_delay_timer
only applies for nodes that take zero time to dig. There can be lower values in other cases:
- In Minetest Game creative mode, the most common value seems to be
0.0328125
. - When digging dirt in Minetest Game without creative mode, the value is
0.14
.
This means that this PR actually (by default) results in a lower digging speed in some cases. To preserve the existing behavior, the default value for repeat_dig_time
should be 0.0
.
3bbbabe
to
80ec5a0
Compare
I have applied your suggested change but I realize that this might make the setting confusing as one might assume that a I did however get an idea for an alternative proposal for how this could work. I will try to implement that but do so as a separate commit so it can simply be dropped if you do not like it. |
80ec5a0
to
372a802
Compare
I have updated the branch according to my new proposal. I decided to rebase and drop the previous commit because I think this new version is simply better and should be merged instead. ChangesWhat I changed was that I made the
So it is the minimum time between breaking nodes and not the delay between digging nodes. Using a value of ReasonLike I stated above, I think a minimum and default value of This also results in nodes with dig times less than 0.15 getting dig times of 0.15. The effect of this on gameplay will be minimal since such nodes are rare. I also think its good that it fixes the weirdness with how a node with a dig time of 0.1 is dug faster than a node with a dig time of 0.0. It also removes the special condition for instant breakable nodes which makes the code cleaner. Lowered the minimum value of
|
2c42b51
to
32e099e
Compare
32e099e
to
6506cf5
Compare
I just made a change to the setting description. Changed it from
to
which I think reads better. I will not touch the branch anymore unless there are more things to be done after another review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested a bit, seems good.
I'm not sure what to think of the change to the minimum of repeat_dig_time
, but it probably won't make a big difference.
6506cf5
to
3addca7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calls to g_settings->(de)registerChangedCallback
are missing for the new setting.
Previously it was 0.16. It is lowered to match the min value of the repeat_dig_time setting which is 0.15.
3addca7
to
e5ac286
Compare
Goal of the PR
Provide better accessibility for people who accidentally dig instant breakable nodes but want dig repetition and cannot use the
safe_dig_and_place
setting.This PR solves this problem by introducing a
repeat_dig_interval
which is likerepeat_place_interval
but for digging. The setting simply ensures that it will take at minimum the settings value from finishing digging one node to starting to dig the next node.Does it resolve any reported issue?
Yes, #13726.
To do
This PR is ready to review.
How to test
Hop into a world and hold the dig button on nodes which are instant breakable. Could be done by hopping into a creative world in Mineclonia and start digging any nodes.
Try it with the default value and verify that the digging speed remains the same as previously. Then go into the settings menu and update the Dig repetition interval setting to a higher value. Hop into the world again and dig nodes, verify that there is a larger delay between digging each node.
Things to consider
The range of values allowed is probably something which should be discussed. Previously, the hardcoded value was 0.15. Currently I made the minimum setting value 0.15 and the maximum 2.0 with the default being 0.15.
The
repeat_place_interval
is minimum 0.16 and maximum 2.0. It could be argued that maybe its minimum value should be lowered to 0.15 for consistency with therepeat_dig_interval
setting.But perhaps the minimum value of
repeat_dig_inverval
could be lower?