Skip to content
This repository was archived by the owner on Dec 11, 2022. It is now read-only.

Commit 41e2ecd

Browse files
committed
Merge branch 'master' into realitymod-dev
2 parents 5489eb0 + f0beedd commit 41e2ecd

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

ext/Shared/__init__.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ local m_Defaults = {
3535
variation = 0,
3636
}
3737

38+
local m_MapGameModePaths = {}
39+
3840
local function PatchOriginalObject(p_Object, p_World)
3941
if p_Object.originalRef == nil then
4042
print("Object without original reference found, dynamic object?", true)
@@ -194,6 +196,11 @@ local function GetCustomLevelFromHttp(p_FileName)
194196
for _, l_Address in ipairs(Config.MIRRORS) do
195197
local s_StartTime = SharedUtils:GetTime()
196198

199+
if m_MapGameModePaths[p_FileName] then
200+
p_FileName = m_MapGameModePaths[p_FileName]
201+
print("Adjusted file name to " .. p_FileName)
202+
end
203+
197204
local s_Path = l_Address .. p_FileName .. ".json"
198205
local s_HttpResponse = Net:GetHTTP(s_Path, s_HttpOptions)
199206

@@ -391,3 +398,8 @@ ResourceManager:RegisterInstanceLoadHandler(Guid('C4DCACFF-ED8F-BC87-F647-0BC8AC
391398
p_Instance.timeoutTime = Config.CLIENT_TIMEOUT
392399
print("Changed ServerSettings")
393400
end)
401+
402+
---@param p_MapGameModePaths table
403+
Events:Subscribe("CLL:MapGameModePaths", function(p_MapGameModePaths)
404+
m_MapGameModePaths = p_MapGameModePaths
405+
end)

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"Authors": ["RM Dev Team"],
44
"Description": "Load custom levels created using MapEditor",
55
"URL": "https://github.com/BF3RM/CustomLevelLoader",
6-
"Version": "0.1.18",
6+
"Version": "0.1.19",
77
"HasWebUI": false,
88
"HasVeniceEXT": true,
99
"Dependencies": {

0 commit comments

Comments
 (0)