Skip to content

Commit

Permalink
Add #11199 Tooltip Clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursiveVision committed Aug 7, 2024
1 parent 99ea377 commit 9b5b1c0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 18 deletions.
6 changes: 6 additions & 0 deletions (1) Community Patch/Core Files/Text/CoreText_en_US.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6479,6 +6479,12 @@
<Row Tag="TXT_KEY_DIPLO_DISCUSS_MESSAGE_DECLARE_WAR_TT">
<Text>Choosing this option may alert the targeted player and their allies to your war preparations if the leader refuses to help and decides to warn the targeted player. This may have diplomatic repercussions![NEWLINE][NEWLINE]Depending on the leader's response, a cooperative war could begin immediately, after 10 turns have passed, or as soon as one of you goes to war with the target.[NEWLINE][NEWLINE]Cooperative wars are cancelled if you prematurely end your friendship with this leader (including through denouncements or war).[NEWLINE][NEWLINE]If you befriend the target, form a Defensive Pact with them, or become unable to declare war on them, your agreement with this leader will also be cancelled.</Text>
</Row>
<Row Tag="TXT_KEY_DIPLO_DISCUSS_MESSAGE_DECLARE_WAR_NOT_FRIENDS_TT">
<Text>A Declaration of Friendship is needed in order to discuss this.</Text>
</Row>
<Row Tag="TXT_KEY_DIPLO_DISCUSS_MESSAGE_DECLARE_WAR_NO_TARGET_TT">
<Text>There must be at least one civilization that you can both declare war on. NOTE: The target civilization must have at least one city.</Text>
</Row>

<!-- Tourism and League Stuff -->
<Row Tag="TXT_KEY_LEAGUE_OVERVIEW_INVALID_RESOLUTION_CONTRADICTION_CBP">
Expand Down
20 changes: 11 additions & 9 deletions (1) Community Patch/LUA/DiscussionDialog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,11 @@ function LeaderMessageHandler( iPlayer, iDiploUIState, szLeaderMessage, iAnimati
-- DECLARE WAR (THIRD PARTY) --
--------------------------------
strButton10Text = Locale.ConvertTextKey( "TXT_KEY_DIPLO_DISCUSS_MESSAGE_DECLARE_WAR" );
if (pAIPlayer:IsDoF(iActivePlayer) or pAIPlayer:GetTeam() == Players[iActivePlayer]:GetTeam()) then
strButton10Tooltip = Locale.ConvertTextKey( "TXT_KEY_DIPLO_DISCUSS_MESSAGE_DECLARE_WAR_NO_TARGET_TT" );
else
strButton10Tooltip = Locale.ConvertTextKey( "TXT_KEY_DIPLO_DISCUSS_MESSAGE_DECLARE_WAR_NOT_FRIENDS_TT" );
end
Controls.Button10:SetDisabled(true);

--------------------
Expand All @@ -443,11 +448,9 @@ function LeaderMessageHandler( iPlayer, iDiploUIState, szLeaderMessage, iAnimati
for iPlayerLoop = 0, GameDefines.MAX_MAJOR_CIVS-1, 1 do

-- War button: Button 10
if (pAIPlayer:IsDoF(iActivePlayer) or pAIPlayer:GetTeam() == Players[iActivePlayer]:GetTeam()) then
if (IsWarAgainstThirdPartyPlayerValid(iPlayerLoop) and not pActiveTeam:IsAtWar(g_iAITeam)) then
strButton10Tooltip = Locale.ConvertTextKey( "TXT_KEY_DIPLO_DISCUSS_MESSAGE_DECLARE_WAR_TT" );
Controls.Button10:SetDisabled(false);
end
if (IsWarAgainstThirdPartyPlayerValid(iPlayerLoop)) then
strButton10Tooltip = Locale.ConvertTextKey( "TXT_KEY_DIPLO_DISCUSS_MESSAGE_DECLARE_WAR_TT" );
Controls.Button10:SetDisabled(false);
end

-- Share Opinion button: Button 11
Expand Down Expand Up @@ -1619,10 +1622,9 @@ function OnCloseLeaderPanelButton()
-- Buttons 10 and 11 are a special case - only enabled if valid
for iPlayerLoop = 0, GameDefines.MAX_MAJOR_CIVS-1, 1 do

if (pAIPlayer:IsDoF(iActivePlayer) or pAIPlayer:GetTeam() == Players[iActivePlayer]:GetTeam()) then
if (IsWarAgainstThirdPartyPlayerValid(iPlayerLoop) and not pActiveTeam:IsAtWar(g_iAITeam)) then
Controls.Button10:SetDisabled(false);
end
-- War button: Button 10
if (IsWarAgainstThirdPartyPlayerValid(iPlayerLoop)) then
Controls.Button10:SetDisabled(false);
end

-- Share Opinion button: Button 11
Expand Down
20 changes: 11 additions & 9 deletions (2) Vox Populi/Core Files/Overrides/DiscussionDialog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,11 @@ function LeaderMessageHandler( iPlayer, iDiploUIState, szLeaderMessage, iAnimati
-- DECLARE WAR (THIRD PARTY) --
--------------------------------
strButton10Text = Locale.ConvertTextKey( "TXT_KEY_DIPLO_DISCUSS_MESSAGE_DECLARE_WAR" );
if (pAIPlayer:IsDoF(iActivePlayer) or pAIPlayer:GetTeam() == Players[iActivePlayer]:GetTeam()) then
strButton10Tooltip = Locale.ConvertTextKey( "TXT_KEY_DIPLO_DISCUSS_MESSAGE_DECLARE_WAR_NO_TARGET_TT" );
else
strButton10Tooltip = Locale.ConvertTextKey( "TXT_KEY_DIPLO_DISCUSS_MESSAGE_DECLARE_WAR_NOT_FRIENDS_TT" );
end
Controls.Button10:SetDisabled(true);

--------------------
Expand All @@ -440,11 +445,9 @@ function LeaderMessageHandler( iPlayer, iDiploUIState, szLeaderMessage, iAnimati
for iPlayerLoop = 0, GameDefines.MAX_MAJOR_CIVS-1, 1 do

-- War button: Button 10
if (pAIPlayer:IsDoF(iActivePlayer) or pAIPlayer:GetTeam() == Players[iActivePlayer]:GetTeam()) then
if (IsWarAgainstThirdPartyPlayerValid(iPlayerLoop) and not pActiveTeam:IsAtWar(g_iAITeam)) then
strButton10Tooltip = Locale.ConvertTextKey( "TXT_KEY_DIPLO_DISCUSS_MESSAGE_DECLARE_WAR_TT" );
Controls.Button10:SetDisabled(false);
end
if (IsWarAgainstThirdPartyPlayerValid(iPlayerLoop)) then
strButton10Tooltip = Locale.ConvertTextKey( "TXT_KEY_DIPLO_DISCUSS_MESSAGE_DECLARE_WAR_TT" );
Controls.Button10:SetDisabled(false);
end

-- Share Opinion button: Button 11
Expand Down Expand Up @@ -1631,10 +1634,9 @@ function OnCloseLeaderPanelButton()
-- Buttons 10 and 11 are a special case - only enabled if valid
for iPlayerLoop = 0, GameDefines.MAX_MAJOR_CIVS-1, 1 do

if (pAIPlayer:IsDoF(iActivePlayer) or pAIPlayer:GetTeam() == Players[iActivePlayer]:GetTeam()) then
if (IsWarAgainstThirdPartyPlayerValid(iPlayerLoop) and not pActiveTeam:IsAtWar(g_iAITeam)) then
Controls.Button10:SetDisabled(false);
end
-- War button: Button 10
if (IsWarAgainstThirdPartyPlayerValid(iPlayerLoop)) then
Controls.Button10:SetDisabled(false);
end

-- Share Opinion button: Button 11
Expand Down

0 comments on commit 9b5b1c0

Please sign in to comment.