From b0fcd0cf83216f1290626486cc559f101c9c4948 Mon Sep 17 00:00:00 2001 From: trippyone <137233897+trippyone@users.noreply.github.com> Date: Sat, 18 Nov 2023 03:24:50 -0500 Subject: [PATCH] support bundles with variable backendUrl --- Source/EssentialPatches/Bundles/BundleManager.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/EssentialPatches/Bundles/BundleManager.cs b/Source/EssentialPatches/Bundles/BundleManager.cs index 6b4b32f9..dee3a341 100644 --- a/Source/EssentialPatches/Bundles/BundleManager.cs +++ b/Source/EssentialPatches/Bundles/BundleManager.cs @@ -66,6 +66,13 @@ public static void GetBundles() var path = jObj["path"].ToString(); var dependencyKeys = jObj["dependencyKeys"].ToObject(); + + // if server bundle, patch the bundle path to use the backend URL + if (path.Substring(0, 14) == "/files/bundle/") + { + path = StayInTarkovHelperConstants.GetBackendUrl() + path; + } + var bundle = new BundleInfo(key, path, dependencyKeys); StayInTarkovHelperConstants.Logger.LogInfo($"Adding Custom Bundle : {path}");