Skip to content

Commit a1ccfad

Browse files
Merge pull request #785 from InvalidOS/patch-8
program pack music fix + music priorities
2 parents d82fd0f + 8e0246b commit a1ccfad

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

lib/content.lua

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -540,23 +540,29 @@ SMODS.Sound({
540540
and Cryptid_config.Cryptid
541541
and Cryptid_config.Cryptid.jimball_music
542542
-- Lowering priority for edition Jimballs later
543-
and 7
543+
and 200
544544
end,
545545
})
546546
SMODS.Sound({
547547
key = "music_code",
548548
path = "music_code.ogg",
549549
select_music_track = function()
550-
return Cryptid_config.Cryptid
550+
return (Cryptid_config.Cryptid
551551
and Cryptid_config.Cryptid.code_music
552552
and (
553+
-- in a code pack
553554
(
554-
G.pack_cards
555-
and G.pack_cards.cards
556-
and G.pack_cards.cards[1]
557-
and G.pack_cards.cards[1].ability.set == "Code"
558-
) or (G.GAME and G.GAME.USING_CODE)
559-
)
555+
G.booster_pack
556+
and not G.booster_pack.REMOVED
557+
and SMODS.OPENED_BOOSTER
558+
and SMODS.OPENED_BOOSTER.config.center.kind == "Code"
559+
)
560+
-- using a code card
561+
or (
562+
G.GAME
563+
and G.GAME.USING_CODE
564+
)
565+
)) and 100
560566
end,
561567
})
562568
SMODS.Sound({
@@ -565,14 +571,13 @@ SMODS.Sound({
565571
select_music_track = function()
566572
if G.GAME.cry_music_big then
567573
return G.GAME.cry_music_big
568-
end
569-
if
574+
elseif
570575
Cryptid_config.Cryptid
571576
and Cryptid_config.Cryptid.big_music
572577
and to_big(G.GAME.round_scores["hand"].amt) > to_big(10) ^ 1000000
573578
then
574-
G.GAME.cry_music_big = true
575-
return true
579+
G.GAME.cry_music_big = 6
580+
return 100.001
576581
end
577582
end,
578583
})
@@ -581,12 +586,12 @@ SMODS.Sound({
581586
path = "music_exotic.ogg",
582587
volume = 0.4,
583588
select_music_track = function()
584-
return Cryptid_config.Cryptid
589+
return (Cryptid_config.Cryptid
585590
and Cryptid_config.Cryptid.exotic_music
586-
and #Cryptid.advanced_find_joker(nil, "cry_exotic", nil, nil, true) ~= 0
591+
and #Cryptid.advanced_find_joker(nil, "cry_exotic", nil, nil, true) ~= 0)
592+
and 100.002
587593
end,
588-
})
589-
SMODS.Sound({
594+
})SMODS.Sound({
590595
key = "music_mainline",
591596
path = "music_mainline.ogg",
592597
volume = 0.7,

0 commit comments

Comments
 (0)