Unit.GetUnitType (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 Unit.

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


Usage

UnitType Unit:GetUnitType()


Returned Value

No description available.


Source code samples

Redundant occurences have been removed.

EnemyUnitPanel.lua

UI/InGame/WorldView/EnemyUnitPanel.lua
0095
local thisUnitInfo = GameInfo.Units[pUnit:GetUnitType()];


EnemyUnitPanel.lua (G&K)

DLC/Expansion/UI/InGame/WorldView/EnemyUnitPanel.lua
0907
if (iModifier ~= 0 and pTheirUnit:IsHigherTechThan(pMyUnit:GetUnitType())) then
1456
if (iModifier ~= 0 and pMyUnit:IsHigherTechThan(pTheirUnit:GetUnitType())) then
1798
if (iModifier ~= 0 and pMyUnit:IsHigherTechThan(theirUnit:GetUnitType())) then


InGame.lua

UI/InGame/InGame.lua
0989
if (GameInfo.Units[unit:GetUnitType()].DontShowYields) then


TurnsRemaining.lua - DLC_02 DLC

DLC/DLC_02/Scenarios/NewWorldScenario/TurnsRemaining.lua
0140
if (unit:GetUnitType() == GameInfoTypes["UNIT_CARAVEL"]) then
0205
if (unit:GetUnitType() == GameInfoTypes["UNIT_TREASURE"]) then


TurnsRemaining.lua - DLC_04 DLC

DLC/DLC_04/Scenarios/1066Scenario/TurnsRemaining.lua
0202
iUnitType = unit:GetUnitType();


TurnsRemaining.lua (G&K)

DLC/Expansion/Scenarios/FallOfRomeScenario/TurnsRemaining.lua
1009
print(pUnit:GetUnitType());
1010
if pUnit:GetUnitType() == GameInfoTypes["UNIT_ROMAN_LEGION"] then


TurnsRemaining.lua (G&K)

DLC/Expansion/Scenarios/MedievalScenario/TurnsRemaining.lua
0605
if (unit:GetUnitType() == GameInfoTypes["UNIT_CARAVEL"] and iNumCaravels < 5) then
0643
if (unit:GetUnitType() == GameInfoTypes["UNIT_SPANISH_CONQUISTADOR"]) then


TutorialChecks.lua

Tutorial/TutorialChecks.lua
0976
local UnitType = v:GetUnitType();


UnitPanel.lua

UI/InGame/WorldView/UnitPanel.lua
0438
local thisUnitInfo = GameInfo.Units[unit:GetUnitType()];


UnitPanel.lua (G&K)

DLC/Expansion/UI/InGame/WorldView/UnitPanel.lua
0667
elseif (GameInfo.Units[unit:GetUnitType()].RemoveHeresy) 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.