https://modiki.civfanatics.com/index.php?title=Player.CalculateGoldRate_(Civ5_API)&feed=atom&action=history
Player.CalculateGoldRate (Civ5 API) - Revision history
2024-03-29T08:35:15Z
Revision history for this page on the wiki
MediaWiki 1.38.2
https://modiki.civfanatics.com/index.php?title=Player.CalculateGoldRate_(Civ5_API)&diff=11717&oldid=prev
DonQuich: Bot update
2012-09-20T07:28:53Z
<p>Bot update</p>
<p><b>New page</b></p><div>{{Civ5 API Beta Banner}}<br />
''This page is a part of the [[Lua and UI Reference (Civ5)]].''<br/><br />
<br />
<br />
<br />
{{TypeInfos5|Function.png|This function is a member of {{Type5|Player}}.<br/><br />
This is an instance method, invoke it with a colon.<br />
}}<br />
<br />
<br />
=Usage=<br />
<code>'''int''' Player:CalculateGoldRate<b>(</b><b>)</b></code><br />
<br />
<br />
'''Returned Value'''<br />
:No description available.<br />
<br />
<br />
=Source code samples=<br />
''Redundant occurences have been removed.''<br />
<br />
{{PseudoH4|DiploRelationships.lua}}<br />
:<code>UI/InGame/Popups/DiploRelationships.lua</code><br />
:{{CodeBegin5}}<br />
{{CodeLine5|0289}}<syntaxhighlight lang="lua">local iGoldPerTurn = Players[iPlayer]:CalculateGoldRate();</syntaxhighlight><br />
{{CodeEnd5}}<br />
<br />
<br />
{{PseudoH4|TopPanel.lua}}<br />
:<code>UI/InGame/TopPanel.lua</code><br />
:{{CodeBegin5}}<br />
{{CodeLine5|0042}}<syntaxhighlight lang="lua">local iGoldPerTurn = pPlayer:CalculateGoldRate();</syntaxhighlight><br />
{{CodeEnd5}}<br />
<br />
<br />
{{PseudoH4|TradeLogic.lua}}<br />
:<code>UI/InGame/WorldView/TradeLogic.lua</code><br />
:{{CodeBegin5}}<br />
{{CodeLine5|1034}}<syntaxhighlight lang="lua">local iGoldPerTurn = g_pUs:CalculateGoldRate();</syntaxhighlight><br />
{{CodeBreak5}}<br />
{{CodeLine5|1049}}<syntaxhighlight lang="lua">iGoldPerTurn = g_pThem:CalculateGoldRate();</syntaxhighlight><br />
{{CodeBreak5}}<br />
{{CodeLine5|1686}}<syntaxhighlight lang="lua">strTooltip = Locale.ConvertTextKey( "TXT_KEY_DIPLO_CURRENT_GPT", g_pUs:CalculateGoldRate() - data1 );</syntaxhighlight><br />
{{CodeBreak5}}<br />
{{CodeLine5|1695}}<syntaxhighlight lang="lua">strTooltip = Locale.ConvertTextKey( "TXT_KEY_DIPLO_CURRENT_GPT", g_pThem:CalculateGoldRate() - data1 );</syntaxhighlight><br />
{{CodeBreak5}}<br />
{{CodeLine5|1976}}<syntaxhighlight lang="lua">if (iGoldPerTurn > g_pUs:CalculateGoldRate()) then</syntaxhighlight><br />
{{CodeLine5|1977}}<syntaxhighlight lang="lua">iGoldPerTurn = g_pUs:CalculateGoldRate();</syntaxhighlight><br />
{{CodeBreak5}}<br />
{{CodeLine5|1983}}<syntaxhighlight lang="lua">if (iGoldPerTurn > g_pThem:CalculateGoldRate()) then</syntaxhighlight><br />
{{CodeBreak5}}<br />
{{CodeLine5|2039}}<syntaxhighlight lang="lua">local strTooltip = Locale.ConvertTextKey( "TXT_KEY_DIPLO_CURRENT_GPT", g_pUs:CalculateGoldRate() - iGoldPerTurn );</syntaxhighlight><br />
{{CodeBreak5}}<br />
{{CodeLine5|2052}}<syntaxhighlight lang="lua">local strTooltip = Locale.ConvertTextKey( "TXT_KEY_DIPLO_CURRENT_GPT", g_pThem:CalculateGoldRate() - iGoldPerTurn );</syntaxhighlight><br />
{{CodeEnd5}}<br />
<br />
<br />
<br />
<br />
{{Civ5 API Footer}}<br />
[[Category:Civ5 Methods and Functions|CalculateGoldRate]]<br />
[[Category:Civ5 Gold API|CalculateGoldRate]]</div>
DonQuich