get sound position from user position
This commit is contained in:
parent
8297ede8ea
commit
d46b3078a0
16
init.lua
16
init.lua
@ -14,9 +14,9 @@ minetest.register_tool("orbs_of_time:orb_day", {
|
||||
wield_image = "orbs_orb_day_weild.png",
|
||||
stack_max=1,
|
||||
on_use = function(itemstack, user)
|
||||
minetest.sound_play("orbs_ding", {pos=pos, loop=false})
|
||||
minetest.sound_play("orbs_ding", {pos=user:getpos(), loop=false})
|
||||
minetest.set_timeofday(0.5)
|
||||
minetest.sound_play("orbs_birds", {pos=pos, loop=false})
|
||||
minetest.sound_play("orbs_birds", {pos=user:getpos(), loop=false})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535/8)
|
||||
end
|
||||
@ -33,9 +33,9 @@ minetest.register_tool("orbs_of_time:orb_night",{
|
||||
wield_image = "orbs_orb_night_weild.png",
|
||||
stack_max=1,
|
||||
on_use = function(itemstack, user)
|
||||
minetest.sound_play("orbs_ding", {pos=pos, loop=false})
|
||||
minetest.sound_play("orbs_ding", {pos=user:getpos(), loop=false})
|
||||
minetest.set_timeofday(0)
|
||||
minetest.sound_play("orbs_owl", {pos=pos, loop=false})
|
||||
minetest.sound_play("orbs_owl", {pos=user:getpos(), loop=false})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535/8)
|
||||
end
|
||||
@ -53,9 +53,9 @@ minetest.register_tool("orbs_of_time:orb_dawn", {
|
||||
wield_image = "orbs_orb_day_weild.png^[lowpart:75:orbs_orb_night_weild.png",
|
||||
stack_max=1,
|
||||
on_use = function(itemstack, user)
|
||||
minetest.sound_play("orbs_ding", {pos=pos, loop=false})
|
||||
minetest.sound_play("orbs_ding", {pos=user:getpos(), loop=false})
|
||||
minetest.set_timeofday(0.2)
|
||||
minetest.sound_play("orbs_birds", {pos=pos, loop=false})
|
||||
minetest.sound_play("orbs_birds", {pos=user:getpos(), loop=false})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535/8)
|
||||
end
|
||||
@ -72,9 +72,9 @@ minetest.register_tool("orbs_of_time:orb_dusk",{
|
||||
wield_image = "orbs_orb_night_weild.png^[lowpart:75:orbs_orb_day_weild.png",
|
||||
stack_max=1,
|
||||
on_use = function(itemstack, user)
|
||||
minetest.sound_play("orbs_ding", {pos=pos, loop=false})
|
||||
minetest.sound_play("orbs_ding", {pos=user:getpos(), loop=false})
|
||||
minetest.set_timeofday(0.8)
|
||||
minetest.sound_play("orbs_owl", {pos=pos, loop=false})
|
||||
minetest.sound_play("orbs_owl", {pos=user:getpos(), loop=false})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535/8)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user