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",
|
wield_image = "orbs_orb_day_weild.png",
|
||||||
stack_max=1,
|
stack_max=1,
|
||||||
on_use = function(itemstack, user)
|
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.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
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
itemstack:add_wear(65535/8)
|
itemstack:add_wear(65535/8)
|
||||||
end
|
end
|
||||||
@ -33,9 +33,9 @@ minetest.register_tool("orbs_of_time:orb_night",{
|
|||||||
wield_image = "orbs_orb_night_weild.png",
|
wield_image = "orbs_orb_night_weild.png",
|
||||||
stack_max=1,
|
stack_max=1,
|
||||||
on_use = function(itemstack, user)
|
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.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
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
itemstack:add_wear(65535/8)
|
itemstack:add_wear(65535/8)
|
||||||
end
|
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",
|
wield_image = "orbs_orb_day_weild.png^[lowpart:75:orbs_orb_night_weild.png",
|
||||||
stack_max=1,
|
stack_max=1,
|
||||||
on_use = function(itemstack, user)
|
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.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
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
itemstack:add_wear(65535/8)
|
itemstack:add_wear(65535/8)
|
||||||
end
|
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",
|
wield_image = "orbs_orb_night_weild.png^[lowpart:75:orbs_orb_day_weild.png",
|
||||||
stack_max=1,
|
stack_max=1,
|
||||||
on_use = function(itemstack, user)
|
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.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
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
itemstack:add_wear(65535/8)
|
itemstack:add_wear(65535/8)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user