new sounds wanted
basic_machines_electric_zap.ogg -> https://soundbible.com/335-Electric-Shock-Zap.html basic_machines_inventory_move.ogg -> https://www.pacdv.com/sounds/machine_sounds.html (Transformer) basic_machines_object_move.ogg -> https://www.soundboard.com/sb/sound/450170 basic_machines_transport.ogg -> https://www.soundboard.com/sb/sound/450790
This commit is contained in:
parent
9793cb1313
commit
e79e2845f3
@ -419,9 +419,9 @@ local function dig(pos, meta, owner, prefer, pos1, node1, node1_name, source_che
|
||||
|
||||
-- play sound
|
||||
local activation_count = meta:get_int("activation_count")
|
||||
if activation_count < 16 then
|
||||
minetest.sound_play("basic_machines_transport", {pos = last_pos2 or pos2, gain = 1, max_hear_distance = 8}, true)
|
||||
end
|
||||
-- if activation_count < 16 then
|
||||
-- minetest.sound_play("basic_machines_transport", {pos = last_pos2 or pos2, gain = 1, max_hear_distance = 8}, true)
|
||||
-- end
|
||||
|
||||
return activation_count, new_fuel_cost
|
||||
end
|
||||
|
@ -104,9 +104,9 @@ local function drop(_, meta, owner, prefer, pos1, node1, node1_name, source_ches
|
||||
|
||||
-- play sound
|
||||
local activation_count = meta:get_int("activation_count")
|
||||
if activation_count < 16 then
|
||||
minetest.sound_play("basic_machines_transport", {pos = pos2, gain = 1, max_hear_distance = 8}, true)
|
||||
end
|
||||
-- if activation_count < 16 then
|
||||
-- minetest.sound_play("basic_machines_transport", {pos = pos2, gain = 1, max_hear_distance = 8}, true)
|
||||
-- end
|
||||
|
||||
return activation_count
|
||||
end
|
||||
|
@ -85,9 +85,9 @@ local function inventory(_, meta, _, prefer, pos1, _, node1_name, _, pos2, mreve
|
||||
|
||||
-- play sound
|
||||
local activation_count = meta:get_int("activation_count")
|
||||
if activation_count < 16 then
|
||||
minetest.sound_play("basic_machines_inventory_move", {pos = pos2, gain = 1, max_hear_distance = 8}, true)
|
||||
end
|
||||
-- if activation_count < 16 then
|
||||
-- minetest.sound_play("basic_machines_inventory_move", {pos = pos2, gain = 1, max_hear_distance = 8}, true)
|
||||
-- end
|
||||
|
||||
return activation_count
|
||||
end
|
||||
|
@ -210,9 +210,9 @@ local function normal(pos, meta, owner, prefer, pos1, node1, node1_name, source_
|
||||
|
||||
-- play sound
|
||||
local activation_count = meta:get_int("activation_count")
|
||||
if activation_count < 16 then
|
||||
minetest.sound_play("basic_machines_transport", {pos = last_pos2 or pos2, gain = 1, max_hear_distance = 8}, true)
|
||||
end
|
||||
-- if activation_count < 16 then
|
||||
-- minetest.sound_play("basic_machines_transport", {pos = last_pos2 or pos2, gain = 1, max_hear_distance = 8}, true)
|
||||
-- end
|
||||
|
||||
return activation_count, new_fuel_cost
|
||||
end
|
||||
|
@ -126,8 +126,10 @@ local function object(pos, meta, owner, prefer, pos1, _, _, _, pos2, mreverse)
|
||||
local activation_count = meta:get_int("activation_count")
|
||||
if no_sound then
|
||||
return activation_count
|
||||
elseif activation_count < 16 then -- play sound
|
||||
minetest.sound_play("basic_machines_object_move", {pos = pos2, gain = 1, max_hear_distance = 8}, true)
|
||||
else
|
||||
-- if activation_count < 16 then -- play sound
|
||||
-- minetest.sound_play("basic_machines_object_move", {pos = pos2, gain = 1, max_hear_distance = 8}, true)
|
||||
-- end
|
||||
return activation_count
|
||||
end
|
||||
end
|
||||
|
@ -55,9 +55,9 @@ local function transport(pos, meta, owner, prefer, pos1, node1, node1_name, sour
|
||||
|
||||
-- play sound
|
||||
local activation_count = meta:get_int("activation_count")
|
||||
if activation_count < 16 then
|
||||
minetest.sound_play("basic_machines_transport", {pos = pos2, gain = 1, max_hear_distance = 8}, true)
|
||||
end
|
||||
-- if activation_count < 16 then
|
||||
-- minetest.sound_play("basic_machines_transport", {pos = pos2, gain = 1, max_hear_distance = 8}, true)
|
||||
-- end
|
||||
|
||||
return activation_count
|
||||
end
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -84,18 +84,18 @@ local function battery_recharge(pos, energy, origin)
|
||||
|
||||
energy = energy_new
|
||||
|
||||
local count = meta:get_int("activation_count")
|
||||
if count < 16 then
|
||||
minetest.sound_play("basic_machines_electric_zap", {pos = pos, gain = 0.05, max_hear_distance = 8}, true)
|
||||
end
|
||||
-- local count = meta:get_int("activation_count")
|
||||
-- if count < 16 then
|
||||
-- minetest.sound_play("basic_machines_electric_zap", {pos = pos, gain = 0.05, max_hear_distance = 8}, true)
|
||||
-- end
|
||||
|
||||
local t0, t1 = meta:get_int("t"), minetest.get_gametime()
|
||||
if t0 > t1 - machines_minstep then
|
||||
meta:set_int("activation_count", count + 1)
|
||||
elseif count > 0 then
|
||||
meta:set_int("activation_count", 0)
|
||||
end
|
||||
meta:set_int("t", t1)
|
||||
-- local t0, t1 = meta:get_int("t"), minetest.get_gametime()
|
||||
-- if t0 > t1 - machines_minstep then
|
||||
-- meta:set_int("activation_count", count + 1)
|
||||
-- elseif count > 0 then
|
||||
-- meta:set_int("activation_count", 0)
|
||||
-- end
|
||||
-- meta:set_int("t", t1)
|
||||
elseif origin == "recharge_furnace" and energy < 1 then
|
||||
minetest.swap_node(pos, {name = "basic_machines:battery_0"})
|
||||
meta:set_string("infotext", S("Furnace needs at least 1 energy"))
|
||||
@ -576,7 +576,7 @@ minetest.register_node("basic_machines:generator", {
|
||||
if energy < 0 then energy = 0 end
|
||||
if energy > minenergy then energy = minenergy end -- excess energy is wasted
|
||||
meta:set_float("upgrade", energy)
|
||||
minetest.sound_play("basic_machines_electric_zap", {pos = pos, gain = 0.05, max_hear_distance = 8}, true)
|
||||
-- minetest.sound_play("basic_machines_electric_zap", {pos = pos, gain = 0.05, max_hear_distance = 8}, true)
|
||||
generator_update_form(meta, true)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user