mirror of
https://github.com/minetest-mods/technic.git
synced 2025-01-02 02:47:27 +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
|
||||
-- Do not dig manually placed nodes
|
||||
-- Problem: moretrees' generated jungle trees use param2 = 2
|
||||
cutter.stopped_by_safe_cut = true
|
||||
return
|
||||
end
|
||||
|
||||
@ -201,6 +202,11 @@ local function chainsaw_dig(player, pos, remaining_charge)
|
||||
return
|
||||
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", {
|
||||
pos = pos,
|
||||
gain = 1.0,
|
||||
|
Loading…
Reference in New Issue
Block a user