diff --git a/UI/MinimapPanel.lua b/UI/MinimapPanel.lua index 71bd0a8..e91f164 100644 --- a/UI/MinimapPanel.lua +++ b/UI/MinimapPanel.lua @@ -14,25 +14,25 @@ local MINIMAP_BACKING_PADDING_SIZEY:number = 60; -- Used to control ModalLensPanel.lua local MODDED_LENS_ID:table = { - NONE = 0, - APPEAL = 1, - BUILDER = 2, - ARCHAEOLOGIST = 3, - BARBARIAN = 4, - CITY_OVERLAP = 5, - RESOURCE = 6, - WONDER = 7, - ADJACENCY_YIELD = 8, - SCOUT = 9, - NATURALIST = 10, - CUSTOM = 11 + NONE = 0; + APPEAL = 1; + BUILDER = 2; + ARCHAEOLOGIST = 3; + BARBARIAN = 4; + CITY_OVERLAP = 5; + RESOURCE = 6; + WONDER = 7; + ADJACENCY_YIELD = 8; + SCOUT = 9; + NATURALIST = 10; + CUSTOM = 11; }; -- Different from above, since it uses a government lens, instead of appeal local AREA_LENS_ID:table = { - NONE = 0, - GOVERNMENT = 1, - CITIZEN_MANAGEMENT = 2, + NONE = 0; + GOVERNMENT = 1; + CITIZEN_MANAGEMENT = 2; } -- Should the builder lens auto apply, when a builder is selected. @@ -88,7 +88,6 @@ local m_TogglePoliticalLensId = Input.GetActionId("LensPolitical"); local m_ToggleTourismLensId = Input.GetActionId("LensTourism"); local m_Toggle2DViewId = Input.GetActionId("Toggle2DView"); - local m_isMouseDragEnabled :boolean = true; -- Can the camera be moved by dragging on the minimap? local m_isMouseDragging :boolean = false; -- Was LMB clicked inside the minimap, and has not been released yet? local m_hasMouseDragged :boolean = false; -- Has there been any movements since m_isMouseDragging became true? @@ -309,7 +308,6 @@ function ToggleAppealLens() end UILens.SetActive("Appeal"); - RefreshInterfaceMode(); else m_shouldCloseLensMenu = false; @@ -395,7 +393,6 @@ function ToggleBuilderLens() end UILens.SetActive("Appeal"); - RefreshInterfaceMode(); else m_shouldCloseLensMenu = false; @@ -418,7 +415,6 @@ function ToggleArchaeologistLens() end UILens.SetActive("Appeal"); - RefreshInterfaceMode(); else m_shouldCloseLensMenu = false; @@ -466,7 +462,6 @@ function ToggleBarbarianLens() end UILens.SetActive("Appeal"); - RefreshInterfaceMode(); else m_shouldCloseLensMenu = false; @@ -516,7 +511,6 @@ function ToggleWonderLens() end UILens.SetActive("Appeal"); - RefreshInterfaceMode(); else m_shouldCloseLensMenu = false; @@ -539,7 +533,6 @@ function ToggleAdjacencyYieldLens() end UILens.SetActive("Appeal"); - RefreshInterfaceMode(); else m_shouldCloseLensMenu = false; @@ -562,7 +555,6 @@ function ToggleScoutLens() end UILens.SetActive("Appeal"); - RefreshInterfaceMode(); else m_shouldCloseLensMenu = false; @@ -631,6 +623,7 @@ function OnCollapseToggle() if ( m_isCollapsed ) then UI.PlaySound("Minimap_Open"); Controls.ExpandButton:SetHide( true ); + Controls.CollapseButton:SetHide( false ); Controls.ExpandAnim:SetEndVal(0, -Controls.MinimapContainer:GetOffsetY() - Controls.MinimapContainer:GetSizeY()); Controls.ExpandAnim:SetToBeginning(); Controls.ExpandAnim:Play(); @@ -638,6 +631,7 @@ function OnCollapseToggle() else UI.PlaySound("Minimap_Closed"); Controls.ExpandButton:SetHide( false ); + Controls.CollapseButton:SetHide( true ); Controls.Pause:Play(); Controls.CollapseAnim:SetEndVal(0, Controls.MinimapContainer:GetOffsetY() + Controls.MinimapContainer:GetSizeY()); Controls.CollapseAnim:SetToBeginning(); @@ -2314,7 +2308,6 @@ function IsAdjYieldWonder(featureInfo) end end end - return false end @@ -2325,7 +2318,6 @@ function plotNextToBuffingWonder(plot) return true end end - return false end @@ -2365,9 +2357,7 @@ function plotHasRecomFeature(plot) return true end end - end - return false end @@ -2376,7 +2366,6 @@ function plotHasAnitquitySite(plot) if resourceInfo ~= nil and resourceInfo.ResourceType == "RESOURCE_ANTIQUITY_SITE" then return true; end - return false end @@ -2412,6 +2401,7 @@ function plotCanHaveFarm(plot) return true; end end + return false end function plotHasGoodyHut(plot) diff --git a/UI/Panels/ModalLensPanel.lua b/UI/Panels/ModalLensPanel.lua index c543359..fabf89f 100644 --- a/UI/Panels/ModalLensPanel.lua +++ b/UI/Panels/ModalLensPanel.lua @@ -5,25 +5,25 @@ include( "InstanceManager" ); -- Similiar to MinimapPanel.lua to control modded lenses -- Used to control ModalLensPanel.lua local MODDED_LENS_ID:table = { - NONE = 0, - APPEAL = 1, - BUILDER = 2, - ARCHAEOLOGIST = 3, - BARBARIAN = 4, - CITY_OVERLAP = 5, - RESOURCE = 6, - WONDER = 7, - ADJACENCY_YIELD = 8, - SCOUT = 9, - NATURALIST = 10, - CUSTOM = 11 + NONE = 0; + APPEAL = 1; + BUILDER = 2; + ARCHAEOLOGIST = 3; + BARBARIAN = 4; + CITY_OVERLAP = 5; + RESOURCE = 6; + WONDER = 7; + ADJACENCY_YIELD = 8; + SCOUT = 9; + NATURALIST = 10; + CUSTOM = 11; }; -- Different from above, since it uses a government lens, instead of appeal local AREA_LENS_ID:table = { - NONE = 0, - GOVERNMENT = 1, - CITIZEN_MANAGEMENT = 2, + NONE = 0; + GOVERNMENT = 1; + CITIZEN_MANAGEMENT = 2; } local m_KeyStackIM:table = InstanceManager:new( "KeyEntry", "KeyColorImage", Controls.KeyStack ); @@ -455,15 +455,16 @@ function OnLensLayerOn( layerNum:number ) elseif m_CurrentModdedLensOn == MODDED_LENS_ID.NATURALIST then Controls.LensText:SetText(Locale.ToUpper(Locale.Lookup("LOC_HUD_NATURALIST_LENS"))); ShowNaturalistLensKey(); - -- elseif m_CurrentModdedLensOn == MODDED_LENS_ID.CUSTOM then - -- print("Hiding") - -- ContextPtr:SetHide(true); -- Hide the Modal Panel if custom + elseif m_CurrentModdedLensOn == MODDED_LENS_ID.CUSTOM then + print("Hiding") + ContextPtr:SetHide(true); -- Hide the Modal Panel if custom end elseif layerNum == LensLayers.HEX_COLORING_GOVERNMENT then if m_CurrentAreaLensOn == AREA_LENS_ID.GOVERNMENT then Controls.LensText:SetText(Locale.ToUpper(Locale.Lookup("LOC_HUD_GOVERNMENT_LENS"))); ShowGovernmentLensKey(); - -- else -- Add extra area lenses here + -- else + -- Add extra area lenses here end elseif layerNum == LensLayers.HEX_COLORING_OWING_CIV then Controls.LensText:SetText(Locale.ToUpper(Locale.Lookup("LOC_HUD_OWNER_LENS")));