AssignStartingPlots.ApplyHexAdjustment (Civ5 API)

From Civilization Modding Wiki
Revision as of 13:46, 20 September 2012 by DonQuich (talk | contribs) (Bot update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 AssignStartingPlots.

This is an instance method, invoke it with a colon.


Usage

int, int AssignStartingPlots:ApplyHexAdjustment(int x, int y, table(int => int) plot_adjustments)


Returned Values

No description available.

Parameters

x: No description available.
y: No description available.
plot_adjustments: No description available.


Source code samples

Redundant occurences have been removed.

AssignStartingPlots.lua (G&K)

DLC/Expansion/Gameplay/Lua/AssignStartingPlots.lua
3870
local searchX, searchY = self:ApplyHexAdjustment(x, y, plot_adjustments)
3872
if searchX < 0 or searchX >= iW or searchY < 0 or searchY >= iH then
4012
local searchX, searchY = self:ApplyHexAdjustment(x, y, plot_adjustments)
4013
local plot = Map.GetPlot(x, y);
4160
local searchX, searchY = self:ApplyHexAdjustment(x, y, plot_adjustments)
4161
-- Attempt to place a Hill at the currently chosen plot.
4162
local placedHill = self:AttemptToPlaceHillsAtPlot(searchX, searchY);
4187
local searchX, searchY = self:ApplyHexAdjustment(x, y, plot_adjustments)
4188
-- Attempt to place a Hill at the currently chosen plot.
4189
local placedStrategic = self:AttemptToPlaceSmallStrategicAtPlot(searchX, searchY);
4330
local searchX, searchY = self:ApplyHexAdjustment(x, y, plot_adjustments)
4331
-- Attempt to place a Bonus at the currently chosen plot.
4332
local placedBonus, placedOasis = self:AttemptToPlaceBonusResourceAtPlot(searchX, searchY, allow_oasis);
4418
local searchX, searchY = self:ApplyHexAdjustment(x, y, plot_adjustments)
4419
-- Attempt to place Cows at the currently chosen plot.
4420
local placedBonus = self:AttemptToPlaceStoneAtGrassPlot(searchX, searchY);
4435
local searchX, searchY = self:ApplyHexAdjustment(x, y, plot_adjustments)
4436
-- Attempt to place Stone at the currently chosen plot.
4437
local placedBonus = self:AttemptToPlaceStoneAtGrassPlot(searchX, searchY);
6803
local searchX, searchY = self:ApplyHexAdjustment(x, y, plot_adjustments)
6805
if searchX < 0 or searchX >= iW or searchY < 0 or searchY >= iH then -- This plot's off the map edge.



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.