Unit.GetPlot (Civ5 API)

From Civilization Modding Wiki
Revision as of 13:02, 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 Unit.

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


Usage

Plot Unit:GetPlot()


Returned Value

No description available.


Source code samples

Redundant occurences have been removed.

ActionInfoPanel.lua

UI/InGame/WorldView/ActionInfoPanel.lua
0107
local pPlot = v:GetPlot();
0120
local pPlot = pUnit:GetPlot();


Bombardment.lua

UI/InGame/Bombardment.lua
0033
thisPlot = pHeadSelectedUnit:GetPlot();


EnemyUnitPanel.lua

UI/InGame/WorldView/EnemyUnitPanel.lua
0576
local pFromPlot = pMyUnit:GetPlot();
0577
local pToPlot = pTheirUnit:GetPlot();
0744
if (pMyUnit:GetPlot():IsRiverCrossingToPlot(pToPlot)) then
0757
if (not pToPlot:IsWater() and pMyUnit:GetPlot():IsWater()) then
1463
local theirPlot = theirUnit:GetPlot();


EnemyUnitPanel.lua (G&K)

DLC/Expansion/UI/InGame/WorldView/EnemyUnitPanel.lua
0792
if (not pToPlot:IsWater() and pMyUnit:GetPlot():IsWater() and pMyUnit:GetDomainType() == DomainTypes.DOMAIN_LAND) then


InGame.lua

UI/InGame/InGame.lua
0445
return unit:CanEmbarkOnto(unit:GetPlot(), targetPlot);
0543
local thisPlot = pHeadSelectedUnit:GetPlot();


MilitaryOverview.lua

UI/InGame/Popups/MilitaryOverview.lua
0215
local iTurnsLeft = unit:GetPlot():GetBuildTurnsLeft(buildType, 0, 0);
0216
local iTurnsTotal = unit:GetPlot():GetBuildTurnsTotal(buildType);


TutorialChecks.lua

Tutorial/TutorialChecks.lua
0311
local plot = v:GetPlot();
1083
local pUnitPlot = v:GetPlot();
1554
local pFirstUnitPlot = v:GetPlot();
1559
local pSecondUnitPlot = w:GetPlot();
3049
return v:GetPlot();


UnitFlagManager.lua

UI/InGame/UnitFlagManager.lua
0580
local plot = pUnit:GetPlot();
0766
UpdateCityCargo( pUnit:GetPlot() );
0997
local pPlot = thisUnit:GetPlot();


UnitPanel.lua

UI/InGame/WorldView/UnitPanel.lua
0855
local pPlot = unit:GetPlot();
0883
local iFeature = unit:GetPlot():GetFeatureType();


WorldView.lua

UI/InGame/WorldView/WorldView.lua
0517
if (pHeadSelectedUnit:CanEmbarkOnto(pHeadSelectedUnit:GetPlot(), plot)) then



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.