Player.GetGold (Civ5 API)

From Civilization Modding Wiki
Revision as of 08:04, 20 September 2012 by DonQuich (talk | contribs) (Bot update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This page is a part of the Lua and UI Reference (Civ5).


Function.png This function is a member of Player.

This is an instance method, invoke it with a colon.


Usage

int Player:GetGold()


Returned Value

No description available.


Source code samples

Redundant occurences have been removed.

BarbarianRansomPopup.lua

UI/InGame/PopupsGeneric/BarbarianRansomPopup.lua
0011
if (iNumGold > pPlayer:GetGold()) then
0012
iNumGold = pPlayer:GetGold();


CityStateDiploPopup.lua

UI/InGame/Popups/CityStateDiploPopup.lua
0725
local iNumGoldPlayerHas = pActivePlayer:GetGold();


EconomicGeneralInfo.lua

UI/InGame/Popups/EconomicGeneralInfo.lua
0181
Controls.TotalGoldValue:SetText( Locale.ToNumber( pPlayer:GetGold(), "#.##" ) );


TopPanel.lua

UI/InGame/TopPanel.lua
0045
if (pPlayer:GetGold() + iGoldPerTurn < 0) then
0061
local iTotalGold = pPlayer:GetGold();


TradeLogic.lua (G&K)

DLC/Expansion/UI/InGame/WorldView/TradeLogic.lua
1276
if (Players[g_iUs]:GetGold() < iCost or Players[g_iThem]:GetGold() < iCost or bEmptyTT) then


TutorialChecks.lua

Tutorial/TutorialChecks.lua
1886
if (player:GetGold() >= 400) then
2858
if (pPlayer:GetGold() < 0) then


UnitPanel.lua

UI/InGame/WorldView/UnitPanel.lua
0970
if (iGoldToUpgrade > pActivePlayer:GetGold()) then


WhosWinningPopup.lua

UI/InGame/Popups/WhosWinningPopup.lua
0224
return pPlayer:GetGold();



The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.