Skip to content

Commit

Permalink
Antarctic Late Summer update (1.0.0.314)
Browse files Browse the repository at this point in the history
  • Loading branch information
Azurency committed Apr 3, 2019
1 parent 6a4521c commit 14e657f
Show file tree
Hide file tree
Showing 129 changed files with 6,454 additions and 1,583 deletions.
2 changes: 1 addition & 1 deletion Accessibility/PlayerTritanopiaColors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</Replace>
<Replace>
<Type>COLOR_STANDARD_GREEN_LT</Type>
<Color>152,255,112,255</Color>
<Color>190,239,255,255</Color>
</Replace>
<Replace>
<Type>COLOR_STANDARD_GREEN_MD</Type>
Expand Down
20 changes: 10 additions & 10 deletions ActionPanel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ local FLASHING_PRODUCTION :number = 3;
local FLASHING_FREE_TECH :number = 4;
local FLASHING_NEEDS_ORDERS :number = 5;

local TURN_TIMER_BAR_ACTIVE_COLOR :number = 0xffffffff;
local TURN_TIMER_BAR_INACTIVE_COLOR :number = 0xff0000ff;
local TURN_TIMER_BAR_ACTIVE_COLOR = UI.GetColorValue("COLOR_WHITE");
local TURN_TIMER_BAR_INACTIVE_COLOR = UI.GetColorValue(1,0,0,1);

local MAX_BLOCKER_BUTTONS :number = 4; -- Number of buttons around big action button
local autoEndTurnOptionHash :number = DB.MakeHash("AutoEndTurn");
Expand Down Expand Up @@ -119,10 +119,9 @@ g_kEras = {};
-- MEMBERS
-- ===========================================================================
local m_overflowIM : table = InstanceManager:new( "TurnBlockerInstance", "TurnBlockerButton", Controls.OverflowStack );
local m_shiftsHeld : number = 0;
local m_activeBlockerId : number = EndTurnBlockingTypes.NO_ENDTURN_BLOCKING; -- Blocking notification receiving attention
local m_kSoundsPlayed : table = {}; -- Track which notifications have had their associate sound played
local m_EndTurnId = Input.GetActionId("EndTurn"); -- Hotkey
local m_EndTurnId : number = Input.GetActionId("EndTurn"); -- Hotkey
local m_lastTurnTickTime : number = 0; -- When did we last make a tick sound for the turn timer?
local m_numberVisibleBlockers :number = 0;
local m_visibleBlockerTypes : table = {};
Expand Down Expand Up @@ -501,7 +500,7 @@ function CheckAutoEndTurn( eCurrentEndTurnBlockingType:number )
-- Expansion content is ok with auto ending the turn.
and AllowAutoEndTurn_Expansion() then
if not UI.CanEndTurn() then
error("CheckAutoEndTurn thinks that we can't end turn, but the notification system disagrees");
UI.DataError("CheckAutoEndTurn thinks that we can't end turn, but the notification system disagrees!");
end
UI.RequestAction(ActionTypes.ACTION_ENDTURN);
end
Expand Down Expand Up @@ -559,7 +558,7 @@ function DoEndTurn( optionalNewBlocker:number )
UI.SelectCity(attackCity);
UI.SetInterfaceMode(InterfaceModeTypes.CITY_RANGE_ATTACK);
else
error( "Unable to find selectable attack city while in CheckCityRangeAttackState()" );
UI.DataError( "Unable to find selectable attack city while in CheckCityRangeAttackState()" );
end
else
UI.RequestAction(ActionTypes.ACTION_ENDTURN);
Expand All @@ -580,7 +579,7 @@ function DoEndTurn( optionalNewBlocker:number )
if pNotification == nil then
-- Notification is missing. Use fallback behavior.
if not UI.CanEndTurn() then
print("ERROR: ActionPanel UI thinks that we can't end turn, but the notification system disagrees");
UI.DataError("The UI thinks that we can't end turn, but the notification system disagrees.");
return;
end
UI.RequestAction(ActionTypes.ACTION_ENDTURN);
Expand Down Expand Up @@ -1000,7 +999,7 @@ function OnNotificationAdded( playerID:number, notificationID:number )
local pNotification:table = NotificationManager.Find( playerID, notificationID );
if pNotification == nil then
-- It is possible, that by the time we get this event, the notification was 'expired' by some other action in the game.
-- error( "Unable to find player ("..tostring(playerID).." notification ("..tostring(notificationID)..")" );
-- UI.DataError( "Unable to find player ("..tostring(playerID).." notification ("..tostring(notificationID)..")" );
end
end
end
Expand Down Expand Up @@ -1080,7 +1079,8 @@ function OnInputHandler( pInputStruct:table )
if uiMsg == KeyEvents.KeyUp then
if pInputStruct:GetKey() == Keys.VK_RETURN then
if pInputStruct:IsShiftDown() and not IsTutorialRunning() then
UI.RequestAction(ActionTypes.ACTION_ENDTURN); -- Shift + Enter = Force End Turn
-- Forcing a turn via SHIFT + ENTER. Unsupported.
UI.RequestAction(ActionTypes.ACTION_ENDTURN, { REASON = "UserForced" } );
else
DoEndTurn(); -- Enter = Normal End Turn
end
Expand Down Expand Up @@ -1305,7 +1305,7 @@ end
function OnInputActionTriggered( actionId )
if m_EndTurnId ~= nil and actionId == m_EndTurnId then
UI.PlaySound("Play_UI_Click");
OnEndTurnClicked();
DoEndTurn();
end
end

Expand Down
10 changes: 5 additions & 5 deletions Choosers/EspionageChooser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ function AddCounterspyOperation(operation:table, districtPlotID:number)
end

-- Default the selector brace to hidden
missionInstance.SelectorBrace:SetColor(0x00FFFFFF);
missionInstance.SelectorBrace:SetColor(UI.GetColorValueFromHexLiteral(0x00FFFFFF));
end

-- ===========================================================================
Expand All @@ -281,7 +281,7 @@ function AddOffensiveOperation(operation:table, result:table, targetCityPlot:tab
missionInstance.MissionStatsStack:CalculateSize();

-- Default the selector brace to hidden
missionInstance.SelectorBrace:SetColor(0x00FFFFFF);
missionInstance.SelectorBrace:SetColor(UI.GetColorValueFromHexLiteral(0x00FFFFFF));

return missionInstance;
end
Expand Down Expand Up @@ -358,12 +358,12 @@ function OnMissionSelected(operation:table, instance:table)
for i=1, m_MissionStackIM.m_iCount, 1 do
local otherInstances:table = m_MissionStackIM:GetAllocatedInstance(i);
if otherInstances then
otherInstances.SelectorBrace:SetColor(0x00000000);
otherInstances.SelectorBrace:SetColor(UI.GetColorValue("COLOR_CLEAR"));
end
end

-- Show selected border over instance
instance.SelectorBrace:SetColor(0xFFFFFFFF);
instance.SelectorBrace:SetColor(UI.GetColorValue("COLOR_WHITE"));
end

-- ===========================================================================
Expand Down Expand Up @@ -762,7 +762,7 @@ function OnMissionBriefingClosed()
for i=1,m_MissionStackIM.m_iCount,1 do
local instance:table = m_MissionStackIM:GetAllocatedInstance(i);
if instance then
instance.SelectorBrace:SetColor(0x00FFFFFF);
instance.SelectorBrace:SetColor(UI.GetColorValue("COLOR_CLEAR"));
end
end
end
Expand Down
8 changes: 4 additions & 4 deletions Choosers/TradeRouteChooser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,8 @@ function RefreshChooserPanel()
-- Send Trade Route Paths to Engine
UILens.ClearLayerHexes( m_TradeRoute );

local DEFAULT_TINT = RGBAValuesToABGRHex(1, 1, 1, 1);
local FADED_TINT = RGBAValuesToABGRHex(0.3, 0.3, 0.3, 1);
local DEFAULT_TINT = UI.GetColorValue(1, 1, 1, 1);
local FADED_TINT = UI.GetColorValue(0.3, 0.3, 0.3, 1);

-- If a city is selected, fade the other routes
local kUnselectedColor = DEFAULT_TINT;
Expand Down Expand Up @@ -626,10 +626,10 @@ function AddCityToDestinationStack(city:table)

-- Update Selector Brace
if destinationCity ~= nil and city:GetName() == destinationCity:GetName() then
cityEntry.SelectorBrace:SetColor(1,1,1,1);
cityEntry.SelectorBrace:SetColor(UI.GetColorValue(1,1,1,1));
cityEntry.Button:SetSelected(true);
else
cityEntry.SelectorBrace:SetColor(1,1,1,0);
cityEntry.SelectorBrace:SetColor(UI.GetColorValue(1,1,1,0));
cityEntry.Button:SetSelected(false);
end

Expand Down
28 changes: 14 additions & 14 deletions Choosers/TradeRouteChooser.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
</Grid>

<!-- Destination Resource Information -->
<Box ID="DestinationResourcesLeftColumn" Size="53,35" Offset="77,62" Color="0,0,0,22"/>
<Box ID="DestinationResourcesRightColumn" Size="53,35" Offset="183,62" Color="0,0,0,22"/>
<Box ID="DestinationResourcesLeftColumn" Size="60,35" Offset="84,62" Color="0,0,0,22"/>
<Box ID="DestinationResourcesRightColumn" Size="60,35" Offset="204,62" Color="0,0,0,22"/>
<Grid ID="DestinationResources" Size="279,auto" MinSize="0,35" Anchor="C,T" Offset="0,62" Texture="Controls_ItemContainerDestination" SliceCorner="6,2" SliceSize="2,31" SliceTextureSize="24,35" >
<Label ID="DestinationResourceHeader" Size="300,20" Anchor="L,T" Offset="2,-15" Style="FontNormal14" Color="0,0,0,150" TruncateWidth="279" TruncatedTooltip="1"/>
<Stack ID="DestinationResourceList" Anchor="L,C" Offset="4,-1" StackGrowth="Right" WrapWidth="280" WrapGrowth="Bottom"/>
<Label ID="DestinationReceivesNoBenefitsLabel" Anchor="C,C" Offset="-4,0" Style="FontNormal16" FontStyle="Shadow" EffectColor="Black" String="LOC_ROUTECHOOSER_NO_BENEFITS_FROM_ROUTE" Hidden="1"/>
</Grid>

<!-- Origin Resource Information -->
<Box ID="OriginResourcesLeftColumn" Size="53,35" Offset="77,122" Color="0,0,0,22"/>
<Box ID="OriginResourcesRightColumn" Size="53,35" Offset="183,122" Color="0,0,0,22"/>
<Box ID="OriginResourcesLeftColumn" Size="60,35" Offset="84,122" Color="0,0,0,22"/>
<Box ID="OriginResourcesRightColumn" Size="60,35" Offset="204,122" Color="0,0,0,22"/>
<Grid ID="OriginResources" Size="279,auto" MinSize="0,35" Anchor="C,T" Offset="0,122" Texture="Controls_ItemContainerOrigin" SliceCorner="14,2" SliceSize="3,31" SliceTextureSize="24,35">
<Label ID="OriginResourceHeader" Size="250,20" Anchor="L,T" Offset="10,-15" Style="FontNormal14" Color="0,0,0,150" TruncateWidth="279" TruncatedTooltip="1"/>
<Stack ID="OriginResourceList" Anchor="L,C" Offset="10,0" StackGrowth="Right" WrapWidth="280" WrapGrowth="Bottom"/>
Expand Down Expand Up @@ -173,8 +173,8 @@
</Grid>

<!-- Resource Info -->
<Box ID="ResourceInfoLeftColumn" Size="53,32" Offset="64,38" Color="0,0,0,22"/>
<Box ID="ResourceInfoRightColumn" Size="53,32" Offset="168,38" Color="0,0,0,22"/>
<Box ID="ResourceInfoLeftColumn" Size="60,32" Offset="70,38" Color="0,0,0,22"/>
<Box ID="ResourceInfoRightColumn" Size="60,32" Offset="190,38" Color="0,0,0,22"/>
<Grid ID="ResourceInfoGrid" Size="274,auto" MinSize="0,32" Anchor="C,T" Offset="-1,38" Texture="Controls_ItemContainer" SliceCorner="8,8" SliceTextureSize="16,16" >
<Stack ID="ResourceList" Anchor="L,C" Offset="5,1" StackGrowth="Right" WrapWidth="280" WrapGrowth="Bottom"/>
</Grid>
Expand All @@ -184,20 +184,20 @@
</Instance>

<Instance Name="ResourceEntryInstance">
<Container ID="Top" Size="52,28">
<Stack ID="ResourceEntryStack" Anchor="C,C" Offset="-2,0" StackGrowth="Right" >
<Label ID="ResourceEntryIcon" Anchor="C,C" Style="FontNormal12"/>
<Label ID="ResourceEntryText" Size="50,10" KerningAdjustment="1" Style="FontNormal14"/>
<Container ID="Top" Size="60,28">
<Stack ID="ResourceEntryStack" Anchor="L,C" Offset="-2,0" StackGrowth="Right" >
<Label ID="ResourceEntryIcon" Anchor="L,C" Style="FontNormal12"/>
<Label ID="ResourceEntryText" Anchor="L,C" Style="FontNormal14"/>
</Stack>
</Container>
</Instance>
<Instance Name="ReligionPressureEntryInstance">
<Container ID="Top" Size="56,28">
<Stack ID="ResourceEntryStack" Anchor="C,C" Offset="-2,0" StackGrowth="Right" >
<Image ID="ReligionIconBacking" Anchor="C,C" Texture="Religion_FollowersSlot" Size="30,30">
<Container ID="Top" Size="60,28">
<Stack ID="ResourceEntryStack" Anchor="L,C" Offset="-2,0" StackGrowth="Right" >
<Image ID="ReligionIconBacking" Anchor="L,C" Texture="Religion_FollowersSlot" Size="30,30">
<Image ID="ReligionIcon" Anchor="C,C" Size="22,22" IconSize="22"/>
</Image>
<Label ID="ResourceEntryText" Size="50,10" Offset="0,8" Style="FontNormal14"/>
<Label ID="ResourceEntryText" Anchor="L,C" Style="FontNormal14"/>
</Stack>
</Container>
</Instance>
Expand Down
20 changes: 18 additions & 2 deletions Civ6Common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,8 @@ function DifferentiateCiv(playerID:number, tooltipControl:table, icon:table, ico
m_primaryColor, m_secondaryColor = UI.GetPlayerColors( playerID );
iconBacking:SetColor(m_primaryColor);
if(iconBackingLighter ~= nil and iconBackingDarker ~= nil) then
local darkerBackColor = DarkenLightenColor(m_primaryColor,(-85),100);
local brighterBackColor = DarkenLightenColor(m_primaryColor,90,255);
local darkerBackColor = UI.DarkenLightenColor(m_primaryColor,(-85),100);
local brighterBackColor = UI.DarkenLightenColor(m_primaryColor,90,255);
iconBackingLighter:SetColor(brighterBackColor);
iconBackingDarker:SetColor(darkerBackColor);
end
Expand Down Expand Up @@ -709,3 +709,19 @@ function ReadCustomData( key:string )
end
return unpack(kReturn);
end

-- ===========================================================================
-- If the official Civ6 Expansion "Rise and Fall" (XP1) is active.
-- ===========================================================================
function IsExpansion1Active()
local isActive:boolean = Modding.IsModActive("1B28771A-C749-434B-9053-D1380C553DE9");
return isActive;
end

-- ===========================================================================
-- If the official Civ6 Expansion "Gathering Storm" (XP2) is active.
-- ===========================================================================
function IsExpansion2Active()
local isActive:boolean = Modding.IsModActive("4873eb62-8ccc-4574-b784-dda455e74e68");
return isActive;
end
7 changes: 6 additions & 1 deletion Civ6_ColorAtlas.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,12 @@
<Color Name="MultiplayerSubContainer" Color="30,50,75,255" />
<Color Name="MultiplayerGameSetupText" Color="28,177,171,255" />

<!-- ClimateScreen -->
<!-- ActionPanel -->
<Color Name="Age_Normal" Color="178,178,178,255" />
<Color Name="Age_Golden" Color="205,205,0,255" />
<Color Name="Age_Warning" Color="205,26,26,255" />

<!-- ClimateScreen -->
<Color Name="ClimateScreen_LightBlue" Color="68,132,191,255"/>

<!-- EspionageOverview -->
Expand Down
11 changes: 1 addition & 10 deletions Civ6_Styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<HeaderSmallCaps Style="FontFlair16" FontStyle="glow" Color0="208,212,217,255" Color1="0,0,0,200" SmallCaps="18" SmallCapsType="EveryWord"/>
<PauseMenuButtonFont Style="FontFlair16" FontStyle="glow" ColorSet="ShellHeader" SmallCaps="18" SmallCapsLeading="0" SmallCapsType="EveryWord"/>
<HeaderLargeCaps Style="FontFlair18" FontStyle="glow" Color0="208,212,217,255" Color1="0,0,0,200" SmallCaps="24" SmallCapsLeading="0" SmallCapsType="EveryWord"/>
<WonderHeader Style="FontFlair24" FontStyle="glow" ColorSet="ShellHeader" />
<WonderHeader Style="FontFlair24" FontStyle="glow" ColorSet="ShellHeader" />
<ShellHeader Style="FontFlair24" FontStyle="glow" ColorSet="ShellHeader" SmallCaps="28" SmallCapsLeading="0" SmallCapsType="EveryWord"/>
<WindowHeader Style="FontFlair22" FontStyle="glow" ColorSet="ShellHeader" SmallCaps="26" SmallCapsLeading="0" SmallCapsType="EveryWord"/>

Expand Down Expand Up @@ -180,15 +180,6 @@

<EditTextButton Texture="Controls_TextEntry" SliceTextureSize="44,26" SliceCorner="30,13" StateOffsetIncrement="0,26"/>

<CivTooltip Size="220,75">
<Grid ID="BG" Size="auto,auto" SliceCorner="10,10" SliceTextureSize="33,32" Texture="Controls_Tooltip" InnerPadding="25,25" InnerOffset="10,10" >
<Image ID="LeaderIcon" Offset="0,0" Size="55,55" Texture="Leaders55"/>
<Image ID="YouIndicator" Offset="0,0" Hidden="1" Size="55,55" Texture="Diplomacy_YouIndicatorSmall"/>
<Label ID="LeaderName" Anchor="L,C" Offset="65,0" Style="FontNormal16" Color="0,0,0,255"/>
</Grid>
</CivTooltip>



<!-- ******************************************************************** -->
<!-- Slider and Scroll Bar Components -->
Expand Down
20 changes: 20 additions & 0 deletions Civilopedia/CivilopediaPage_District.lua
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,26 @@ PageLayouts["District" ] = function(page)
if(airSlots ~= 0) then
table.insert(stats, Locale.Lookup("LOC_TYPE_TRAIT_AIRSLOTS", airSlots));
end

local pillageAwards = district.PlunderType or NO_PLUNDER;
if(pillageAwards ~= nil and pillageAwards ~= "NO_PLUNDER") then
if(pillageAwards == "PLUNDER_CULTURE") then
local culture = GameInfo.Yields["YIELD_CULTURE"];
table.insert(stats, Locale.Lookup("LOC_TYPE_TRAIT_PILLAGE_AWARD", culture.IconString, culture.Name));
elseif (pillageAwards == "PLUNDER_SCIENCE") then
local science = GameInfo.Yields["YIELD_SCIENCE"];
table.insert(stats, Locale.Lookup("LOC_TYPE_TRAIT_PILLAGE_AWARD", science.IconString, science.Name));
elseif (pillageAwards == "PLUNDER_FAITH") then
local faith = GameInfo.Yields["YIELD_FAITH"];
table.insert(stats, Locale.Lookup("LOC_TYPE_TRAIT_PILLAGE_AWARD", faith.IconString, faith.Name));
elseif (pillageAwards == "PLUNDER_GOLD") then
local gold = GameInfo.Yields["YIELD_GOLD"];
table.insert(stats, Locale.Lookup("LOC_TYPE_TRAIT_PILLAGE_AWARD", gold.IconString, gold.Name));
elseif (pillageAwards == "PLUNDER_HEAL") then
local faith = GameInfo.Yields["YIELD_FAITH"];
table.insert(stats, Locale.Lookup("LOC_TYPE_TRAIT_PILLAGE_AWARD_NO_ICON", "LOC_TYPE_TRAIT_PILLAGE_AWARD_HEALING"));
end
end

local maintenance = district.Maintenance;

Expand Down
20 changes: 20 additions & 0 deletions Civilopedia/CivilopediaPage_Improvement.lua
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,26 @@ local sectionId = page.SectionId;
end
end
end

local pillageAwards = improvement.PlunderType or NO_PLUNDER;
if(pillageAwards ~= nil and pillageAwards ~= "NO_PLUNDER") then
if(pillageAwards == "PLUNDER_CULTURE") then
local culture = GameInfo.Yields["YIELD_CULTURE"];
table.insert(stats, Locale.Lookup("LOC_TYPE_TRAIT_PILLAGE_AWARD", culture.IconString, culture.Name));
elseif (pillageAwards == "PLUNDER_SCIENCE") then
local science = GameInfo.Yields["YIELD_SCIENCE"];
table.insert(stats, Locale.Lookup("LOC_TYPE_TRAIT_PILLAGE_AWARD", science.IconString, science.Name));
elseif (pillageAwards == "PLUNDER_FAITH") then
local faith = GameInfo.Yields["YIELD_FAITH"];
table.insert(stats, Locale.Lookup("LOC_TYPE_TRAIT_PILLAGE_AWARD", faith.IconString, faith.Name));
elseif (pillageAwards == "PLUNDER_GOLD") then
local gold = GameInfo.Yields["YIELD_GOLD"];
table.insert(stats, Locale.Lookup("LOC_TYPE_TRAIT_PILLAGE_AWARD", gold.IconString, gold.Name));
elseif (pillageAwards == "PLUNDER_HEAL") then
local faith = GameInfo.Yields["YIELD_FAITH"];
table.insert(stats, Locale.Lookup("LOC_TYPE_TRAIT_PILLAGE_AWARD_NO_ICON", "LOC_TYPE_TRAIT_PILLAGE_AWARD_HEALING"));
end
end

-- placement requirements
local placement_requirements = {};
Expand Down
2 changes: 1 addition & 1 deletion Civilopedia/CivilopediaSupport.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,7 @@ function AddPortrait(icon, color)
instance.PortraitIcon:SetColor(color);
end
else
instance.PortraitIcon:SetColor(1,1,1);
instance.PortraitIcon:SetColor(UI.GetColorValue(1,1,1));
end
instance.Root:SetHide(not success);

Expand Down
Loading

0 comments on commit 14e657f

Please sign in to comment.