Plot.GetY (Civ5 API)

From Civilization Modding Wiki
Jump to: navigation, search

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


Function.png This function is a member of Plot.

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


Usage

int Plot:GetY()


Returned Value

No description available.


Source code samples

Too many occurences. Only 50 out of 350 are listed.

Amazon_XP.lua (G&K)

DLC/Expansion/Maps/Amazon_XP.lua
0478
local adjacentPlot = Map.PlotDirection(riverPlot:GetX(), riverPlot:GetY(), DirectionTypes.DIRECTION_SOUTHWEST);
0544
local adjacentPlot = Map.PlotDirection(plot:GetX(), plot:GetY(), direction);
0591
local adjacentPlot = Map.PlotDirection(riverPlot:GetX(), riverPlot:GetY(), DirectionTypes.DIRECTION_SOUTHEAST);
0602
riverPlot = Map.PlotDirection(startPlot:GetX(), startPlot:GetY(), DirectionTypes.DIRECTION_EAST);
0655
riverPlot = Map.PlotDirection(riverPlot:GetX(), riverPlot:GetY(), DirectionTypes.DIRECTION_WEST);
0844
local current_y = plot:GetY()
0845
if current_x < 1 or current_x >= iW - 2 or current_y < 2 or current_y >= iH - 1 then
0856
local start_y = inlandCorner:GetY()
0857
if start_x + start_y <= iH * 0.36 then -- Ocean side of Andes


Boreal.lua (G&K)

DLC/Expansion/Maps/Boreal.lua
0227
local y = plot:GetY()
0228
local random_factor = Map.Rand(3, "River direction random factor - Boreal LUA");


CityStateDiploPopup.lua

UI/InGame/Popups/CityStateDiploPopup.lua
0306
local plotY = pTargetPlot:GetY();


CityStateDiploPopup.lua (G&K)

DLC/Expansion/UI/InGame/Popups/CityStateDiploPopup.lua
0614
local hex = ToHexFromGrid(Vector2(pPlot:GetX(), pPlot:GetY()));


CityView.lua

UI/InGame/CityView/CityView.lua
1824
Events.SerialEventHexHighlight( ToHexFromGrid( Vector2( plot:GetX(), plot:GetY() ) ), false, Vector4( 0.0, 1.0, 0.0, 1 ) );
1838
if (pCity:CanBuyPlotAt(plot:GetX(), plot:GetY(), false)) then
1841
local iPlotCost = pCity:GetBuyPlotCost( plot:GetX(), plot:GetY() );
1848
elseif (pCity:CanBuyPlotAt(plot:GetX(), plot:GetY(), true)) then


EnemyUnitPanel.lua

UI/InGame/WorldView/EnemyUnitPanel.lua
0611
local pFireSupportUnit = pMyUnit:GetFireSupportUnit(pTheirUnit:GetOwner(), pToPlot:GetX(), pToPlot:GetY());


Great_Plains.lua

Maps/Great_Plains.lua
0561
local y = plot:GetY()
0562
local center = math.floor((iW - 1) * (0.84 + (((iH - y) / iH) * 0.08)));


InGame.lua

UI/InGame/InGame.lua
0459
local evalPlotY = evalPlot:GetY();
0489
local hexID = ToHexFromGrid( Vector2( adjacentPlot:GetX(), adjacentPlot:GetY() ) );


InGame.lua (G&K)

DLC/Expansion/UI/InGame/InGame.lua
0272
local iPlotY = pPlot:GetY();


InlandSea.lua

Maps/InlandSea.lua
0168
local y = plot:GetY()
0169
local random_factor = Map.Rand(3, "River direction random factor - Inland Sea LUA");


MapmakerUtilities.lua

Gameplay/Lua/MapmakerUtilities.lua
0382
local adjY = NEPlot:GetY();
0392
local adjY = EPlot:GetY();
0401
local adjY = SEPlot:GetY();
0410
local adjY = SWPlot:GetY();


NaturalWondersCustomMethods.lua (G&K)

DLC/Expansion/Gameplay/Lua/NaturalWondersCustomMethods.lua
0040
local southeastY = SEPlot:GetY();


PlotHelpText.lua

UI/InGame/WorldView/PlotHelpText.lua
0060
TextString = TextString .. tostring(plot:GetY());


PlotMouseoverInclude.lua (G&K)

DLC/Expansion/UI/InGame/PlotMouseoverInclude.lua
0018
if (iQuestData1 == plot:GetX() and iQuestData2 == plot:GetY()) then


Skirmish.lua

Maps/Skirmish.lua
0354
local y = plot:GetY()
0355
local random_factor = Map.Rand(3, "River direction random factor - Skirmish LUA");


TurnsRemaining.lua - DLC_02 DLC

DLC/DLC_02/Scenarios/NewWorldScenario/TurnsRemaining.lua
0338
unit = pLoopPlayer:InitUnit (iUnitID, pLoopPlayer:GetStartingPlot():GetX(), pLoopPlayer:GetStartingPlot():GetY());
0401
local adjacentPlot = Map.PlotDirection(pPlot:GetX(), pPlot:GetY(), direction);
0413
pPlayer:InitUnit (iUnitID, adjacentPlot:GetX(), adjacentPlot:GetY());


TurnsRemaining.lua - DLC_04 DLC

DLC/DLC_04/Scenarios/1066Scenario/TurnsRemaining.lua
0244
if (playerStartPlot:GetX() == 43 and playerStartPlot:GetY() == 17) then
0286
if (playerStartPlot:GetX() == 60 and playerStartPlot:GetY() == 76) then
0353
if (playerStartPlot:GetX() == 59 and playerStartPlot:GetY() == 39) then
0518
unit = player:InitUnit (iUnitID, playerStartPlot:GetX(), playerStartPlot:GetY(), UNITAI_RANGED, DirectionTypes.DIRECTION_WEST);


TurnsRemaining.lua (G&K)

DLC/Expansion/Scenarios/MedievalScenario/TurnsRemaining.lua
0818
SetPersistentProperty("JerusalemY", pJerusalemPlot:GetY());
1036
print ("Team: ", iTeam, "; Revealing x: ", pPlot:GetX(), ", y: ", pPlot:GetY());
1042
local adjPlot = Map.PlotDirection(pPlot:GetX(), pPlot:GetY(), direction);
1070
local capital = pPlayer:InitCity(startPlot:GetX(), startPlot:GetY());
1125
local cityState = pPlayer:InitCity(startPlot:GetX(), startPlot:GetY());
1147
SetZurichLocation(startPlot:GetX(), startPlot:GetY());
1150
SetGenevaLocation(startPlot:GetX(), startPlot:GetY());
1153
SetVaticanLocation(startPlot:GetX(), startPlot:GetY());
1239
local capital = pPlayer:InitCity(start_plot:GetX(), start_plot:GetY());


TurnsRemaining.lua (G&K)

DLC/Expansion/Scenarios/FallOfRomeScenario/TurnsRemaining.lua
0101
local iPlotY = playerStartPlot:GetY();


TurnsRemaining.lua (G&K)

DLC/Expansion/Scenarios/SteampunkScenario/TurnsRemaining.lua
0850
local pUnit = pPlayer:InitUnit(eUnitType, pPlot:GetX(), pPlot:GetY());


TutorialChecks.lua

Tutorial/TutorialChecks.lua
1560
if (Map.PlotDistance(pFirstUnitPlot:GetX(), pFirstUnitPlot:GetY(), pSecondUnitPlot:GetX(), pSecondUnitPlot:GetY()) <= iMovesLeft ) then


UnitFlagManager.lua

UI/InGame/UnitFlagManager.lua
1039
g_CityFlags[ pPlot:GetX() .. " " .. pPlot:GetY() ] = cityFlagInstance;


WorldBuilderRandomItems.lua

Gameplay/Lua/WorldBuilderRandomItems.lua
0180
local otherPlot   = Map.PlotXYWithRangeCheck(plot:GetX(), plot:GetY(), dx, dy, groupRange);


WorldView.lua

UI/InGame/WorldView/WorldView.lua
0162
local unit = player:InitUnit(g_UnitPlopper.UnitType, plot:GetX(), plot:GetY());



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.