TileMap
An Unciv map with all properties as produced by the map editor or MapGenerator; or as part of a running game.
Note: Will be Serialized -> Take special care with lateinit and lazy!
Constructors
Types
Behaviour of assignContinents
Structure geared for simple serialization by Gdx.Json (which is a little blind to kotlin collections, especially HashSet)
Functions
Adds a starting position, maintaining the transients
Set a continent id for each tile, so we can quickly see which tiles are connected. Can also be called on saved maps.
Clears starting positions, e.g. after GameStarter is done with them. Does not clear the pseudo-improvements.
Returns the neighbor tile of tile at clockPosition, if it exists. Takes world wrap into account Returns null if there is no such neighbor tile or if clockPosition is not a valid clock position
Build a list of incompatibilities of a map with a ruleset for the new game loader
Returns the closest position to (0, 0) outside the map which can be wrapped to the position of the given vector
Removes a starting position, maintaining the transients
Removes all starting positions for nationName, maintaining the transients
Initialize startingLocations transients, including legacy support (maps saved with placeholder improvements)
Initialize transients - without, most operations, like get from coordinates, will fail.
Strips all units from TileMap
Scan and remove placeholder improvements from map and build startingLocations from them