Skip to content

Commit 6af0d02

Browse files
committed
Fix tracks not getting reloaded on language change
1 parent 8036f92 commit 6af0d02

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

BaboonAPI/Library.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ type BaboonPlugin() =
5454
typeof<TrackLoaderPatch>
5555
typeof<TrackTitlePatches>
5656
typeof<LoaderPatch>
57+
typeof<LanguageChangerPatch>
5758
typeof<GameControllerPatch>
5859
typeof<PausePatches>
5960
typeof<PreviewPatch>
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
namespace BaboonAPI.Patch
22

33
open BaboonAPI.Hooks.Tracks
4+
open BaboonAPI.Internal
45
open BaboonAPI.Internal.BaseGame
5-
open BepInEx.Logging
66
open HarmonyLib
77
open UnityEngine
88

99
[<HarmonyPatch(typeof<SaverLoader>, "loadAllTrackMetadata")>]
1010
type LoaderPatch() =
11-
static let logger = Logger.CreateLogSource "BaboonAPI.BaseTracksLoader"
12-
1311
static member Prefix () =
1412
let path = $"{Application.streamingAssetsPath}/trackassets"
1513
TrackRegistrationEvent.EVENT.Register (BaseGameTrackRegistry path)
1614

1715
false
16+
17+
[<HarmonyPatch(typeof<LanguageChanger>, "loadMetadata")>]
18+
type LanguageChangerPatch() =
19+
static member Prefix () =
20+
TrackAccessor.load()
21+
22+
false

0 commit comments

Comments
 (0)