Plot.GetTerrainType (Civ5 API)

From Civilization Modding Wiki
Revision as of 10:19, 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 Plot.

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


Usage

TerrainType Plot:GetTerrainType()


Returned Value

No description available.


Source code samples

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

Amazon_XP.lua (G&K)

DLC/Expansion/Maps/Amazon_XP.lua
0263
terrainTypes[i] = plot:GetTerrainType();
0281
terrainTypes[i - 1] = plot:GetTerrainType();
1002
local terrainType = plot:GetTerrainType()
1003
if terrainType == TerrainTypes.TERRAIN_SNOW then
1327
local terrainType = res_plot:GetTerrainType()
1328
local featureType = res_plot:GetFeatureType()


AssignStartingPlots.lua

Gameplay/Lua/AssignStartingPlots.lua
4985
local terrainType = plot:GetTerrainType()
4986
local iNumMountains, iNumHills, iNumDeserts, iNumTundra = 0, 0, 0, 0;
5004
terrainType = adjPlot:GetTerrainType()
5005
if terrainType == TerrainTypes.TERRAIN_TUNDRA then
5041
local terrainType = plot:GetTerrainType()
5042
if not (terrainType == TerrainTypes.TERRAIN_DESERT or terrainType == TerrainTypes.TERRAIN_TUNDRA) then
5058
terrainType = adjPlot:GetTerrainType()
5059
if terrainType == TerrainTypes.TERRAIN_GRASS then -- Grass is unacceptable.
5133
local terrainType = plot:GetTerrainType()
5134
if terrainType == TerrainTypes.TERRAIN_DESERT or terrainType == TerrainTypes.TERRAIN_TUNDRA then
5144
terrainType = adjPlot:GetTerrainType()
5145
if terrainType == TerrainTypes.TERRAIN_DESERT or terrainType == TerrainTypes.TERRAIN_TUNDRA then
5179
local terrainType = plot:GetTerrainType()
5180
if terrainType == TerrainTypes.TERRAIN_GRASS then -- Rejecting grass.
5196
terrainType = adjPlot:GetTerrainType()
5197
if terrainType == TerrainTypes.TERRAIN_GRASS then


AssignStartingPlots.lua (G&K)

DLC/Expansion/Gameplay/Lua/AssignStartingPlots.lua
0787
local terrainType = plot:GetTerrainType();
1794
local terrainType = plot:GetTerrainType()
1795
local featureType = plot:GetFeatureType()
3787
local terrainType = plot:GetTerrainType()
3788
if terrainType == TerrainTypes.TERRAIN_GRASS then -- Place Stone
3878
local terrainType = searchPlot:GetTerrainType()
3879
local featureType = searchPlot:GetFeatureType()
5298
local terrainType = plot:GetTerrainType()
5299
if terrainType == TerrainTypes.TERRAIN_GRASS and self.CoreTileCanBeGrass[wn] == true then
5422
local terrainType = adjPlot:GetTerrainType();
5954
if plot:GetTerrainType() ~= TerrainTypes.TERRAIN_GRASS then
5958
if plot:GetTerrainType() ~= TerrainTypes.TERRAIN_PLAINS then
5965
if adjPlot:GetTerrainType() ~= TerrainTypes.TERRAIN_COAST then
6164
local terrainType = plot:GetTerrainType()
6165
if (plotType == PlotTypes.PLOT_LAND or plotType == PlotTypes.PLOT_HILLS) and terrainType ~= TerrainTypes.TERRAIN_SNOW then -- Habitable land plot, process it.
9209
local terrainType = plot:GetTerrainType()
9210
local plotIndex = realY * iW + realX + 1;


Boreal.lua (G&K)

DLC/Expansion/Maps/Boreal.lua
0569
local terrain_type = plot:GetTerrainType()
0570
if terrain_type == TerrainTypes.TERRAIN_OCEAN then


EnemyUnitPanel.lua

UI/InGame/WorldView/EnemyUnitPanel.lua
1032
iModifier = pMyUnit:TerrainAttackModifier(pToPlot:GetTerrainType());
1035
local terrainTypeBonus = Locale.ConvertTextKey( GameInfo.Terrains[pToPlot:GetTerrainType()].Description );
1333
iModifier = pTheirUnit:TerrainDefenseModifier(pToPlot:GetTerrainType());
1336
local typeBonus = Locale.ConvertTextKey(GameInfo.Terrains[pToPlot:GetTerrainType()].Description);
1605
iModifier = theirUnit:TerrainDefenseModifier(theirPlot:GetTerrainType());
1608
local typeBonus = Locale.ConvertTextKey(GameInfo.Terrains[theirPlot:GetTerrainType()].Description);


Europe.lua (G&K)

DLC/Expansion/Maps/Europe.lua
0464
terrainVal = plot:GetTerrainType();
0998
local terrainType = plot:GetTerrainType()
0999
local iNumMountains, iNumHills, iNumDesert = 0, 0, 0;
1012
terrainType = adjPlot:GetTerrainType()
1013
if terrainType == TerrainTypes.TERRAIN_DESERT then
1167
if plot:GetTerrainType() ~= TerrainTypes.TERRAIN_DESERT then


FeatureGenerator.lua (G&K)

DLC/Expansion/Gameplay/Lua/FeatureGenerator.lua
0360
local terrainType = plot:GetTerrainType()
0361
if terrainType == TerrainTypes.TERRAIN_COAST then
0373
local adjTerrainType = adjPlot:GetTerrainType()
0374
if adjTerrainType == TerrainTypes.TERRAIN_TUNDRA or adjTerrainType == TerrainTypes.TERRAIN_SNOW then


Great_Plains_XP.lua (G&K)

DLC/Expansion/Maps/Great_Plains_XP.lua
1200
local terrainType = plot:GetTerrainType()
1201
if terrainType == TerrainTypes.TERRAIN_GRASS or terrainType == TerrainTypes.TERRAIN_TUNDRA then -- Rejecting grass or tundra.
1217
terrainType = adjPlot:GetTerrainType()
1218
if terrainType == TerrainTypes.TERRAIN_GRASS or terrainType == TerrainTypes.TERRAIN_TUNDRA then


Ice_Age.lua

Maps/Ice_Age.lua
0493
local terrainType = plot:GetTerrainType()
0494
if terrainType == TerrainTypes.TERRAIN_TUNDRA then


MapGenerator.lua (G&K)

DLC/Expansion/Gameplay/Lua/MapGenerator.lua
0204
if(plot:GetTerrainType() == deepWater) then


NaturalWondersCustomMethods.lua (G&K)

DLC/Expansion/Gameplay/Lua/NaturalWondersCustomMethods.lua
0053
local terrainType = adjPlot:GetTerrainType()
0054
if terrainType == TerrainTypes.TERRAIN_COAST then
0103
local terrainType = adjPlot:GetTerrainType()
0104
local featureType = adjPlot:GetFeatureType()
0146
if plot:GetTerrainType() ~= TerrainTypes.TERRAIN_COAST then
0158
if SEPlot:GetTerrainType() ~= TerrainTypes.TERRAIN_COAST then


PlotMouseoverInclude.lua

UI/InGame/PlotMouseoverInclude.lua
0108
convertedKey = Locale.ConvertTextKey(GameInfo.Terrains[plot:GetTerrainType()].Description);


Rainforest.lua (G&K)

DLC/Expansion/Maps/Rainforest.lua
0733
local terrain_type = plot:GetTerrainType()
0734
if terrain_type == TerrainTypes.TERRAIN_GRASS then


ReplayViewer.lua

UI/InGame/Popups/ReplayViewer.lua
1339
TerrainType = plot:GetTerrainType(),


TerrainGenerator.lua

Gameplay/Lua/TerrainGenerator.lua
0165
local val = plot:GetTerrainType();
0193
return plot:GetTerrainType();



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.