"Map Editor" button now takes the current map to edit

This commit is contained in:
Yair Morgenstern
2019-04-14 22:33:19 +03:00
parent 8d91cb90dc
commit 089f8ac49f
2 changed files with 8 additions and 3 deletions

View File

@ -21,8 +21,8 @@ android {
applicationId "com.unciv.app"
minSdkVersion 14
targetSdkVersion 28
versionCode 227
versionName "2.14.7"
versionCode 228
versionName "2.14.8"
}
// Had to add this crap for Travis to build, it wanted to sign the app

View File

@ -15,7 +15,12 @@ class WorldScreenMenuTable(val worldScreen: WorldScreen) : PopupTable(worldScree
init {
addButton("Map editor".tr()){
UnCivGame.Current.screen = MapEditorScreen(null)
val tileMapClone = worldScreen.gameInfo.tileMap.clone()
for(tile in tileMapClone.values){
tile.militaryUnit=null
tile.civilianUnit=null
}
UnCivGame.Current.screen = MapEditorScreen(tileMapClone)
remove()
}