diff options
author | h-v-smacker <hans-von-smacker+github@gmail.com> | 2018-05-02 21:14:20 +0300 |
---|---|---|
committer | h-v-smacker <hans-von-smacker+github@gmail.com> | 2018-05-02 21:14:20 +0300 |
commit | 2979fd27f6ddf405b679c70ada695257c409322b (patch) | |
tree | 4eedc0e7c531981a6be10a0d953cff9ea502b463 | |
parent | 3bad50c8835cf462014bed42b7b79f807ee39cc9 (diff) |
better sound playing
-rw-r--r-- | technic/tools/lawn_trimmer.lua | 7 | ||||
-rw-r--r-- | technic/tools/walking_tractor.lua | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/technic/tools/lawn_trimmer.lua b/technic/tools/lawn_trimmer.lua index fa0004f..1be0d52 100644 --- a/technic/tools/lawn_trimmer.lua +++ b/technic/tools/lawn_trimmer.lua @@ -79,12 +79,15 @@ local function trim_the_lawn(itemstack, user) return -- no charge for even a single node, aborting end + local pos = user:get_pos() + minetest.sound_play("technic_lawn_trimmer", { - to_player = user:get_player_name(), +-- to_player = user:get_player_name(), + pos = pos, gain = 0.4, }) - local pos = user:get_pos() + -- Defining the area for the search needs two positions -- The tool has a limited range in the vertical axis, which is capped at +/- 1 node local start_pos = { diff --git a/technic/tools/walking_tractor.lua b/technic/tools/walking_tractor.lua index e78375f..2f4d965 100644 --- a/technic/tools/walking_tractor.lua +++ b/technic/tools/walking_tractor.lua @@ -117,6 +117,7 @@ local function work_on_soil(itemstack, user, pointed_thing) minetest.sound_play("technic_walking_tractor", { -- to_player = user:get_player_name(), + pos = pointed_thing.under, gain = 0.5, }) |