Plot.GetFeatureType (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 Plot.

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


Usage

FeatureType Plot:GetFeatureType()


Returned Value

No description available.


Source code samples

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

Amazon_XP.lua (G&K)

DLC/Expansion/Maps/Amazon_XP.lua
0390
if not plot:IsWater() and (plot:GetFeatureType() == FeatureTypes.NO_FEATURE) then
0435
if plot:GetFeatureType() == FeatureTypes.NO_FEATURE and not plot:IsMountain() then
1328
local featureType = res_plot:GetFeatureType()
1329
if featureType == FeatureTypes.FEATURE_MARSH then


AssignStartingPlots.lua

Gameplay/Lua/AssignStartingPlots.lua
5148
local featureType = adjPlot:GetFeatureType()
5149
if featureType == FeatureTypes.FEATURE_MARSH then
5242
local featureType = adjPlot:GetFeatureType()
5243
if featureType == FeatureTypes.FEATURE_ICE then


AssignStartingPlots.lua (G&K)

DLC/Expansion/Gameplay/Lua/AssignStartingPlots.lua
1795
local featureType = plot:GetFeatureType()
1797
-- Mountain and Ocean plot types get their own AreaIDs, but we are going to measure them anyway.
1798
if plotType == PlotTypes.PLOT_MOUNTAIN then
2200
local featureType = plot:GetFeatureType()
2202
if plotType == PlotTypes.PLOT_MOUNTAIN then -- Mountains are Junk.
3484
local featureType = plot:GetFeatureType()
3485
if featureType == FeatureTypes.FEATURE_OASIS then
3596
local featureType = plot:GetFeatureType()
3597
if plotType ~= PlotTypes.PLOT_LAND then
3673
local featureType = plot:GetFeatureType()
3674
local plotIndex = realY * iW + realX + 1;
3785
local featureType = plot:GetFeatureType()
3786
if featureType == FeatureTypes.NO_FEATURE then
3879
local featureType = searchPlot:GetFeatureType()
3881
if plotType == PlotTypes.PLOT_MOUNTAIN then
5318
local featureType = plot:GetFeatureType()
5319
if featureType == FeatureTypes.NO_FEATURE and self.CoreTileCanBeNoFeature[wn] == true then
5517
local featureType = adjPlot:GetFeatureType();
7143
local featureType = plot:GetFeatureType()
7144
if plotType == PlotTypes.PLOT_MOUNTAIN then
8295
local featureType = plot:GetFeatureType()
8297
if plotType == PlotTypes.PLOT_OCEAN then
9206
local featureType = plot:GetFeatureType()
9207
if plot:GetResourceType(-1) == -1 and featureType ~= FeatureTypes.FEATURE_OASIS then -- No resource or Oasis here, safe to proceed.
9356
local featureType = plot:GetFeatureType()
9357
if plotType == PlotTypes.PLOT_LAND or plotType == PlotTypes.PLOT_HILLS then


EnemyUnitPanel.lua

UI/InGame/WorldView/EnemyUnitPanel.lua
1019
if (pToPlot:GetFeatureType() ~= -1) then
1022
iModifier = pMyUnit:FeatureAttackModifier(pToPlot:GetFeatureType());
1025
local featureTypeBonus = Locale.ConvertTextKey(GameInfo.Features[pToPlot:GetFeatureType()].Description);
1323
iModifier = pTheirUnit:FeatureDefenseModifier(pToPlot:GetFeatureType());
1326
local typeBonus = Locale.ConvertTextKey(GameInfo.Features[pToPlot:GetFeatureType()].Description);
1592
if (theirPlot:GetFeatureType() ~= -1) then
1595
iModifier = theirUnit:FeatureDefenseModifier(theirPlot:GetFeatureType());
1598
local typeBonus = Locale.ConvertTextKey(GameInfo.Features[theirPlot:GetFeatureType()].Description);


FeatureGenerator.lua (G&K)

DLC/Expansion/Gameplay/Lua/FeatureGenerator.lua
0209
if (plot:GetFeatureType() == FeatureTypes.NO_FEATURE) then
0294
if (plot:GetFeatureType() == self.featureJungle) then
0357
local featureType = plot:GetFeatureType()
0358
if featureType ~= FeatureTypes.FEATURE_ICE then
0377
local adjFeatureType = adjPlot:GetFeatureType()
0378
if adjFeatureType == FeatureTypes.FEATURE_ICE then


Great_Plains.lua

Maps/Great_Plains.lua
1508
if plot:IsWater() or plot:IsMountain() or plot:GetFeatureType() == FeatureTypes.FEATURE_OASIS then


NaturalWonderPopup.lua

UI/InGame/Popups/NaturalWonderPopup.lua
0026
local feature = pNaturalWonderPlot:GetFeatureType();


NaturalWondersCustomMethods.lua (G&K)

DLC/Expansion/Gameplay/Lua/NaturalWondersCustomMethods.lua
0049
local featureType = adjPlot:GetFeatureType()
0050
if featureType ~= FeatureTypes.NO_FEATURE then
0104
local featureType = adjPlot:GetFeatureType()
0105
if terrainType == TerrainTypes.TERRAIN_COAST and plot:IsLake() == false then
0161
if SEPlot:GetFeatureType() ~= FeatureTypes.NO_FEATURE then


PlotMouseoverInclude.lua

UI/InGame/PlotMouseoverInclude.lua
0042
local iFeature = plot:GetFeatureType();
0052
local convertedKey = Locale.ConvertTextKey( GameInfo.Features[plot:GetFeatureType()].Description);
0069
if (GameInfo.Features[plot:GetFeatureType()].NaturalWonder) then
0415
local featureType = plot:GetFeatureType();


ReplayViewer.lua

UI/InGame/Popups/ReplayViewer.lua
1340
FeatureType = plot:GetFeatureType(),


TurnsRemaining.lua - DLC_02 DLC

DLC/DLC_02/Scenarios/NewWorldScenario/TurnsRemaining.lua
0394
if (pPlot:GetFeatureType() == iFeatureID) then


TutorialChecks.lua

Tutorial/TutorialChecks.lua
2041
if (pPlot:GetFeatureType() == FeatureTypes.FEATURE_FOREST) then
2043
elseif (pPlot:GetFeatureType() == FeatureTypes.FEATURE_MARSH) then
2045
elseif (pPlot:GetFeatureType() == FeatureTypes.FEATURE_JUNGLE) then


UnitPanel.lua

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



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.