diff --git a/Base/Assets/UI/Panels/ModalLensPanel.lua b/Base/Assets/UI/Panels/ModalLensPanel.lua index 5c523d9..f69e899 100644 --- a/Base/Assets/UI/Panels/ModalLensPanel.lua +++ b/Base/Assets/UI/Panels/ModalLensPanel.lua @@ -192,7 +192,7 @@ function ShowModLensKey(lensName:string) -- print("Showing " .. lensName .. " modal panel") if g_ModLensModalPanel[lensName] ~= nil then - g_KeyStackIM:ResetInstances(); + ResetKeyStackIM(); local info = g_ModLensModalPanel[lensName].Legend local lensTextKey = g_ModLensModalPanel[lensName].LensTextKey for _, hexColorAndKey in ipairs(info) do @@ -336,6 +336,11 @@ function OnInit(isReload:boolean) LateInitialize(); end +-- =========================================================================== +function AddLensEntry(lensKey:string, lensEntry:table) + g_ModLensModalPanel[lensKey] = lensEntry +end + -- =========================================================================== function LateInitialize() if (Game.GetLocalPlayer() == -1) then @@ -347,6 +352,9 @@ function LateInitialize() Events.InterfaceModeChanged.Add( OnInterfaceModeChanged ); Events.LensLayerOn.Add( OnLensLayerOn ); + -- Mod Lens Support + LuaEvents.ModalLensPanel_AddLensEntry.Add( AddLensEntry ) + LuaEvents.MinimapPanel_AddContinentColorPair.Add(OnAddContinentColorPair); end