Skip to content

Commit

Permalink
Merge pull request #153 from Azurency/beta
Browse files Browse the repository at this point in the history
Pre-Fall 2017 merge
  • Loading branch information
Azurency authored Oct 22, 2017
2 parents 6ee2e79 + a3e0c4c commit 7034ffc
Show file tree
Hide file tree
Showing 35 changed files with 1,576 additions and 445 deletions.
14 changes: 14 additions & 0 deletions Assets/Text/cqui_text_general.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,19 @@
<Text>Your encampment is able to make a ranged strike</Text>
</Row>

<!-- Policyreminderpopup -->
<Row Tag="LOC_POLICY_REMINDER_TITLE" Language="en_US">
<Text>POLICY REMINDER</Text>
</Row>
<Row Tag="LOC_POLICY_REMINDER_TEXT" Language="en_US">
<Text>New policy cards have been unlocked.</Text>
</Row>
<Row Tag="LOC_POLICY_REMINDER_ACTION_BUTTON" Language="en_US">
<Text>POLICY CHANGE</Text>
</Row>
<Row Tag="LOC_POLICY_REMINDER_ACTION_BUTTON_TOOLTIP" Language="en_US">
<Text>You can change your policy this turn.</Text>
</Row>

</LocalizedText>
</GameData>
23 changes: 21 additions & 2 deletions Assets/Text/cqui_text_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,12 @@
<Row Tag="LOC_CQUI_UNITS_AUTOEXPANDUNITACTIONS" Language="en_US">
<Text>Autoexpand all actions in the unit panel</Text>
</Row>

<Row Tag="LOC_CQUI_GENERAL_SHOWPRD" Language="en_US">
<Text>Show Policy Pop-Up Reminder</Text>
</Row>
<Row Tag="LOC_CQUI_GENERAL_SHOWPRD_TOOLTIP" Language="en_US">
<Text>Enable a Popup to remind you to change your policy cards before end turn</Text>
</Row>
<Row Tag="LOC_CQUI_TRADER_SCREEN" Language="en_US">
<Text>Trader Screen</Text>
</Row>
Expand All @@ -220,6 +225,20 @@
<Row Tag="LOC_CQUI_TRADER_ADD_DIVIDER_TOOLTIP" Language="en_US">
<Text>Adds a divider between groups in Trade Overview panel</Text>
</Row>

<Row Tag="LOC_CQUI_RECOMMENDATIONS_SCREEN" Language="en_US">
<Text>Recommendations</Text>
</Row>
<Row Tag="LOC_CQUI_RECOMMENDATIONS_SHOWPRODUCTION" Language="en_US">
<Text>Show production recommendations</Text>
</Row>
<Row Tag="LOC_CQUI_RECOMMENDATIONS_SHOWTECH" Language="en_US">
<Text>Show tech/civic recommendations</Text>
</Row>
<Row Tag="LOC_CQUI_RECOMMENDATIONS_SHOWIMPROVEMENTS" Language="en_US">
<Text>Show improvements recommendations</Text>
</Row>
<Row Tag="LOC_CQUI_RECOMMENDATIONS_SHOWCITYDETAILADVISOR" Language="en_US">
<Text>Show city detail advisor</Text>
</Row>
</LocalizedText>
</GameData>
6 changes: 5 additions & 1 deletion Assets/UI/Choosers/civicschooser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ local m_needsRefresh :boolean = false; --used to track whether a given series of

--CQUI Members
local CQUI_AlwaysOpenTechTrees = false; --Ignores events calling for this to open when true
local CQUI_ShowTechCivicRecommendations = false;

-- ===========================================================================
-- METHODS
Expand Down Expand Up @@ -190,7 +191,8 @@ function AddAvailableCivic( playerID:number, kData:table )
end

-- Hide/Show Recommendation Icon
if kData.IsRecommended and kData.AdvisorType ~= nil then
-- CQUI : only if show tech civ enabled in settings
if kData.IsRecommended and kData.AdvisorType ~= nil and CQUI_ShowTechCivicRecommendations then
kItemInstance.RecommendedIcon:SetIcon(kData.AdvisorType);
kItemInstance.RecommendedIcon:SetHide(false);
else
Expand Down Expand Up @@ -242,6 +244,7 @@ function OnOpenPanel()
if(CQUI_AlwaysOpenTechTrees) then
LuaEvents.CivicsChooser_RaiseCivicsTree()
else
Refresh();
LuaEvents.ResearchChooser_ForceHideWorldTracker();
UI.PlaySound("Tech_Tray_Slide_Open");
m_isExpanded = true;
Expand Down Expand Up @@ -394,6 +397,7 @@ end

function CQUI_OnSettingsUpdate()
CQUI_AlwaysOpenTechTrees = GameConfiguration.GetValue("CQUI_AlwaysOpenTechTrees");
CQUI_ShowTechCivicRecommendations = GameConfiguration.GetValue("CQUI_ShowTechCivicRecommendations") == 1
end

-- ===========================================================================
Expand Down
6 changes: 5 additions & 1 deletion Assets/UI/Choosers/researchchooser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ local m_needsRefresh :boolean = false; --used to track whether a given series of

--CQUI Members
local CQUI_AlwaysOpenTechTrees = false; --Ignores events calling for this to open when true
local CQUI_ShowTechCivicRecommendations = false;

-- ===========================================================================
-- METHODS
Expand Down Expand Up @@ -227,7 +228,8 @@ function AddAvailableResearch( playerID:number, kData:table )
kItemInstance.Top:SetDisabled( isDisabled );

-- Hide/Show Recommendation Icon
if kData.IsRecommended and kData.AdvisorType then
-- CQUI : only if show tech civ enabled in settings
if kData.IsRecommended and kData.AdvisorType and CQUI_ShowTechCivicRecommendations then
kItemInstance.RecommendedIcon:SetIcon(kData.AdvisorType);
kItemInstance.RecommendedIcon:SetHide(false);
else
Expand Down Expand Up @@ -276,6 +278,7 @@ function OnOpenPanel()
if(CQUI_AlwaysOpenTechTrees) then
LuaEvents.ResearchChooser_RaiseTechTree();
else
Refresh();
LuaEvents.ResearchChooser_ForceHideWorldTracker();
UI.PlaySound("Tech_Tray_Slide_Open");
m_isExpanded = true;
Expand Down Expand Up @@ -433,6 +436,7 @@ end

function CQUI_OnSettingsUpdate()
CQUI_AlwaysOpenTechTrees = GameConfiguration.GetValue("CQUI_AlwaysOpenTechTrees");
CQUI_ShowTechCivicRecommendations = GameConfiguration.GetValue("CQUI_ShowTechCivicRecommendations") == 1
end

-- ===========================================================================
Expand Down
11 changes: 6 additions & 5 deletions Assets/UI/Civilopedia/civilopediasupport.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
-- Includes the main logic to populate the civilopedia.
-- ===========================================================================
include( "InstanceManager" );
include("civ6common");


local LOC_TREE_SEARCH_W_DOTS = Locale.Lookup("LOC_TREE_SEARCH_W_DOTS");
Expand Down Expand Up @@ -821,7 +822,7 @@ end

-------------------------------------------------------------------------------
function NavigateTo(SectionId, PageId)
print("Navigating to " .. SectionId .. ":" .. PageId);
print_debug("Navigating to " .. SectionId .. ":" .. PageId);

local prevSectionId = _CurrentSectionId;
local prevPageId = _CurrentPageId;
Expand Down Expand Up @@ -866,14 +867,14 @@ end
-------------------------------------------------------------------------------
function OnOpenCivilopedia(sectionId_or_search, pageId)

print("Received a request to open the Civilopedia");
print_debug("Received a request to open the Civilopedia");
if(pageId == nil and sectionId_or_search) then
print("Searching for " .. sectionId_or_search);
print_debug("Searching for " .. sectionId_or_search);
local results = CivilopediaSearch(sectionId_or_search);
if(results and #results > 0) then
print("Found " .. #results .. " results");
print_debug("Found " .. #results .. " results");
for i,v in ipairs(results) do
print(v.SectionId .. " - " .. v.PageId);
print_debug(v.SectionId .. " - " .. v.PageId);
end
NavigateTo(results[1].SectionId, results[1].PageId);
else
Expand Down
14 changes: 12 additions & 2 deletions Assets/UI/Panels/citypaneloverview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,15 @@ local ms_eventID = 0;
local m_tabs;
local m_isShowingPanel :boolean = false;

--CQUI Members
local CQUI_HousingFromImprovementsTable :table = {};
local CQUI_ShowCityDetailAdvisor :boolean = false;

function CQUI_OnSettingsUpdate()
CQUI_ShowCityDetailAdvisor = GameConfiguration.GetValue("CQUI_ShowCityDetailAdvisor") == 1
end
LuaEvents.CQUI_SettingsUpdate.Add(CQUI_OnSettingsUpdate);
LuaEvents.CQUI_SettingsInitialized.Add(CQUI_OnSettingsUpdate);

-- ====================CQUI Cityview==========================================

Expand Down Expand Up @@ -444,7 +452,8 @@ end

function ViewPanelAmenities( data:table )
-- Only show the advisor bubbles during the tutorial
Controls.AmenitiesAdvisorBubble:SetHide( IsTutorialRunning() == false );
-- AZURENCY : or show the advisor if the setting is enabled
Controls.AmenitiesAdvisorBubble:SetHide( IsTutorialRunning() == false and CQUI_ShowCityDetailAdvisor == false );

local colorName:string = GetHappinessColor(data.Happiness);
Controls.AmenitiesConstructedLabel:SetText( Locale.Lookup( "LOC_HUD_CITY_AMENITY", data.AmenitiesNum) );
Expand Down Expand Up @@ -510,7 +519,8 @@ function ViewPanelHousing( data:table )
local CQUI_HousingFromImprovements = CQUI_HousingFromImprovementsTable[selectedCityID];

-- Only show the advisor bubbles during the tutorial
Controls.HousingAdvisorBubble:SetHide( IsTutorialRunning() == false );
-- AZURENCY : or show the advisor if the setting is enabled
Controls.HousingAdvisorBubble:SetHide( IsTutorialRunning() == false and CQUI_ShowCityDetailAdvisor == false );

m_kHousingIM:ResetInstances();

Expand Down
Loading

0 comments on commit 7034ffc

Please sign in to comment.