Player.GetNextPolicyCost (Civ5 API)

From Civilization Modding Wiki
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:GetNextPolicyCost()


Returned Value

No description available.


Source code samples

Redundant occurences have been removed.

SocialPolicyPopup.lua

UI/InGame/Popups/SocialPolicyPopup.lua
0229
local szText = Locale.ConvertTextKey("TXT_KEY_NEXT_POLICY_COST_LABEL", player:GetNextPolicyCost());
0239
local iCultureNeeded = player:GetNextPolicyCost() - player:GetJONSCulture();
0284
if player:GetJONSCulture() >= player:GetNextPolicyCost() then
0357
strToolTip = strToolTip .. " " .. Locale.ConvertTextKey("TXT_KEY_POLICY_BRANCH_CANNOT_UNLOCK_CULTURE", player:GetNextPolicyCost());
0367
strToolTip = strToolTip .. "[NEWLINE][NEWLINE]" .. Locale.ConvertTextKey("TXT_KEY_POLICY_BRANCH_UNLOCK_SPEND", player:GetNextPolicyCost());


TopPanel.lua

UI/InGame/TopPanel.lua
0135
if (pPlayer:GetNextPolicyCost() > 0) then
0136
strCultureStr = string.format("%i/%i (+%i)", pPlayer:GetJONSCulture(), pPlayer:GetNextPolicyCost(), pPlayer:GetTotalJONSCulturePerTurn());
0749
local iCultureNeeded = pPlayer:GetNextPolicyCost() - pPlayer:GetJONSCulture();
0769
strText = strText .. Locale.ConvertTextKey("TXT_KEY_TP_CULTURE_NEXT_POLICY", pPlayer:GetNextPolicyCost());



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.