https://modiki.civfanatics.com/index.php?title=CityUpdateType_(Civ5_Type)&feed=atom&action=historyCityUpdateType (Civ5 Type) - Revision history2024-03-28T17:22:52ZRevision history for this page on the wikiMediaWiki 1.38.2https://modiki.civfanatics.com/index.php?title=CityUpdateType_(Civ5_Type)&diff=10080&oldid=prevDonQuich: Bot update2012-09-19T14:38:40Z<p>Bot update</p>
<p><b>New page</b></p><div>{{Civ5 API Beta Banner}}<br />
''This page is a part of the [[Lua and UI Reference (Civ5)]].''<br/><br />
<br />
<br />
<br />
{{TypeInfos5|ID.png|The <code>CityUpdateType</code> pseudo-type is actually a regular '''integer'''. Pseudo-types do not exist in Lua, they only serve a documentation purpose on the wiki!<br />
* {{Lua}} Integers labeled as <code>CityUpdateType</code> corresponds to the constants defined in the '''CityUpdateTypes''' Lua enumeration.<br />
}}<br />
<br />
<br />
= Lua: the CityUpdateTypes enumeration =<br />
Firaxis provides a Lua enumeration named <code>CityUpdateTypes</code>. This is just a regular global table. Its keys are the constants' names and the pairs the corresponding values.<br />
<br />
<br/>Below are the values found in this enumeration.<br />
<code><br />
{|<br />
|-<br />
!align="left" |Key<br />
!<br />
!align="left" |Value <br />
|-<br />
|align="left" |"NO_CITY_UPDATE_TYPE"<br />
|<br />
|align="right" |-1<br />
|-<br />
|align="left" |"CITY_UPDATE_TYPE_BANNER"<br />
|<br />
|align="right" |0<br />
|-<br />
|align="left" |"CITY_UPDATE_TYPE_SPECIALISTS"<br />
|<br />
|align="right" |1<br />
|-<br />
|align="left" |"CITY_UPDATE_TYPE_PRODUCTION"<br />
|<br />
|align="right" |2<br />
|-<br />
|align="left" |"CITY_UPDATE_TYPE_ENEMY_IN_RANGE"<br />
|<br />
|align="right" |3<br />
|-<br />
|align="left" |"NUM_CITY_UPDATE_TYPES"<br />
|<br />
|align="right" |4<br />
|}</code><br />
<br />
<br />
= Examples =<br />
Here is how to use the LUA enumeration to retrieve the ''ID'' from the ''type''. Those examples will return and assign the integer value 0.<br />
<syntaxhighlight lang="lua" class="civ5-example"><br />
local id = CityUpdateTypes.CITY_UPDATE_TYPE_BANNER<br />
local id = CityUpdateTypes["CITY_UPDATE_TYPE_BANNER"]<br />
</syntaxhighlight><br />
<br />
<br />
=Used by=<br />
{|cellspacing="4" cellpadding="0" width="100%" style="background-color:#F0F0F0"<br />
<!-- <br />
SPECIFICCITYINFODIRTY<br />
--><br />
|-<br />
|align="right" width="200" |<code><!-- No return type --></code><br />
|style="padding-left:6px" |<code>{{Type5|Events}}.{{Func5|Events|SpecificCityInfoDirty}}<b>(</b>{{Type5|PlayerID}} player, {{Type5|CityID}} cityID, {{Type5|CityUpdateType}} updateType<b>)</b></code><br />
|}<br />
<br />
<br />
<br />
<br />
{{Civ5 API Footer}}<br />
[[Category:Civ5 Types|CityUpdateType]]</div>DonQuich