AssignStartingPlots.PlaceCityState (Civ5 API)
This page is a part of the Lua and UI Reference (Civ5).
This function is a member of AssignStartingPlots. This is an instance method, invoke it with a colon. |
Usage
int, int, bool AssignStartingPlots:PlaceCityState(table(int => int) coastal_plot_list, table(int => int) inland_plot_list, bool check_proximity, bool check_collision)
Returned Values
- No description available.
Parameters
coastal_plot_list: No description available. inland_plot_list: No description available. check_proximity: No description available. check_collision: No description available.
Source code samples
Redundant occurences have been removed.
AssignStartingPlots.lua (G&K)
DLC/Expansion/Gameplay/Lua/AssignStartingPlots.lua
6520
|
x, y, placed_city_state = self:PlaceCityState(eligible_coastal, eligible_inland, false, false) -- Don't need to re-check collisions. |
6521
|
end |
6666
|
cs_x, cs_y, success = self:PlaceCityState(self.uninhabited_areas_coastal_plots, self.uninhabited_areas_inland_plots, true, true) |
6668
|
-- Disabling fallback methods that remove proximity and collision checks. Jon has decided |
6669
|
-- that city states that do not fit on the map will simply not be placed, but instead discarded. |
6670
|
--[[ |
6671
|
if not success then -- Try again, this time with proximity checks disabled. |
6672
|
cs_x, cs_y, success = self:PlaceCityState(self.uninhabited_areas_coastal_plots, self.uninhabited_areas_inland_plots, false, true) |
6673
|
if not success then -- Try a third time, this time with all collision checks disabled. |
6674
|
cs_x, cs_y, success = self:PlaceCityState(self.uninhabited_areas_coastal_plots, self.uninhabited_areas_inland_plots, false, false) |
6675
|
end |
6676
|
end |
6677
|
]]-- |
6679
|
if success == true then |
6738
|
cs_x, cs_y, success = self:PlaceCityState(last_chance_shuffled, {}, true, true) |
6739
|
if success == true then |
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.