PreGame.GetHandicap (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 PreGame.

This is a static method, invoke it with a dot.


Usage

HandicapType PreGame.GetHandicap(PlayerID player = nil)


Returned Value

No description available.

Parameters

player: No description available.


Source code samples

Redundant occurences have been removed.

AdvancedSetup.lua

UI/FrontEnd/GameSetup/AdvancedSetup.lua
0572
local info = GameInfo.HandicapInfos[PreGame.GetHandicap(0)];


CivsAlive.lua - DLC_01 DLC

DLC/DLC_01/Scenarios/Mongol Scenario/CivsAlive.lua
0020
local iHandicap = PreGame.GetHandicap(0);


GameMenu.lua

UI/InGame/Menus/GameMenu.lua
0373
info = GameInfo.HandicapInfos[ PreGame.GetHandicap( 0 ) ];


GameSetupScreen.lua

UI/FrontEnd/GameSetup/GameSetupScreen.lua
0312
local info = GameInfo.HandicapInfos[ PreGame.GetHandicap( 0 ) ];


SaveMenu.lua

UI/InGame/Menus/SaveMenu.lua
0072
PreGame.GetHandicap(), PreGame.GetWorldSize(), PreGame.GetMapScript(), nil,


StagingRoom.lua

UI/FrontEnd/Multiplayer/StagingRoom.lua
0369
slotInstance.HandicapLabel:LocalizeAndSetText( GameInfo.HandicapInfos( "ID = '" .. PreGame.GetHandicap( playerID ) .. "'" )().Description );
0534
Controls.HandicapLabel:LocalizeAndSetText( GameInfo.HandicapInfos( "ID = '" .. PreGame.GetHandicap( Matchmaking.GetLocalID() ) .. "'" )().Description );



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.