* Unit upgrade tooltip in overview
* Unit upgrade tooltip in action table
* Unit upgrade tooltip in action table - colored Key
* Unit upgrade in Overview - reselect
* Fix merge problems and FormattedLine color markup ability
* Relax MarkupRenderer.render lines parameter type
* Skin has a getColor shortcut - use it
* Unit overview upgrade icons now open a menu instead of upgrading immediately
* Unit Overview upgrade - "Mid" buttons
* Unit Overview upgrade - reorg
* Refactor notification history re-show functionality
* Refactor explored resources notification generator
* Refactor "Unimproved" to use existing providesResource
* Make overview resource "links" into temporary notifications
* Added link to overview resource "Unimproved" column
* Minor linting
* Fix off-by-one error in autoAssignPopulation
* Fix more off-by-one errors from for-repeat conversions
* Linting: Use Actions.forever shortcut where appropriate
* Allow mod preview image to be a jpg
* Allow preview images from WIP mods lacking github url
* Wiki preview.jpg
* Allow mod preview image to be a jpg - review
* ci: improved detekt configuration
it still needs some work but it's getting there
* detekt: separated errors from warnings
Detekt doesn't currently have a mechanism for failing only on specific issues
workaround suggested by the maintainer of Detekt
* rebased on master
* fix: resolve ExplicitItLambdaParameter
* fix: fix last star import
* Convert 'camps' vectorhashmap to 'encampments' arraylist
* Solve camps For Real This Time
Previous solution was only taking the first item of the class, not all of it
* 4.6.11-patch1
* Bump version and create initial changelog entry
* Update Indonesian.properties (#9371)
* Update Brazilian_Portuguese.properties (#9352)
* Update Russian.properties (#9351)
There was a letter missing in the word
---------
Co-authored-by: yairm210 <yairm210@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: iliademid21 <132929464+iliademid21@users.noreply.github.com>
* Add `May not annex cities` unique, following same behaviour as Civ5 Venice. Hopefully this time I won't need to re-install windows.
* Add `May not annex cities` unique, following same behaviour as Civ5 Venice. Hopefully this time I won't need to re-install windows.
* Fix raze button being unavailable in city screen
* Fixed raze button being available in city screen, as per civ5
* Corrected indentation
* mayAnnex instead of canAnnex, hasUnique rather than getMatchingUniques
* AI will follow rules
* Replaced getMatchingUniques with hasUnique, for real this time
* 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