* Show a preview of custom maps on new game screen
* Show a preview of custom maps on new game screen - step 2
* Show a preview of custom maps on new game screen V2
* Move caches for passThrough and movementCost into the parent method.
* Reuse path calculated for reaching enemy city if still far away instead of recalculating it for the "landing tile".
* Cache getDistanceToTilesWithinTurn by removing tilesToIgnore from the call and doing that filtering later. Also simplify caller side with some transformations around differences for the first iteration and subsequent iterations.
* Check whether a player is spectator by comparing their civName directly with the Constant rather than going through the lazily initialized property of the nation. This is significantly faster (10x ?) and we're calling this method a lot (tens of millions of times).
Also check whether a tile is explored directly on the tile, not the other way round.
* Revert "Cache getDistanceToTilesWithinTurn by removing tilesToIgnore from the call and doing that filtering later. Also simplify caller side with some transformations around differences for the first iteration and subsequent iterations."
This reverts commit f75ce00d83.
* Simplify UnitMovement.getShortestPath
* Bump version and create initial changelog entry
* update Simplified_Chinese translation (#9289)
Co-authored-by: chr_56 <_>
* update Japanese.properties (#9286)
* Update Japanese.properties
* Update Japanese.properties
* Update Spanish.properties (#9285)
* Update Indonesian.properties (#9283)
* Update Brazilian_Portuguese.properties (#9277)
* Update Polish.properties (#9276)
* Update French.properties (#9274)
Small translation improvements:
- Remove a few past tenses which are unnecessary in French (in the context, past participle alone is enough, especially in notifications)
- More precise translation for "the defence of [cityName]", to refer to the unit garrisoned in the attacked city ("la défense" doesn't sound well)
---------
Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: namazulake <130637228+namazulake@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: t <73392607+tsaqibfs@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
* Speed up WorkerAutomation.findTileToWork - apparently tileCanBeImproved is quite expensive
* Add cache for rankTileForCityWork in CityPopulationManager.autoAssignPopulation
* Optimize NextTurnAutomation.declareWar by moving expensive BFSs to the end and potentially short-circuiting evaluation if result won't be promising anyways.
* No need to throw if atLeast is negative.
* Revert changes to CityPopulationManager.kt
* Revert changes to CityPopulationManager.kt
* Speed up WorkerAutomation.findTileToWork - apparently tileCanBeImproved is quite expensive
* Add cache for rankTileForCityWork in CityPopulationManager.autoAssignPopulation
* Optimize NextTurnAutomation.declareWar by moving expensive BFSs to the end and potentially short-circuiting evaluation if result won't be promising anyways.
* No need to throw if atLeast is negative.
* Revert changes to CityPopulationManager.kt
* Revert changes to CityPopulationManager.kt
* Cache civ uniques while refreshing world map tiles.
This should have a pretty significant performance improvement of about 10% next rount time.
* Forgot to add stateForConditionals to cache key.
* Make cache keys depend on function
* Restrict LocalUniqueCache API to avoid using it the wrong way.
* Use default values instead of two methods
* UnitMovement#getDistanceToTilesWithinTurn hotspots
* Make fog busting less expensive
* Speed up tryHeadTowardsEncampment
* Reorder conditions in isGoodTileToExplore
* Reorder conditions in isGoodTileToExplore
* Revert "Speed up tryHeadTowardsEncampment"
This reverts commit d3841a233b.
* Don't lookup twice.
* Bump version and create initial changelog entry
* Update Indonesian.properties (#9255)
Now, Indonesian translation is complete
* Fixing some typos in the German translation (#9236)
* Fixing some typos in the German translation
* Fixed another typo
* Fixed a huge amount of typos
Ran over it with a hunspell. Found a few other mistakes in the process.
* Fixed mistranslations in quotes
Fixed one translation that seemed to be made with a software translator.
Replaced a translation of a translation with the original quote.
---------
Co-authored-by: Birk Birkner <birkner@bbirkner.de>
* Fix typo in Polish.properties (#9233)
* Update Turkish.properties (#9227)
* Update Turkish.properties
* Add files via upload
* Update Spanish.properties (#9206)
* Update Spanish.properties
* Update Spanish.properties
---------
Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: t <73392607+tsaqibfs@users.noreply.github.com>
Co-authored-by: Knirps1 <52383078+Knirps1@users.noreply.github.com>
Co-authored-by: Birk Birkner <birkner@bbirkner.de>
Co-authored-by: bread <77245194+breadtard@users.noreply.github.com>
Co-authored-by: Enesb852 <130827350+Enesb852@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
* Bump version and create initial changelog entry
* Updated Brazilian_Portuguese.properties (#9223)
* Updated Brazilian_Portuguese.properties
* Updated Brazilian_Portuguese.properties
* Update Russian localization (#9222)
* Update Russian localization
Just in case, for the "X attacked our unit Y", I have chosen to make it a bit less precise (not directly stating that "Y" is player's unit) because due to language's specifics it's practically impossible with this translation scheme to not make grammar error.
* fix
should have used copy-paste
* Update Polish.properties (#9215)
* Update Italian.properties (#9209)
---------
Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Alex <64156241+Alex-1000@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
* Add automation for great scientist & merchant
* Automate great people (great merchant, great engineer & great scientist).
* Address comments
* Rename method for consistency
* Resolve comments
* Allow "selecting" notifications
* NotificationsScroll remembers position relative to topRight
* NotificationsScroll tries to scroll selection into view
* Fix notification selection and scroll-into-view
* User option to control enlarging selected notifications
* Post-merge missed changes
* Move, flip and reword "Enlarge" option
* Block growth if Unique says so - even with full stores
* Display unhappiness rejection reason for Settlers
* Display unhappiness effects in Overview Stats
* Display unhappiness effects in Overview Stats - simplify
* Arbitrary images in font!!!
* Added unit, promotion, and improvement icons to text
* Fixed icons in notifications
* Removed icons from formatted lines to avoid double-icons
* Removed nation icon from next to menu to not have double-icons
* Removed nation icon from next to menu to not have double-icons
* Icons do not appear in Civilopedia twice
* Better Nation texts
* Show a highlight for the tile that seems most suitable to found a city (can be turned off in settings)
* Don't allow players to cheat through highlighting suggested map tiles for city founding.
* Don't pass whether cheating is allowed, but just decide based on whether civ is AI or not. That way it will also work correctly for automated settlers (by human players). Also show it in the first round, because why not. If the map generator puts us on a shitty starting tile, why not tell the player?
* Address comments
* Address comments
* Let spectator see civ groups in VictoryScreen
* Display defeated players normally for charts. Otherwise it's difficult to see which line belongs to them.
* Don't show a 0 for defeated civs.
* Delete dead code.
* Show the civ icon on the last data point within the chart, not next to it and simplify some computations with now obsolete paddings.
* Support negative values in the chart
* Remove TODO for negative values
* Show wonders in tech tree with a blue color and also show which wonders have already been built for technologies not yet researched with a red circle around them.
* Only show red circle.
The issue was caused by Latin-Civs Mixed Militias being considered workers in ConstructionAutomation.addWorkerChoice() but not beign counted as one in ConstructionAutomation.workers. Now, any unit that can build improvements counts as a worker in it. In addition, the AI simulates military units that can found city, build improvements or are religious as civilians in peacetime and as soldiers in wartime.
* Resource stockpiles!
* toString extension including sign (+/-)
* Trigger uniques to provide/consume stockpiled resources
* Fixed build
* Display 'per turn' for stockpiled resources that are consumed per turn
* "Costs [amount] [resource]" works!
* Stockpile unique costs are displayed in construction button
* Added unique to prevert certain resources from being traded
* VictoryScreen with Charts by WhoIsJohannes
* VictoryScreen with Charts by WhoIsJohannes - atlas
* VictoryScreen with Charts by WhoIsJohannes - lost icon attribution
I need this quite often when deciding whether to build something such as "Library" (get 1 research for each 2 population -> "Oh, wait, what's the population of this city?")
Longer term I want to check how hard it would be to show the effects of something more directly e.g. for the social policy picker screen. E.g. "Gain one happiness for each city with a garrison" or "Empire produces double the amount of resources" or "1 extra happiness for each walls, castle, arsenal etc.", would be nice to see directly to how much happiness, resources that translates to make a better decision.
This happened to me in a game, unfortunately I don't have the save since it's one round ago in a multiplayer game, but I'm pretty sure this is the part of the code causing the problem.
* Don't do anything crazy if military is inferior and never give away more than 10% (ceil) of your cities in any case.
* Don't coerce types implicitly.
* Comment weird distance to capital logic and invert -- => +
* Maximum give away 20% of cities instead of 10%