Map.GetGridSize (Civ5 API)

From Civilization Modding Wiki
Revision as of 20:50, 19 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 Map.

This is a static method, invoke it with a dot.


Usage

int, int Map.GetGridSize()


Returned Values

No description available.


Source code samples

Redundant occurences have been removed.

Amazon_XP.lua (G&K)

DLC/Expansion/Maps/Amazon_XP.lua
0052
local iW, iH = Map.GetGridSize();
0452
local iW, iH = Map.GetGridSize()
0453
local riverPlot;
0558
local iW, iH = Map.GetGridSize()
0559
thisFlowDirection = thisFlowDirection or FlowDirectionTypes.NO_FLOWDIRECTION;
0797
local iW, iH = Map.GetGridSize()
0799
-- Place the Amazon!
0800
print("Charting the Amazon River (Lua Amazon) ...")
1434
local iW, iH = Map.GetGridSize()
1435
local uran_amt, horse_amt, oil_amt, iron_amt, coal_amt, alum_amt = self:GetMajorStrategicResourceQuantityValues()


AssignStartingPlots.lua (G&K)

DLC/Expansion/Gameplay/Lua/AssignStartingPlots.lua
0863
local iW, iH = Map.GetGridSize()
0864
local xEnd, yEnd; --[[ These coordinates will be used in case of wrapping landmass,
0908
local iW, iH = Map.GetGridSize()
0909
local adjusted_table = {};
1290
local iW, iH = Map.GetGridSize()
1291
local iWestX = rectangle_data_table[1];
6100
local iW, iH = Map.GetGridSize()
6101
local ratio = self.iNumCityStates / self.iNumCivs;
6447
local iW, iH = Map.GetGridSize()
6448
local iNumCoastal = table.maxn(coastal_plot_list);
9525
local iW, iH = Map.GetGridSize()
9526
for y = 0, iH - 1 do


Boreal.lua (G&K)

DLC/Expansion/Maps/Boreal.lua
0225
local iW, iH = Map.GetGridSize()
0226
local x = plot:GetX()
0475
local iW, iH = Map.GetGridSize()
0476
print("Inland Sea - Adding Rivers");
0565
local iW, iH = Map.GetGridSize()
0566
if iY == iH - 1 then


FeatureGenerator.lua (G&K)

DLC/Expansion/Gameplay/Lua/FeatureGenerator.lua
0311
local iW, iH = Map.GetGridSize()
0312
local biggest_ocean = Map.FindBiggestArea(true)


FractalWorld.lua

Gameplay/Lua/FractalWorld.lua
0015
local gridWidth, gridHeight = Map.GetGridSize();


GenericWorldAnchor.lua

UI/InGame/GenericWorldAnchor.lua
0007
local m_gridWidth, _ = Map.GetGridSize();


Great_Plains.lua

Maps/Great_Plains.lua
0789
local iW, iH = Map.GetGridSize()
0791
-- Place the Mississippi!
0792
print("Charting the Mississippi (Lua Great Plains) ...")


ReplayViewer.lua

UI/InGame/Popups/ReplayViewer.lua
1249
local mapWidth, mapHeight = Map.GetGridSize();


ResourceIconManager.lua

UI/InGame/ResourceIconManager.lua
0019
local g_gridWidth, _ = Map.GetGridSize();


Ring.lua

Maps/Ring.lua
0168
local iW, iH = Map.GetGridSize()
0169
local iWH = iW * iH;
0618
local iW, iH = Map.GetGridSize()
0619
self.iNumCityStatesPerRegion = 0;


Skirmish.lua

Maps/Skirmish.lua
0623
local iW, iH = Map.GetGridSize()
0624
print("Skirmish - Adding Rivers");


Tilted_Axis.lua (G&K)

DLC/Expansion/Maps/Tilted_Axis.lua
0799
local iW, iH = Map.GetGridSize()
0800
if iY >= iH / 2 then
0919
local iW, iH = Map.GetGridSize()
0920
local args = {


West_vs_East.lua

Maps/West_vs_East.lua
0194
local iW, iH = Map.GetGridSize()
0195
print("West vs East - Adding Rivers");



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.