From 57d0adb96f65086e53721954d82ce5c5ab52501d Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Wed, 7 Aug 2019 16:26:09 -0400 Subject: [PATCH] Add a digestion loop sound --- stories/mass-vore.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/stories/mass-vore.js b/stories/mass-vore.js index 3ba3e7d..bfe2209 100644 --- a/stories/mass-vore.js +++ b/stories/mass-vore.js @@ -5,7 +5,7 @@ } function digest(state, count) { if (count === undefined) { - count = state.player.stats.stomach.value / 10; + count = state.player.stats.stomach.value / 200; } state.player.stats.stomach.value -= count; state.player.stats.gas.value += count; @@ -20,10 +20,11 @@ ], sounds: [ "sfx/belches/belch.ogg", - "sfx/swallows/swallow.ogg" + "sfx/swallows/swallow.ogg", + "loop/stomach/stomach.ogg" ], preload: [ - + "loop/stomach/stomach.ogg" ], intro: { start: "city", @@ -78,9 +79,12 @@ id: "digestion", func: state => { digest(state); + let vol = state.player.stats.fullness.value / state.player.stats.fullness.max + vol = Math.sqrt(vol); + playLoop("loop/stomach/stomach.ogg", vol); return true; }, - delay: 100, + delay: 1000/60, loop: true, classes: [