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

ResourceType Plot:GetResourceType(TeamID team)


Returned Value

No description available.

Parameters

team: No description available.


Source code samples

Redundant occurences have been removed.

Amazon_XP.lua (G&K)

DLC/Expansion/Maps/Amazon_XP.lua
1322
if res_plot:GetResourceType(-1) == -1 then


AssignStartingPlots.lua (G&K)

DLC/Expansion/Gameplay/Lua/AssignStartingPlots.lua
3475
if plot:GetResourceType(-1) ~= -1 then
4268
if plot:GetResourceType(-1) == -1 then -- No resource here, safe to proceed.
7137
elseif plot:GetResourceType(-1) ~= -1 then
7500
if res_plot:GetResourceType(-1) == -1 then -- Placing this strategic resource in this plot.
7520
if res_plot:GetResourceType(-1) == -1 then -- Placing this luxury resource in this plot.
7537
if res_plot:GetResourceType(-1) == -1 then -- Placing this bonus resource in this plot.
7662
if res_plot:GetResourceType(-1) == -1 then -- Placing this resource in this plot.
9207
if plot:GetResourceType(-1) == -1 and featureType ~= FeatureTypes.FEATURE_OASIS then -- No resource or Oasis here, safe to proceed.
9360
if plot:GetResourceType(-1) == -1 then
9529
if plot:GetResourceType(-1) == self.sugar_ID then


CityStateDiploPopup.lua

UI/InGame/Popups/CityStateDiploPopup.lua
0311
local iResourceType = pTargetPlot:GetResourceType(Game.GetActiveTeam());


GenericWorldAnchor.lua

UI/InGame/GenericWorldAnchor.lua
0154
local iResource = pTargetPlot:GetResourceType(iActiveTeam);
0242
local iResource = pPlot:GetResourceType(Game.GetActiveTeam());


Great_Plains.lua

Maps/Great_Plains.lua
1510
elseif plot:GetResourceType(-1) == -1 then


MapGenerator.lua (G&K)

DLC/Expansion/Gameplay/Lua/MapGenerator.lua
0613
if (plot:GetResourceType() ~= NO_RESOURCE) then


PlotMouseoverInclude.lua

UI/InGame/PlotMouseoverInclude.lua
0170
if (plot:GetResourceType(iActiveTeam) >= 0) then
0171
local resourceType = plot:GetResourceType(iActiveTeam);


ResourceTooltipGenerator.lua

UI/InGame/ResourceTooltipGenerator.lua
0006
local iResourceID = plot:GetResourceType(Game.GetActiveTeam());


UnitPanel.lua

UI/InGame/WorldView/UnitPanel.lua
1276
local iResourceID = pPlot:GetResourceType(iActiveTeam);
1280
local pResource = GameInfo.Resources[pPlot:GetResourceType(iActiveTeam)];


WorldBuilderRandomItems.lua

Gameplay/Lua/WorldBuilderRandomItems.lua
0063
if ((otherPlot:GetResourceType() ~= -1) and (otherPlot:GetResourceType() ~= resourceID)) then
0091
local otherResource = GameInfo.Resources[otherPlot:GetResourceType()];
0116
if (otherPlot:GetResourceType() == resourceID) 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.