mirror of
https://github.com/minetest/minetest.git
synced 2024-11-26 17:43:45 +01:00
Restore old inconsistent minimum digging time behavior (#14777)
and restore default of 0.16 for repeat_place_time since it was only changed to be in line with repeat_dig_time.
This commit is contained in:
parent
868b548dd0
commit
7709d92289
@ -114,11 +114,11 @@ always_fly_fast (Always fly fast) bool true
|
||||
# the place button.
|
||||
#
|
||||
# Requires: keyboard_mouse
|
||||
repeat_place_time (Place repetition interval) float 0.25 0.15 2.0
|
||||
repeat_place_time (Place repetition interval) float 0.25 0.16 2.0
|
||||
|
||||
# The minimum time in seconds it takes between digging nodes when holding
|
||||
# the dig button.
|
||||
repeat_dig_time (Dig repetition interval) float 0.15 0.15 2.0
|
||||
repeat_dig_time (Minimum dig repetition interval) float 0.0 0.0 2.0
|
||||
|
||||
# Automatically jump up single-node obstacles.
|
||||
autojump (Automatic jumping) bool false
|
||||
|
@ -2352,9 +2352,12 @@ for this group, and unable to dig the rating `1`, which is the toughest.
|
||||
Unless there is a matching group that enables digging otherwise.
|
||||
|
||||
If the result digging time is 0, a delay of 0.15 seconds is added between
|
||||
digging nodes; If the player releases LMB after digging, this delay is set to 0,
|
||||
digging nodes. If the player releases LMB after digging, this delay is set to 0,
|
||||
i.e. players can more quickly click the nodes away instead of holding LMB.
|
||||
|
||||
This extra delay is not applied in case of a digging time between 0 and 0.15,
|
||||
so a digging time of 0.01 is actually faster than a digging time of 0.
|
||||
|
||||
### Damage groups
|
||||
|
||||
List of damage for groups of entities. See [Entity damage mechanism].
|
||||
|
@ -71,7 +71,7 @@ end
|
||||
-- Mese Pickaxe: special tool that digs "everything" instantly
|
||||
minetest.register_tool("basetools:pick_mese", {
|
||||
description = "Mese Pickaxe".."\n"..
|
||||
"Digs diggable nodes instantly",
|
||||
"Digs diggable nodes instantly.",
|
||||
inventory_image = "basetools_mesepick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
@ -88,6 +88,28 @@ minetest.register_tool("basetools:pick_mese", {
|
||||
})
|
||||
|
||||
|
||||
-- A variant of the mese pickaxe that is not affected by the 0.15s digging delay
|
||||
minetest.register_tool("basetools:pick_mese_no_delay", {
|
||||
description = "Mese Pickaxe (no delay)".."\n"..
|
||||
"Digs diggable nodes instantly.".."\n"..
|
||||
"There is no delay between digging each node,\n"..
|
||||
'but the "repeat_dig_time" setting is still respected.',
|
||||
inventory_image = "basetools_mesepick_no_delay.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=3,
|
||||
groupcaps={
|
||||
cracky={times={[1]=0.001, [2]=0.001, [3]=0.001}, maxlevel=255},
|
||||
crumbly={times={[1]=0.001, [2]=0.001, [3]=0.001}, maxlevel=255},
|
||||
snappy={times={[1]=0.001, [2]=0.001, [3]=0.001}, maxlevel=255},
|
||||
choppy={times={[1]=0.001, [2]=0.001, [3]=0.001}, maxlevel=255},
|
||||
dig_immediate={times={[1]=0.001, [2]=0.001, [3]=0.001}, maxlevel=255},
|
||||
},
|
||||
damage_groups = {fleshy=100},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- Pickaxes: Dig cracky
|
||||
--
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 169 B |
@ -3987,8 +3987,12 @@ void Game::handleDigging(const PointedThing &pointed, const v3s16 &nodepos,
|
||||
runData.nodig_delay_timer =
|
||||
runData.dig_time_complete / (float)crack_animation_length;
|
||||
|
||||
// Don't add a corresponding delay to very time consuming nodes.
|
||||
runData.nodig_delay_timer = std::min(runData.nodig_delay_timer, 0.3f);
|
||||
// We don't want a corresponding delay to very time consuming nodes
|
||||
// and nodes without digging time (e.g. torches) get a fixed delay.
|
||||
if (runData.nodig_delay_timer > 0.3f)
|
||||
runData.nodig_delay_timer = 0.3f;
|
||||
else if (runData.dig_instantly)
|
||||
runData.nodig_delay_timer = 0.15f;
|
||||
|
||||
// Ensure that the delay between breaking nodes
|
||||
// (dig_time_complete + nodig_delay_timer) is at least the
|
||||
@ -4392,8 +4396,8 @@ void Game::readSettings()
|
||||
m_cache_enable_fog = g_settings->getBool("enable_fog");
|
||||
m_cache_mouse_sensitivity = g_settings->getFloat("mouse_sensitivity", 0.001f, 10.0f);
|
||||
m_cache_joystick_frustum_sensitivity = std::max(g_settings->getFloat("joystick_frustum_sensitivity"), 0.001f);
|
||||
m_repeat_place_time = g_settings->getFloat("repeat_place_time", 0.15f, 2.0f);
|
||||
m_repeat_dig_time = g_settings->getFloat("repeat_dig_time", 0.15f, 2.0f);
|
||||
m_repeat_place_time = g_settings->getFloat("repeat_place_time", 0.16f, 2.0f);
|
||||
m_repeat_dig_time = g_settings->getFloat("repeat_dig_time", 0.0f, 2.0f);
|
||||
|
||||
m_cache_enable_noclip = g_settings->getBool("noclip");
|
||||
m_cache_enable_free_move = g_settings->getBool("free_move");
|
||||
|
@ -359,7 +359,7 @@ void set_default_settings()
|
||||
settings->setDefault("invert_hotbar_mouse_wheel", "false");
|
||||
settings->setDefault("mouse_sensitivity", "0.2");
|
||||
settings->setDefault("repeat_place_time", "0.25");
|
||||
settings->setDefault("repeat_dig_time", "0.15");
|
||||
settings->setDefault("repeat_dig_time", "0.0");
|
||||
settings->setDefault("safe_dig_and_place", "false");
|
||||
settings->setDefault("random_input", "false");
|
||||
settings->setDefault("aux1_descends", "false");
|
||||
|
Loading…
Reference in New Issue
Block a user