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

int Unit:IsGarrisoned()


Returned Value

No description available.


Source code samples

Redundant occurences have been removed.

CityBannerManager.lua

UI/InGame/CityBannerManager.lua
1165
if unit ~= nil and cityBanners ~= nil and unit:IsGarrisoned() then


MilitaryOverview.lua

UI/InGame/Popups/MilitaryOverview.lua
0183
elseif( unit:IsGarrisoned()) then


UnitFlagManager.lua

UI/InGame/UnitFlagManager.lua
0159
o.m_IsGarrisoned = pUnit:IsGarrisoned();
0492
if self.m_IsGarrisoned and not pUnit:IsGarrisoned() then
0506
elseif( pUnit:IsGarrisoned() )
0596
if( test ~= nil and test:GetID() ~= self.m_UnitID and not test:IsGarrisoned() )
0848
if pUnit:IsGarrisoned() then
0980
flag:GarrisonComplete( thisUnit:IsGarrisoned() );


UnitFlagManager.lua (G&K)

DLC/Expansion/UI/InGame/UnitFlagManager.lua
0595
if( test ~= nil and test:GetID() ~= self.m_UnitID and not test:IsGarrisoned() and not test:IsDead() and not test:IsDelayedDeath() )



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.