Add ambience
This commit is contained in:
parent
18624dc29f
commit
507f6dbdff
7 changed files with 52 additions and 3 deletions
BIN
assets/sounds/ambient_surreal1.ogg
Normal file
BIN
assets/sounds/ambient_surreal1.ogg
Normal file
Binary file not shown.
BIN
assets/sounds/ambient_surreal2.ogg
Normal file
BIN
assets/sounds/ambient_surreal2.ogg
Normal file
Binary file not shown.
BIN
assets/sounds/ambient_surreal3.ogg
Normal file
BIN
assets/sounds/ambient_surreal3.ogg
Normal file
Binary file not shown.
BIN
assets/sounds/ambient_surreal4.ogg
Normal file
BIN
assets/sounds/ambient_surreal4.ogg
Normal file
Binary file not shown.
49
lovely.toml
49
lovely.toml
|
|
@ -42,12 +42,44 @@ match_indent = true
|
|||
target = "functions/misc_functions.lua"
|
||||
pattern = "local AC = G.SETTINGS.ambient_control"
|
||||
position = "before"
|
||||
payload = '''if Jane and (type(G.ARGS.score_intensity.required_score) == "table" and G.ARGS.score_intensity.required_score:to_number() or G.ARGS.score_intensity.required_score) ~= 0 then
|
||||
payload = '''if Jane and
|
||||
(type(G.ARGS.score_intensity.required_score) == "table" and
|
||||
G.ARGS.score_intensity.required_score:to_number() or
|
||||
G.ARGS.score_intensity.required_score) ~= 0 then
|
||||
local break_infinity = ((Talisman or {}).config_file or {}).break_infinity
|
||||
local big = (break_infinity == "" or break_infinity == nil) and function (x) return x end or to_big
|
||||
local base = Cryptid and 2 or G.ARGS.score_intensity.required_score
|
||||
local expo = Cryptid and G.ARGS.score_intensity.required_score or 2
|
||||
Jane.sinister = (G.ARGS.score_intensity.earned_score / (big(base) ^ big(expo))):to_number() > 1
|
||||
local ratio = (G.ARGS.score_intensity.earned_score / (big(base) ^ big(expo))):to_number()
|
||||
Jane.sinister = ratio > 1
|
||||
|
||||
G.ARGS.score_intensity.ambientSurreal4 =
|
||||
(break_infinity and
|
||||
SMODS.Mods.Amulet and
|
||||
G.ARGS.score_intensity.earned_score >= Bakery_API.parse_hyper_e("e10#10##10000")) and 1 or 0
|
||||
|
||||
G.ARGS.score_intensity.ambientSurreal3 =
|
||||
(G.ARGS.score_intensity.ambientSurreal4 == 0 and
|
||||
number_format(G.ARGS.score_intensity.earned_score):find("#")) and 1 or 0
|
||||
|
||||
G.ARGS.score_intensity.ambientSurreal2 =
|
||||
(G.ARGS.score_intensity.ambientSurreal3 == 0 and
|
||||
G.ARGS.score_intensity.ambientSurreal4 == 0 and
|
||||
(G.ARGS.score_intensity.earned_score /
|
||||
(Cryptid and
|
||||
big(G.ARGS.score_intensity.required_score) ^
|
||||
big(G.ARGS.score_intensity.required_score) ^
|
||||
big(G.ARGS.score_intensity.required_score) or
|
||||
big(2) ^ big(G.ARGS.score_intensity.required_score)
|
||||
)
|
||||
):to_number() > 1
|
||||
) and 1 or 0
|
||||
|
||||
G.ARGS.score_intensity.ambientSurreal1 =
|
||||
(Jane.sinister and
|
||||
G.ARGS.score_intensity.ambientSurreal2 == 0 and
|
||||
G.ARGS.score_intensity.ambientSurreal3 == 0 and
|
||||
G.ARGS.score_intensity.ambientSurreal4 == 0) and 1 or 0
|
||||
end'''
|
||||
match_indent = true
|
||||
|
||||
|
|
@ -226,3 +258,16 @@ if G.GAME.modifiers.jane_spacious then
|
|||
t = {G.jokers, G.vouchers}
|
||||
end'''
|
||||
match_indent = true
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/misc_functions.lua"
|
||||
pattern = "ambientOrgan1 = {volfunc = function(_prev_volume) return _prev_volume*(1 - dt) + dt*0.6*(G.SETTINGS.SOUND.music_volume + 100)/200*(G.ARGS.score_intensity.organ) end},"
|
||||
position = "after"
|
||||
payload = '''
|
||||
jane_ambientSurreal1 = {volfunc = function(_prev_volume) return _prev_volume*(1 - dt) + dt*0.6*(G.SETTINGS.SOUND.music_volume + 80)/200*((G.ARGS.score_intensity.ambientSurreal1 or 0) * 1.4) end},
|
||||
jane_ambientSurreal2 = {volfunc = function(_prev_volume) return _prev_volume*(1 - dt) + dt*0.6*(G.SETTINGS.SOUND.music_volume + 90)/200*((G.ARGS.score_intensity.ambientSurreal2 or 0) * 1.6) end},
|
||||
jane_ambientSurreal3 = {volfunc = function(_prev_volume) return _prev_volume*(1 - dt) + dt*0.6*(G.SETTINGS.SOUND.music_volume + 100)/200*((G.ARGS.score_intensity.ambientSurreal3 or 0) * 1.8) end},
|
||||
jane_ambientSurreal4 = {volfunc = function(_prev_volume) return _prev_volume*(1 - dt) + dt*0.6*(G.SETTINGS.SOUND.music_volume + 110)/200*((G.ARGS.score_intensity.ambientSurreal4 or 0) * 2) end},
|
||||
'''
|
||||
match_indent = true
|
||||
|
|
|
|||
|
|
@ -18,5 +18,5 @@
|
|||
"conflicts": [
|
||||
"Jen"
|
||||
],
|
||||
"version": "1.7.23"
|
||||
"version": "1.8.0"
|
||||
}
|
||||
|
|
@ -349,6 +349,10 @@ SMODS.Atlas {
|
|||
path = Jane.config.texture_pack .. "/c_jane_acc.png",
|
||||
}
|
||||
|
||||
for i = 1, 4 do
|
||||
SMODS.Sound({key = "ambientSurreal" .. i, path = "ambient_surreal" .. i .. ".ogg"})
|
||||
end
|
||||
|
||||
for _, v in ipairs({
|
||||
"back",
|
||||
"blind",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue