mirror of
https://github.com/minetest-mods/technic.git
synced 2025-01-04 11:47:36 +01:00
Chainsaw: Chat message for 'aborted by safe cut'
This provides a feedback to the player.
This commit is contained in:
parent
b268e3d526
commit
59643c45d4
@ -128,6 +128,7 @@ local function dig_recursive(x, y, z)
|
|||||||
if safe_cut and cutter.param2[i] ~= 0 then
|
if safe_cut and cutter.param2[i] ~= 0 then
|
||||||
-- Do not dig manually placed nodes
|
-- Do not dig manually placed nodes
|
||||||
-- Problem: moretrees' generated jungle trees use param2 = 2
|
-- Problem: moretrees' generated jungle trees use param2 = 2
|
||||||
|
cutter.stopped_by_safe_cut = true
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -201,6 +202,11 @@ local function chainsaw_dig(player, pos, remaining_charge)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if cutter.stopped_by_safe_cut then
|
||||||
|
minetest.chat_send_player(player_name, S("The chainsaw could not dig all nodes" ..
|
||||||
|
" because the safety mechanism was activated."))
|
||||||
|
end
|
||||||
|
|
||||||
minetest.sound_play("chainsaw", {
|
minetest.sound_play("chainsaw", {
|
||||||
pos = pos,
|
pos = pos,
|
||||||
gain = 1.0,
|
gain = 1.0,
|
||||||
|
Loading…
Reference in New Issue
Block a user