Skip to content

Commit

Permalink
minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Feb 3, 2025
1 parent ac57d43 commit 06e574f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ambience.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ end
-- limit plaing sounds per mapblock
local function can_play(pos)
local count = currently_playing[get_key(pos)]
return not count or count < 10
return not count or count < 25
end

-- register ambience sounds with node-timer
Expand All @@ -53,7 +53,7 @@ function scifi_nodes.register_ambience(nodename, soundname, opts)

if not can_play(pos) then
-- too many sounds playing, recheck again soon
timer:start(2)
timer:start(1)
return
end

Expand Down
3 changes: 1 addition & 2 deletions nodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
"description": "Engine",
"ambience": {
"scifi_nodes_ambience_engine": {
"interval": 16.1,
"gain": 2.0
"interval": 16.1
}
}
},
Expand Down
1 change: 0 additions & 1 deletion nodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ for name, def in pairs(nodes) do

if def.ambience then
for soundname, opts in pairs(def.ambience) do
print(dump(opts))
scifi_nodes.register_ambience(nodename, soundname, opts)
end
end
Expand Down

0 comments on commit 06e574f

Please sign in to comment.