IsMinorCiv

From Civilization Modding Wiki
Revision as of 04:41, 17 February 2012 by Killmeplease (talk | contribs) (Created page with "==Description== Returns true if this is a city-state. ==Example== (from Emigration v.2 mod) function GetPlayerName(player) if player:IsMinorCiv() then local minorCivTyp...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description

Returns true if this is a city-state.

Example

(from Emigration v.2 mod)

 function GetPlayerName(player)	
 	if player:IsMinorCiv() then
 		local minorCivType = player:GetMinorCivType();
 		local minorCivInfo = GameInfo.MinorCivilizations[minorCivType];
 		return Locale.ConvertTextKey(minorCivInfo.Description);
 	end
 	local iCivType = player:GetCivilizationType();
 	local civInfo = GameInfo.Civilizations[iCivType];			
 	return Locale.ConvertTextKey(civInfo.Description);	
 end