Big DUH moment, we've been applying this same trick everywhere but haven't generalized it yet...
This will both make performance improvements easier, AND improve readability!
- Cache civ uniques ignoring conditionals, for better reuse
- Cache civ uniques *when querying city uniques*, same
This allows us to use the same UniqueCache between cities, and we still get the performance boost of "search once filter always", since the searching is the heavier part, and in any case we'll always have to do the filtering by conditionals either way
* Added "Jump To Destination" UnitActionButton for moving unit
This commit also fixes the situation where the player is unable to open the Show More unit actions list while the unit is moving and out of moves for the turn. Previously, clicking Show More in this scenario would jump to the next active unit.
* Added Jump To Destination to translation file
* Changed Jump to Destination to Show Unit Destination, updated icon, credits
* 💡 add some comments providing examples
* ♻ refactor getGeneralModifiers to increase readability
* ♻ refactor getAttackModifiers to increase readability
* 🏗 move constants expressed as magic number to separated class to increase maintainability and expressivity
* ♻ invert condition to remove continue statement and simplify code
* 💚 add some tests for battle damage class
* Fix promotions being available when they shouldn't
* Move unreachable code to the bottom
* Remove unnecessary comment
* Details for adopted nodes technically shouldn't be overriden
* Add back in unreachable before we do checks
* Just realized we're back to square one. Here's an actual fix
* Improved Nuke AI
* AI can only nuke visible tiles now
* Removed an extra space
* Removed commented changes from another feature in testing
* Removed commented changes from another feature in testing again
* AI now doesn't calculate the value of nuking a tile while at peace
* Removed extra change related to attacking cities.
* Improved AI chooseAttackTarget
* Added extra import statement
* Restructured chooseAttackTarget to use .maxByOrNull
* Refactored getUnitAttackValue
* Standardised attack valuing in BattleHelper
* address unnecessary ruleset checks
* Add missing imports
* Fix units not getting the ability uses set if it the city has your own religion
* Remove unnecessary cityConstructions check
* Remove more cases of unnecessary ruleset checks
* Research agreements can now be offered when both civilizations combined have enough gold.
* Moved a OfferColumnsTable constructor parameter.
* Fixed the ordering of an argument in TradeTable.
* Added an extra comment to OffersListScroll.
* Refactored research pact trade balancing when offered.
* Research agreement cost now uses the highest era from both participants.
* Minor UI tweaks - mainly duplicate icons on ResourcesOverviewTab and EspionageOverviewScreen
* Bugfix and expand NotificationActions
* Switch NotificationAction migration to Phase IV
* Tweak a few Notifications to have more useful actions
* Remove one `run {}`
* Better predictability of clicks on Notifications pulled out of history
* Unit creation notifications can now select the unit
* Linting
* ClearBarbarianCamp quest Notification shows map location first
* More Linting
* Hide City-state call for help from aggressor
* Added an Any Civ starting location brush.
* Fixed the Remove starting locations brush from being too long.
* Civs without a specific starting location given to them now use the spectator starting locations before finding a free tile.
* Removed spectator from civilizations to give a starting location.
* Added comments
* Removed accidentally added import statements.
* Added new display text to template.properties
* Replaced an inline when statement with an if statement.
* Fixed not having a space after a translation.
* Moved finding a starting location to a new function.
* Fixed GameStarter.getCivStartingLocation to return a null if it couldn't find a tile to start on.
* Bump version and create initial changelog entry
* Update Simplified_Chinese (#9938)
* Update Italian.properties (Defensive Pacts) (#9924)
* Update French.properties (#9922)
* Update Spanish.properties (#9921)
* Update Spanish.properties
* Reword
* Add missing equal sign
Co-authored-by: TommasoPetrolito <tommasouni@gmail.com>
---------
Co-authored-by: TommasoPetrolito <tommasouni@gmail.com>
* Update Brazilian_Portuguese.properties (#9919)
* Update Brazilian_Portuguese.properties
* Update Brazilian_Portuguese.properties
* Update Korean.properties (#9948)
New unciv & github user here.
I found Korean translation stopped on February and thought this would help a little bit.
It still has untranslated lines and some may be incorrect, but better than never? :)
---------
Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: TommasoPetrolito <tommasouni@gmail.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: DoosanBears82 <142787703+DoosanBears82@users.noreply.github.com>
* Added owner civ and city to the ImprovementPicker screen with translation
* Switched tileOwnerText from var to val
* Changed unowned tile message and city name link to city screen
* Diplomatic Vote tweak: Defensively make sure Spectator can't vote
* Diplomatic Vote tweak: Fix votesNeededForDiplomaticVictory formula and base count
* Victory Screen Illustrations page
* Fix WorldReligion victory disclosing random player count
* Victory screen icons and Victory types get their separately moddable path
* Merge fix and nicer wiki text
* VictoryScreenIllustrations debug run
* Fix Image sizing and some polishing
* Fix white squares on some Victory Screen Cultural milestone buttons
* Add option to enable/disable unit upgrades for automated units
* Add automated unit upgrade String to template.properties
* Change check for isPlayer to isHuman when performing upgrades for automated units