GetMinorCivType

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

Description

Returns civilization type value for a city-state player.

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