Merge remote-tracking branch 'upstream/master'

update
This commit is contained in:
YueR 2019-09-19 19:40:31 +08:00
commit e6477aded4
58 changed files with 241 additions and 298 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 862 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 993 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,013 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 761 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 MiB

After

Width:  |  Height:  |  Size: 1,007 KiB

View file

@ -41,8 +41,15 @@ class GameStarter{
}
val cityStatesWithStartingLocations =
gameInfo.tileMap.values.filter { it.improvement!=null && it.improvement!!.startsWith("StartingLocation ") }
.map { it.improvement!!.replace("StartingLocation ","") }
val availableCityStatesNames = Stack<String>()
availableCityStatesNames.addAll(GameBasics.Nations.filter { it.value.isCityState() }.keys.shuffled())
// since we shuffle and then order by, we end up with all the city states with starting locations first in a random order,
// and then all the other city states in a random order! Because the sortedBy function is stable!
availableCityStatesNames.addAll(GameBasics.Nations.filter { it.value.isCityState() }.keys
.shuffled().sortedByDescending { it in cityStatesWithStartingLocations })
for (cityStateName in availableCityStatesNames.take(newGameParameters.numberOfCityStates)) {
val civ = CivilizationInfo(cityStateName)

View file

@ -170,11 +170,6 @@ class DiplomacyManager() {
if(offer.type== TradeType.Strategic_Resource || offer.type== TradeType.Luxury_Resource)
counter.add(GameBasics.TileResources[offer.name]!!,offer.amount,"Trade")
}
for(tradeRequest in otherCiv().tradeRequests.filter { it.requestingCiv==civInfo.civName }){
for(offer in tradeRequest.trade.theirOffers) // "theirOffers" in the other civ's trade request, is actually out civ's offers
if(offer.type== TradeType.Strategic_Resource || offer.type== TradeType.Luxury_Resource)
counter.add(GameBasics.TileResources[offer.name]!!,-offer.amount,"Trade")
}
return counter
}
//endregion

View file

@ -114,6 +114,12 @@ class MapDownloadTable(mapEditorScreen: MapEditorScreen):PopupTable(mapEditorScr
val downloadMapButton = TextButton(downloadableMap.name, CameraStageBaseScreen.skin)
downloadMapButton.onClick {
val mapJsonGzipped = DropBox().downloadFile(downloadableMap.path_display)
if(mapJsonGzipped==""){
val couldNotDownloadMapPopup = PopupTable(screen)
couldNotDownloadMapPopup.addGoodSizedLabel("Could not download map!").row()
couldNotDownloadMapPopup.addCloseButton()
return@onClick
}
val decodedMapJson = Gzip.unzip(mapJsonGzipped)
val mapObject = MapSaver().mapFromJson(decodedMapJson)
MapSaver().saveMap(downloadableMap.name, mapObject)

View file

@ -41,7 +41,7 @@ class DropBox(){
println(ex.message)
val reader = BufferedReader(InputStreamReader(errorStream))
println(reader.readText())
return "Error!"
return ""
}
}
}

View file

@ -445,7 +445,7 @@ Unless otherwise specified, all the following are from [the Noun Project](https:
## Promotions
* [Sight](https://thenounproject.com/search/?q=sight&i=2631027) By Jejen Juliansyah Nur Agung for Accuracy
* [Sight](https://thenounproject.com/search/?q=sight&i=2631027) By Jejen Juliansyah Nur Agung for Scouting
* [skill bow rain arrow](https://thenounproject.com/search/?q=rain%20of%20arrows&i=2360192) by Maxicons for Barrage
* [Bomb](https://thenounproject.com/search/?q=bombardment&i=1705276) By Angelo Troiano for Bombardment
* [Private E2](https://thenounproject.com/yeongrong.kim.5/collection/miltary-rank/?i=833152) By Yeong Rong Kim for Shock
@ -457,6 +457,18 @@ Unless otherwise specified, all the following are from [the Noun Project](https:
* [Wall](https://thenounproject.com/search/?q=wall&i=1305174) By Graphic Tigers for Volley
* [Lightning](https://thenounproject.com/search/?q=lightning&i=1187991) By Mooms for Blitz
* [Move](https://thenounproject.com/search/?q=move&i=790952) By Sandra for Mobility
* [accuracy](https://thenounproject.com/search/?q=accuracy&i=2017348) By vigtographics for Targeting
* [location](https://thenounproject.com/search/?q=location&i=2858979) by Humantech for Accuracy
* [Plane](https://thenounproject.com/search/?q=plane&i=1875398) By Tran Minh Villageois for Interception
* [Hammer](https://thenounproject.com/search/?q=hammer&i=854936) by Thengakola for Air Repair
* [Hook](https://thenounproject.com/search/?q=hook&i=738678) By Yeong Rong Kim for Boarding Party
* [Leaf](https://thenounproject.com/search/?q=Leaf&i=1627477) By Paul Verhulst for Indirect Fire
* [Move](https://thenounproject.com/search/?q=move&i=344603) By Muneer A.Safiah for Logistics
* [Evasion](https://thenounproject.com/search/?q=evasion&i=2013749) By Anna Sophie for Evasion
* [Interrupt](https://thenounproject.com/search/?q=interrupt&i=366680) by Stephen Plaster for Ambush
* [Submarine](https://thenounproject.com/search/?q=submarines&i=96833) by Lloyd Humphreys for Wolfpack
* [Axe](https://thenounproject.com/search/?q=axe&i=14290) by Brian Oppenlander for Woodsman
* [Competition](https://thenounproject.com/search/?q=move%20fast&i=1743826) by luca fruzza
## Others