This repository was archived by the owner on Dec 11, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ local m_Defaults = {
3535 variation = 0 ,
3636}
3737
38+ local m_MapGameModePaths = {}
39+
3840local 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" )
393400end )
401+
402+ --- @param p_MapGameModePaths table
403+ Events :Subscribe (" CLL:MapGameModePaths" , function (p_MapGameModePaths )
404+ m_MapGameModePaths = p_MapGameModePaths
405+ end )
Original file line number Diff line number Diff line change 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" : {
You can’t perform that action at this time.
0 commit comments