mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-16 16:21:30 +02:00
Merge pull request #955 from ShaneMcGovernIE/shanemcgovernie-issue-945-cannot-edit-trainer-class-s-battle-theme-ad701b
Honor trainer battleTheme override (fixes #945)
This commit is contained in:
+4
-3
@@ -368,11 +368,12 @@ function Music.setSurfing(data, surfing)
|
||||
if play then Music.play(data, play, nil, { reason = "map" }) end
|
||||
end
|
||||
|
||||
-- battle themes; kind = "wild"|"trainer"|"gym"|"final"
|
||||
function Music.playBattle(data, kind, trainerId)
|
||||
-- battle themes; kind = "wild"|"trainer"|"gym"|"final". `song`, when
|
||||
-- given, overrides the kind's default -- a mod-set trainer battleTheme.
|
||||
function Music.playBattle(data, kind, trainerId, song)
|
||||
local b = data.audio and data.audio.battle
|
||||
if b then
|
||||
Music.play(data, b[kind] or b.wild, nil,
|
||||
Music.play(data, song or b[kind] or b.wild, nil,
|
||||
{ reason = "battle", kind = kind, trainerId = trainerId })
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user