https://modiki.civfanatics.com/index.php?title=GameStateType_(Civ5_Type)&feed=atom&action=history
GameStateType (Civ5 Type) - Revision history
2024-03-29T12:42:15Z
Revision history for this page on the wiki
MediaWiki 1.38.2
https://modiki.civfanatics.com/index.php?title=GameStateType_(Civ5_Type)&diff=10107&oldid=prev
DonQuich: Bot update
2012-09-19T14:45:06Z
<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>GameStateType</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>GameStateType</code> corresponds to the constants defined in the '''GameStateTypes''' Lua enumeration.<br />
}}<br />
<br />
<br />
= Lua: the GameStateTypes enumeration =<br />
Firaxis provides a Lua enumeration named <code>GameStateTypes</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" |"CIV5_GS_UNKNOWN"<br />
|<br />
|align="right" |-1<br />
|-<br />
|align="left" |"CIV5_GS_EXIT"<br />
|<br />
|align="right" |0<br />
|-<br />
|align="left" |"CIV5_GS_OPENING_MOVIE"<br />
|<br />
|align="right" |1<br />
|-<br />
|align="left" |"CIV5_GS_LOAD_GAME"<br />
|<br />
|align="right" |2<br />
|-<br />
|align="left" |"CIV5_GS_MAIN_MENU"<br />
|<br />
|align="right" |3<br />
|-<br />
|align="left" |"CIV5_GS_MULTIPLAYER_MENU"<br />
|<br />
|align="right" |4<br />
|-<br />
|align="left" |"CIV5_GS_LANLOBBY"<br />
|<br />
|align="right" |5<br />
|-<br />
|align="left" |"CIV5_GS_INETLOBBY"<br />
|<br />
|align="right" |6<br />
|-<br />
|align="left" |"CIV5_GS_STAGING"<br />
|<br />
|align="right" |7<br />
|-<br />
|align="left" |"CIV5_GS_SCENARIOSETUP"<br />
|<br />
|align="right" |8<br />
|-<br />
|align="left" |"CIV5_GS_MAINGAMEVIEW"<br />
|<br />
|align="right" |9<br />
|-<br />
|align="left" |"CIV5_GS_UI_VIEWER"<br />
|<br />
|align="right" |10<br />
|-<br />
|align="left" |"CIV5_GS_LEADER_HEAD_BENCHMARK"<br />
|<br />
|align="right" |11<br />
|-<br />
|align="left" |"CIV5_GS_LEADER_HEAD_VIEW"<br />
|<br />
|align="right" |12<br />
|-<br />
|align="left" |"CIV5_GS_NEXUS"<br />
|<br />
|align="right" |13<br />
|-<br />
|align="left" |"CIV5_GS_WORLD_BUILDER_LOAD"<br />
|<br />
|align="right" |14<br />
|-<br />
|align="left" |"CIV5_GS_CREDITS"<br />
|<br />
|align="right" |15<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 = GameStateTypes.CIV5_GS_EXIT<br />
local id = GameStateTypes["CIV5_GS_EXIT"]<br />
</syntaxhighlight><br />
<br />
<br />
=Used by=<br />
{|cellspacing="4" cellpadding="0" width="100%" style="background-color:#F0F0F0"<br />
<!-- <br />
GETCURRENTGAMESTATE<br />
--><br />
|-<br />
|align="right" width="200" |<code>{{Type5|GameStateType}}</code><br />
|style="padding-left:6px" |<code>{{Type5|UI}}.{{Func5|UI|GetCurrentGameState}}<b>(</b><!-- No arguments --><b>)</b></code><br />
|}<br />
<br />
<br />
<br />
<br />
{{Civ5 API Footer}}<br />
[[Category:Civ5 Types|GameStateType]]</div>
DonQuich