More sounds
parent
28c5c60729
commit
f47ca0a19d
|
@ -1,4 +1,4 @@
|
|||
|
||||
local ready = true
|
||||
|
||||
local function register_clawshot(name, desc, texture, texture2, speed, accel, timeout, time2)
|
||||
|
||||
|
@ -49,6 +49,8 @@ local function register_clawshot(name, desc, texture, texture2, speed, accel, ti
|
|||
|
||||
if minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z}).name == "air" then
|
||||
attach_obj:setvelocity(vec)
|
||||
local name = player:get_player_name()
|
||||
minetest.sound_play("chain", {to_player=name, gain=0.7})
|
||||
minetest.after(time2, function()
|
||||
attach_obj:remove()
|
||||
--self.launcher:setpos({x=pos.x+1, y=pos.y, z=pos.z})
|
||||
|
@ -56,6 +58,8 @@ local function register_clawshot(name, desc, texture, texture2, speed, accel, ti
|
|||
end)
|
||||
elseif minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z}).name == "air" then
|
||||
attach_obj:setvelocity(vec)
|
||||
local name = player:get_player_name()
|
||||
minetest.sound_play("chain", {to_player=name, gain=0.7})
|
||||
minetest.after(time2, function()
|
||||
attach_obj:remove()
|
||||
--self.launcher:setpos({x=pos.x-1, y=pos.y, z=pos.z})
|
||||
|
@ -64,6 +68,8 @@ local function register_clawshot(name, desc, texture, texture2, speed, accel, ti
|
|||
end)
|
||||
elseif minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}).name == "air" then
|
||||
attach_obj:setvelocity(vec)
|
||||
local name = player:get_player_name()
|
||||
minetest.sound_play("chain", {to_player=name, gain=0.7})
|
||||
minetest.after(time2, function()
|
||||
attach_obj:remove()
|
||||
--self.launcher:setpos({x=pos.x, y=pos.y, z=pos.z+1})
|
||||
|
@ -72,6 +78,8 @@ local function register_clawshot(name, desc, texture, texture2, speed, accel, ti
|
|||
end)
|
||||
elseif minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}).name == "air" then
|
||||
attach_obj:setvelocity(vec)
|
||||
local name = player:get_player_name()
|
||||
minetest.sound_play("chain", {to_player=name, gain=0.7})
|
||||
minetest.after(time2, function()
|
||||
attach_obj:remove()
|
||||
--self.launcher:setpos({x=pos.x, y=pos.y, z=pos.z-1})
|
||||
|
@ -142,6 +150,8 @@ local function register_clawshot(name, desc, texture, texture2, speed, accel, ti
|
|||
|
||||
if minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z}).name == "air" then
|
||||
attach_obj:setvelocity(vec)
|
||||
local name = player:get_player_name()
|
||||
minetest.sound_play("chain", {to_player=name, gain=0.7})
|
||||
minetest.after(time2, function()
|
||||
attach_obj:remove()
|
||||
--self.launcher:setpos({x=pos.x+1, y=pos.y, z=pos.z})
|
||||
|
@ -149,6 +159,8 @@ local function register_clawshot(name, desc, texture, texture2, speed, accel, ti
|
|||
end)
|
||||
elseif minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z}).name == "air" then
|
||||
attach_obj:setvelocity(vec)
|
||||
local name = player:get_player_name()
|
||||
minetest.sound_play("chain", {to_player=name, gain=0.7})
|
||||
minetest.after(time2, function()
|
||||
attach_obj:remove()
|
||||
--self.launcher:setpos({x=pos.x-1, y=pos.y, z=pos.z})
|
||||
|
@ -157,6 +169,8 @@ local function register_clawshot(name, desc, texture, texture2, speed, accel, ti
|
|||
end)
|
||||
elseif minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}).name == "air" then
|
||||
attach_obj:setvelocity(vec)
|
||||
local name = player:get_player_name()
|
||||
minetest.sound_play("chain", {to_player=name, gain=0.7})
|
||||
minetest.after(time2, function()
|
||||
attach_obj:remove()
|
||||
--self.launcher:setpos({x=pos.x, y=pos.y, z=pos.z+1})
|
||||
|
@ -165,6 +179,8 @@ local function register_clawshot(name, desc, texture, texture2, speed, accel, ti
|
|||
end)
|
||||
elseif minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}).name == "air" then
|
||||
attach_obj:setvelocity(vec)
|
||||
local name = player:get_player_name()
|
||||
minetest.sound_play("chain", {to_player=name, gain=0.7})
|
||||
minetest.after(time2, function()
|
||||
attach_obj:remove()
|
||||
--self.launcher:setpos({x=pos.x, y=pos.y, z=pos.z-1})
|
||||
|
@ -212,6 +228,7 @@ local function register_clawshot(name, desc, texture, texture2, speed, accel, ti
|
|||
local playerpos = placer:getpos();
|
||||
local ctrl = placer:get_player_control()
|
||||
local obj = {}
|
||||
if ready then
|
||||
if not ctrl.sneak then
|
||||
obj = minetest.env:add_entity({x=playerpos.x+0+dir.x,y=playerpos.y+1.4+dir.y,z=playerpos.z+0+dir.z}, "clawshot:"..name.."_chain")
|
||||
else
|
||||
|
@ -226,8 +243,15 @@ local function register_clawshot(name, desc, texture, texture2, speed, accel, ti
|
|||
local object = obj:get_luaentity()
|
||||
object.launcher = placer
|
||||
object.ready = true
|
||||
ready = false
|
||||
local player = placer:get_player_name()
|
||||
minetest.sound_play("chain", {to_player=player, gain=0.7})
|
||||
minetest.after(timeout*2, function()
|
||||
ready = true
|
||||
end)
|
||||
item:add_wear(300)
|
||||
return item
|
||||
end
|
||||
end,
|
||||
|
||||
})
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,2 @@
|
|||
http://soundbible.com/
|
||||
CC Attribution 3.0 by Mike Keonig
|
|
@ -892,6 +892,8 @@ minetest.register_abm({
|
|||
local objs = minetest.get_objects_inside_radius({x=pos.x+x*num, y=pos.y, z=pos.z+z*num}, 1)
|
||||
for _, obj in ipairs(objs) do
|
||||
if obj:is_player() then
|
||||
local name = obj:get_player_name()
|
||||
minetest.sound_play("Laser", {to_player=obj, gain=0.5})
|
||||
local ent = minetest.env:add_entity(pos, "hyrule_mapgen:laser")
|
||||
ent:setvelocity({x=7*x, y=0, z=7*z})
|
||||
minetest.after(0.1, function()
|
||||
|
|
|
@ -220,4 +220,4 @@ http://creativecommons.org/licenses/by-sa/3.0/
|
|||
|
||||
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
|
||||
For Laser.ogg - CC BY 3.0 by Mike Keonig
|
||||
|
|
Binary file not shown.
|
@ -1601,6 +1601,7 @@ minetest.register_tool("hyruletools:flame_rod", {
|
|||
local obj = minetest.env:add_entity({x=playerpos.x+dir.x,y=playerpos.y+1.5+dir.y,z=playerpos.z+0+dir.z}, "hyruletools:fireball")
|
||||
local vec = {x=dir.x*16,y=dir.y*16,z=dir.z*16}
|
||||
obj:setvelocity(vec)
|
||||
minetest.sound_play("flamearrow", {to_player=player, gain=0.7})
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
crystalglass.ogg and flamearrow.ogg by Mike Keonig CC Attribution 3.0
|
|
@ -11,7 +11,7 @@ minetest.register_globalstep(function()
|
|||
local pos = player:getpos()
|
||||
local village_nodes = minetest.find_nodes_in_area({x=pos.x-5, y=pos.y-3, z=pos.z-5}, {x=pos.x+5, y=pos.y+5, z=pos.z+5}, {"stairs:slab_red", "stairs:slab_blue", "farming:straw"})
|
||||
local boss_nodes = minetest.find_nodes_in_area({x=pos.x-5, y=pos.y-3, z=pos.z-5}, {x=pos.x+5, y=pos.y+5, z=pos.z+5}, {"hyrule_mapgen:volvagia_spawn", "hyrule_mapgen:ganon_spawn", "hyrule_mapgen:bongo_spawn", "hyrule_mapgen:dodongo_spawn"})
|
||||
minetest.chat_send_all("boss_nodes:"..#boss_nodes.." village_nodes:"..#village_nodes)
|
||||
--minetest.chat_send_all("boss_nodes:"..#boss_nodes.." village_nodes:"..#village_nodes)
|
||||
|
||||
if #boss_nodes ~= nil and #village_nodes ~= nil then
|
||||
if #boss_nodes > 0 then
|
||||
|
@ -19,12 +19,12 @@ minetest.register_globalstep(function()
|
|||
music_name = "BrassFleece"
|
||||
duration = 105
|
||||
gain = 0.8
|
||||
elseif #village_nodes > 5 and math.random(1, 50) == 1 then
|
||||
elseif #village_nodes > 5 and math.random(1, 1000) == 1 then
|
||||
music = true
|
||||
music_name = "Villageforest"
|
||||
duration = 93
|
||||
gain = 1
|
||||
elseif math.random(1, 200) == 1 then
|
||||
elseif math.random(1, 2000) == 1 then
|
||||
music = true
|
||||
music_name = "Downtime"
|
||||
duration = 75
|
||||
|
|
Loading…
Reference in New Issue