Add ambience

This commit is contained in:
Emik 2026-06-15 22:26:29 +02:00
parent 18624dc29f
commit 507f6dbdff
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
7 changed files with 52 additions and 3 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -42,12 +42,44 @@ match_indent = true
target = "functions/misc_functions.lua" target = "functions/misc_functions.lua"
pattern = "local AC = G.SETTINGS.ambient_control" pattern = "local AC = G.SETTINGS.ambient_control"
position = "before" 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 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 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 base = Cryptid and 2 or G.ARGS.score_intensity.required_score
local expo = Cryptid and G.ARGS.score_intensity.required_score or 2 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''' end'''
match_indent = true match_indent = true
@ -226,3 +258,16 @@ if G.GAME.modifiers.jane_spacious then
t = {G.jokers, G.vouchers} t = {G.jokers, G.vouchers}
end''' end'''
match_indent = true 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

View file

@ -18,5 +18,5 @@
"conflicts": [ "conflicts": [
"Jen" "Jen"
], ],
"version": "1.7.23" "version": "1.8.0"
} }

View file

@ -349,6 +349,10 @@ SMODS.Atlas {
path = Jane.config.texture_pack .. "/c_jane_acc.png", 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({ for _, v in ipairs({
"back", "back",
"blind", "blind",