Commit Graph

6800 Commits

Author SHA1 Message Date
dHannasch
55a068d0a0
Add TechManager.isResearched(construction) (#10646)
* Update TechManager.kt

* Update CityStateFunctions.kt

* Update QuestManager.kt

* Update UnitUpgradeManager.kt

* Update Victory.kt

* Update TechManager.kt

* Update TechManager.kt
2023-12-02 22:53:11 +02:00
Yair Morgenstern
75a4f06d03 Converted create/enhance religion actions to new format 2023-12-02 22:45:18 +02:00
Yair Morgenstern
c48584868d Converted Great Person actions to new format 2023-12-02 22:33:54 +02:00
Yair Morgenstern
4c113a9aba
RFC: Direction for converting unit actions to map (#10632)
* Direction for converting unit actions, so that invokeUnitAction() doesn't try to generate *all* possible unit actions just to choose one

* Mapped many unit actions
2023-12-01 11:32:04 +02:00
Yair Morgenstern
37586370ea Resolved #10640 - start turn with unit selected 2023-12-01 10:25:59 +02:00
Yair Morgenstern
f36b05f6c0 Revert "Resolved #10630 - "[relativeAmount]% [stat] from every follower, up to [relativeAmount]%" works off of majority religion, not our religion"
This reverts commit 199b3ada93.
2023-12-01 10:23:17 +02:00
Yair Morgenstern
4b8bef5def
Version rollout (#10633)
* Bump version and create initial changelog entry

* Update Spanish.properties (#10627)

* Update Brazilian_Portuguese.properties (#10616)

* Update French.properties (#10615)

* Update French.properties

* Update French.properties

- Improve translation of leader lines

* Update Italian.properties (#10612)

---------

Co-authored-by: yairm210 <yairm210@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: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2023-11-30 19:44:30 +02:00
SomeTroglodyte
30f3a8f712
Fix crash for trade notifications as Spectator or during waiting for player (#10614)
* Fix crash when tapping a Diplomacy notification for trades as Spectator or during waiting for player

* Fix no tech showing as researched when tapping a Tech researched notification as Spectator
2023-11-30 19:35:18 +02:00
Will Allen
70bbfe14d6
Mitigate #10619 (#10629)
- Clear all unit movement caches upon a road being pillaged
- Log when this happens
- Minor whitespace fixes
2023-11-30 19:13:39 +02:00
SeventhM
01636c27f0
Add "Unable to pillage tiles" unique (#10623) 2023-11-30 19:13:24 +02:00
SomeTroglodyte
4be14d77f4
Fix Unit rename popup offering up the icon's virtual codepoint (#10620)
* Fix Unit rename popup offering up the icon's virtual codepoint

* Fix City rename popup offering up the icon's virtual codepoint
2023-11-30 19:13:11 +02:00
SeventhM
58e5139f35
Fix objects being purchable with a blocking conditional (#10618) 2023-11-30 19:12:58 +02:00
PLynx
6617504c05
Stats per Stat unique (#10591)
* Added Stats per Stat unique

* Applied the suggestions of @yairm210
2023-11-30 19:12:39 +02:00
Yair Morgenstern
199b3ada93 Resolved #10630 - "[relativeAmount]% [stat] from every follower, up to [relativeAmount]%" works off of majority religion, not our religion 2023-11-30 19:12:18 +02:00
Yair Morgenstern
d840b4fd4d Resolved #10626 - city-state units work with 'get era' function 2023-11-30 18:28:17 +02:00
Yair Morgenstern
34dce70142 Fixed bug - credit to @SomeTroglodyte 2023-11-29 20:09:07 +02:00
Yair Morgenstern
dfd8d5cbc9 Resolved #10621 - Ruleset validation for negative-weight ruin rewards 2023-11-29 19:56:38 +02:00
Yair Morgenstern
d2148d4ea5 Mitigate #10613 - remove a !! by splitting 'getImprovementToImprove' and using it as source of truth for the improvement to start working on, INSTEAD of counting on the fact that chooseImprovement returns that improvement.
Which it looks like it won't, if somehow the improvementInProgress is NOT in the list of potentialTileImprovements.

Only case I can think of is: You captured an enemy city with a civ--unique improvement in the middle of construction. So fixed that as well.
2023-11-28 23:55:03 +02:00
Yair Morgenstern
6a8ce41f4f
Version rollout (#10611)
* Bump version and create initial changelog entry

* Update French.properties (#10604)

* Update Latin.properties + question (#10589)

* Update Latin.properties

* Update Latin.properties

* Update Latin.properties

* Update Latin.properties

* Add a space at the end

* Replaced "passus" with "gressus".

* Added relationship translations

* Update Latin.properties

* Update Latin.properties

* Fixed an error

* Corrected an error

* Corrected an error 2

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
2023-11-28 14:44:37 +02:00
Will Allen
57fd00ad14
Add queuing functionality (#10609) 2023-11-28 14:37:34 +02:00
Oskar Niesen
4b261a9257
Initial AutoPlay implementation (#10315)
* AutoPlay initial hack

* Removed extra changes

* Added canceling AutoPlay and its own button

* Victory screen showing up stops AutoPlay

* Removed AutomateTurn for the spectator

* Right Clicking AutoPlay Button starts AutoPlay immediately

* Renamed NextTurnMenu to AutoPlayMenu

* AutoPlay can now only begin on the players turn

* Added specific unit actions AutoPlay

* AutoPlay stops on VictoryScreen and GreatPersonPickerScreen

* AutoPlay now stops when loading a new game

* Hovering the mouse over the AutoPlayStatusButton now stops AutoPlay

* Removed temporary right click NextTurnButton functionality

* Removed multi-turn AutoPlay from multiplayer games

* Loading a multiplayer game now stops AutoPlay

* AutoPlayStatusButton persists over reloading WorldScreen

* Victory popup now stops autoplay

* AutoPlay now automatically picks great person

* Full AutoPlay now captures cities

* Added settings.isAutoPlaying and fixed bug with closing game in the middle of AutoPlaying a turn

* AutoPlay now correctly stops when a victory screen is shown

* AutoPlay now automates city constructions without autoAssignCityProduction being on

* Reordered NextTurnAction

* Removed extra condition for displaying AutoPlay text on next turn button

* Moved AutoPlay settings to new tab

* Changed AutoPlay slider

* Refactored Settings to have AutoPlay to be in a new subclass

* Added an show AutoPlay button setting, commented out unimplemented settings

* Opening the exit game window stops autoPlay

* Made cyclopedia entry

* Added translations

* AutoPlayStatusButton now ends with a new line

* Commented out extra code and removed extra import statements

* Fixed UncivSlider Change

* Fixed merge conflicts

* Settlers no longer stuck in endless loops wanting to found cities on tiles they can't reach @tuvus

* Support for Leader voices (#10395)

* Prepare Leader Voices: Framework

* Leader Voices: Hooks and corresponding text field comments

* Leader Voices: wiki

* Leader Voices: oops, comments

* Decouple voice play calls to make global modification easier

* Move voices to own folder and give them a separate volume setting

* Oops, template needed too

* Oops, wiki needed too

* Resolved #10366 - City centers don't provide resources you don't have tech to extract

* Add a TriggerUponDiscoveringTile unique type (#10523)

* Add a TriggerUponDiscoveringTile unique type

* Add a check for trigger presence

* Add gain stat modified by speed and improvement speed by filter uniques (#10443)

* Add gain stat modified by speed and improvement speed by filter uniques

* Fix rulesets

* Remove nonfunctional leftover resource text

* Reword improvement unqiue as suggested

* Add the SellBuilding Unique (#10514)

* Restored the SellBuilding Unique

* Rephrased SellBuilding unique

* Version rollout (#10530)

* Bump version and create initial changelog entry

* Update Brazilian_Portuguese.properties (#10528)

* Update French.properties (#10524)

* Update Italian.properties (#10522)

* Update Polish.properties (#10521)

* Update Polish.properties

* Added Fastlane_short_description

* Update Malay.properties (#10520)

Translated line 33 to line 325.
Not at all finished.
This time though I didn't mess up.

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Mikhail <151419244+MetaFBMI@users.noreply.github.com>

* Better performance for 'best tile to found city' (minimized canReach calls) @tuvus

* 4.9.0

* [Translation] Add back "general" unit types (#10526)

* Add back "general" unit types

These entries have been removed from translation files, making them untranslated in-game (in Civilopedia articles)

* Revert changes in template.properties

* Fix missing unit type translations

Fix by @SomeTroglodyte

* Changed some parts of GameSettings back to master.

* Changed right clicking to call startAutoPlay instead of setting it itself

* Fixed some !isHuman() conditions to also include full AutoPlay and refactored some other AutoPlay code

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com>
Co-authored-by: Sergey <serdav74@inbox.ru>
Co-authored-by: SeventhM <127357473+SeventhM@users.noreply.github.com>
Co-authored-by: PLynx <pawelrys2011@gmail.com>
Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Mikhail <151419244+MetaFBMI@users.noreply.github.com>
2023-11-28 14:37:21 +02:00
dHannasch
03698e47ef
Add IHasUniques.era() (#10593)
* Update IHasUniques.kt

* Update IHasUniques.kt

* Update IConstruction.kt

* Update IHasUniques.kt

* Update CivInfoTransientCache.kt

* Update UnitUpgradeManager.kt

* Update WonderOverviewTab.kt

* Update IHasUniques.kt
2023-11-28 14:36:45 +02:00
Yair Morgenstern
7162011d26 Resolves #10599 - Cities you haven't bombarded with will auto-bombard at turn end 2023-11-28 14:31:43 +02:00
Yair Morgenstern
e872f5ade4 Resolves #10601 - Defeated (no units/cities) hotseat multiplayer no longer appears for turns ("player X ready") 2023-11-28 13:51:34 +02:00
yairm210
9d411a16bc 4.9.2-patch5 2023-11-28 10:15:53 +00:00
SomeTroglodyte
20fa1d3f06
(CQ) Linting and comments on TileSetStrings and ImageAttempter (#10582)
* (CQ) Linting and comments on TileSetStrings and ImageAttempter

* (CQ) Linting and comments on TileSetStrings and ImageAttempter - some more
2023-11-28 12:07:54 +02:00
SomeTroglodyte
48ede93bfa
Wesnoth map import polished up (#10580) 2023-11-28 12:01:53 +02:00
yairm210
bc935a310c 4.9.2-patch4 2023-11-28 09:58:25 +00:00
yairm210
4b597a3c9d 4.9.2-patch3 2023-11-28 09:53:21 +00:00
SomeTroglodyte
5437c68b4c
City sounds again (#10590)
* Fix City ambience sounds stopping when switching to next/previous cities

* Fix City ambience sounds no longer fade in
2023-11-28 11:50:30 +02:00
Yair Morgenstern
205296aab7 Nicer command display 2023-11-26 19:06:24 +02:00
Oskar Niesen
10b3d69dad
Fixed isGoodTileToExplore() to check if there is no enemy in range (#10586) 2023-11-26 18:24:46 +02:00
dHannasch
09fdd8b8e2
Wrap INonPerpetualConstruction.requiredTech into function (#10585)
* Update IConstruction.kt

* Update Building.kt

* Update BaseUnit.kt

* Update BaseUnit.kt

* Update Building.kt

* Update IConstruction.kt

* Update IConstruction.kt

* Update IConstruction.kt

* Update CityStateFunctions.kt

* Update Building.kt

* Update IConstruction.kt

* Update IConstruction.kt

* Update BaseUnit.kt

* Update RulesetValidator.kt

* Update TechnologyDescriptions.kt

* Update CityStateDiplomacyTable.kt

* Update CityStateDiplomacyTable.kt
2023-11-26 08:48:09 +02:00
SeventhM
17a7465ba3
Fix founding cities removing city center tile improvement (#10584)
* Fix founding cities removing city center tile improvement

* Simplify since we know the tile
2023-11-26 08:08:14 +02:00
Yair Morgenstern
5396c41efc 4.9.2 2023-11-25 22:35:40 +02:00
Yair Morgenstern
962c6ab7cb
Version rollout (#10578)
* Bump version and create initial changelog entry

* Update Polish.properties (#10556)

* Update Polish.properties

* Update Polish.properties

* Update Polish.properties

* Update Spanish.properties (#10555)

* Update French.properties (#10553)

* Update Italian.properties (#10552)

* Update Turkish.properties (#10549)

* Update Turkish.properties

Added new translations

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

* Update Malay.properties (#10548)

323 - 417

* Update Brazilian_Portuguese.properties (#10547)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: komandotayfa <53448093+komandotayfa@users.noreply.github.com>
Co-authored-by: Mikhail <151419244+MetaFBMI@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
2023-11-25 21:56:24 +02:00
SomeTroglodyte
e15b6cab76
Tweak Language Pickers to scroll the selected one into view when appropriate, and allow selection with letter keys (#10569) 2023-11-25 20:11:41 +02:00
SomeTroglodyte
b61c9de39e
Comment unique (#10575)
* Comment Unique

* Comment Unique translations

* Comment Unique more descriptive documentation

* New languages
2023-11-25 20:11:30 +02:00
Oskar Niesen
f1ceaa216a
Get distance to nearest enemy rework (#10481)
* Initial refactor

* Moved checking if a tile has an enemy to a new method

* Rewrote getDistanceToEnemyUnit

* changed the position of the logic of checking if the enemy is still there

* Changed some of the other methods to use the ThreatManager getClosestEnemy()

* Added a new getTilesWithEnemyUnitsInDistance method

* Added a new getEnemyMilitaryUnitsInDistance method

* Converted a few lines to use ThreatManager

* Changed Air units to use threat manager

* Fixed tileWithEnemy error

* distanceToClosestEnemyTiles now clears at the start of every turn

* Added blank lines to end of ThreatManager.kt

* Renamed tilesInRange to tilesWithEnemyUnitsInRange

* Changed ArrayList return to a MutableList

* Removed ClosestEnemyTileData being a data class

* Improved commenting

* Improved commenting2

* getEnemyMilitaryUnitsInDistance now uses a flatMap and moved getDangerousTiles to threat manager

* Created a new helper method getEnemyUnitsOnTiles

* Renamed clearThreatData to clear

* Added shortcut if maxDist is less than or equal to distanceSearched

* Fixed distanceWithNoEnemies in getTilesWithEnemyUnitsInDistance

* Fixed notFoundDistance being higher than maxDistance when takeLargerValues is false

* Added some ThreatManager tests

* Added some more ThreatManager tests

* Removed visible map after use

* getTilesWithEnemyUnitsInDistance doesn't search distances <= tileData.distanceSearched (previously was <)

* Added 3 more tests

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2023-11-25 20:11:10 +02:00
SomeTroglodyte
dc7f1f703a
Sound cache preloader (#10558)
* A Preloader for sounds

* Change SoundPlayer.play to never switch threads on desktop, and limit retries, but mostly better comments
2023-11-25 20:10:24 +02:00
SomeTroglodyte
b8facadf7a
Fix OpenAL error Windows Events after application ends (#10551)
* Move exitProcess to a better place

* Fix OpenAL error Windows Events after application ends

* Extensive commenting
2023-11-25 18:22:39 +02:00
SomeTroglodyte
8c0693c998
Latin reboot (#10573)
* Reboot Latin

* Reboot Latin - 002

* Reboot Latin - 003

* Reboot Latin - atlas
2023-11-25 18:22:23 +02:00
SomeTroglodyte
59dab8992f
Fix City ambient sounds (#10574)
* Fix city ambient sound not pausing when desktop version is minimized

* Fix city ambient sounds not working from jar/apk
2023-11-25 18:08:19 +02:00
Yair Morgenstern
e9d3c153dc Console: Added set/remove tile improvement 2023-11-24 16:13:38 +02:00
Yair Morgenstern
df8f7c6bdd Console: Show available commands on empty command 2023-11-24 15:36:56 +02:00
Yair Morgenstern
7dc54dab03 Console: Added add/remove for cities 2023-11-24 15:36:56 +02:00
Yair Morgenstern
c75e7f9407 Move city founding effects to the proper function 2023-11-24 15:36:56 +02:00
SomeTroglodyte
b7823e0b39
"Fixed" Rusyn language (#10561)
* Rusyn.properties

Translation on Rusyn language (ISO-code "rue")

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Update Rusyn.properties

* Add a flag for Rusyn

* LocaleCode for Rusyn to use Ukrainian Collator but still write separate fastlane files

* Update Rusyn language files

* Redo atlas

---------

Co-authored-by: KotDivuar <148721627+KotDivuar@users.noreply.github.com>
2023-11-24 14:22:24 +02:00
SomeTroglodyte
c4b5925394
Fixed Bosnian (#10559)
* Rescue Bosnian.properties

* Rename and revert

* Let's minimize diff size for completionPercentages.properties from now on

* One generate translations run on Bosnian

* Add the Flag

* Add the LocaleCode

* Fix illegally tranzlahtedd placeholders
2023-11-24 07:21:27 +02:00
Yair Morgenstern
3c8d4cfcbf
Version rollout (#10546)
* Bump version and create initial changelog entry

* Update Polish.properties (#10544)

* Update Spanish.properties (#10542)

* Update Turkish.properties (#10536)

* Update Turkish.properties

Added new translations

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

* Update Brazilian_Portuguese.properties (#10535)

* Update Simplified Chinese (#10534)

* Update French.properties (#10531)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: komandotayfa <53448093+komandotayfa@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
2023-11-23 00:06:54 +02:00
SomeTroglodyte
0cf8ea2619
Map overlay toggle buttons rework (#10505)
* Simplify MapOverlayToggleButton signature and let the instances use individually moddable images

* Gimp sources of new images (all from existing attributions)

* New images and atlas
2023-11-23 00:00:19 +02:00
SeventhM
a6ac9aa24d
Fix free buildings triggering from conditionals in incorrect places (#10532)
* ignore trigger condtional uniques

* Have UniqueTriggerActivation only add the buildings of its unique

* (minor optimization) move where we find the free building

* Once again I forget about imports
2023-11-22 23:59:53 +02:00
SomeTroglodyte
3604d82fa9
Add a map import tool able to read "Battle for Wesnoth" maps (#10541)
* Add a map import tool able to read "Battle for Wesnoth" maps

* Fix and explain vertical distortion
2023-11-22 23:59:22 +02:00
Sergey
30c4b323ec
Add a setting to forbid closing popups by clicking behind them (#10539)
* Add a setting to forbit closing popups by clicking behind them

* Change default checkbox state to false

* Update template and Russian translation
2023-11-22 23:59:07 +02:00
SomeTroglodyte
8bd2363361
[Linting] Some minor code purity stuff I came across (#10537)
* Centralize shift and control key detection (Unit multiselect now with right-shift too)

* Lint of an ugly curly brace placement - otherwise the original was fine

* Answer open question in comment

* Follow a Gdx 1.12 deprecation

* Another clarifying comment - on ScrollPane's built-in potential surprise that the constructor calls its own overridable public methods
2023-11-22 23:58:57 +02:00
Yair Morgenstern
4c8db02dfd
Initial scenario/dev console, with 1 command :D (#10540)
* Initial console, with 1 command :D

* add/remove city tiles

* add/remove units!

* Added command history, accessible with up and down keys

* 'add promotion' cli command

* 'remove promotion' cli command

* Enumified

* Converted enums into classes - enums are weirdly restricted in all kinds of uncomfortable ways

* Added autocomplete!
2023-11-22 23:41:09 +02:00
Ouaz
810392a55e
[Translation] Add back "general" unit types (#10526)
* Add back "general" unit types

These entries have been removed from translation files, making them untranslated in-game (in Civilopedia articles)

* Revert changes in template.properties

* Fix missing unit type translations

Fix by @SomeTroglodyte
2023-11-21 11:07:19 +02:00
Yair Morgenstern
8dc0db49e7 4.9.0 2023-11-20 23:15:39 +02:00
Yair Morgenstern
052df9c064 Better performance for 'best tile to found city' (minimized canReach calls) @tuvus 2023-11-20 23:08:18 +02:00
Yair Morgenstern
10cb51795c
Version rollout (#10530)
* Bump version and create initial changelog entry

* Update Brazilian_Portuguese.properties (#10528)

* Update French.properties (#10524)

* Update Italian.properties (#10522)

* Update Polish.properties (#10521)

* Update Polish.properties

* Added Fastlane_short_description

* Update Malay.properties (#10520)

Translated line 33 to line 325.
Not at all finished.
This time though I didn't mess up.

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Mikhail <151419244+MetaFBMI@users.noreply.github.com>
2023-11-20 22:52:44 +02:00
PLynx
e67fd6a28b
Add the SellBuilding Unique (#10514)
* Restored the SellBuilding Unique

* Rephrased SellBuilding unique
2023-11-20 22:47:47 +02:00
SeventhM
1744d1271f
Add gain stat modified by speed and improvement speed by filter uniques (#10443)
* Add gain stat modified by speed and improvement speed by filter uniques

* Fix rulesets

* Remove nonfunctional leftover resource text

* Reword improvement unqiue as suggested
2023-11-20 22:47:35 +02:00
Sergey
4adbd2e634
Add a TriggerUponDiscoveringTile unique type (#10523)
* Add a TriggerUponDiscoveringTile unique type

* Add a check for trigger presence
2023-11-20 22:47:17 +02:00
Yair Morgenstern
90767fce9a Resolved #10366 - City centers don't provide resources you don't have tech to extract 2023-11-20 22:47:05 +02:00
SomeTroglodyte
08c3f97f82
Support for Leader voices (#10395)
* Prepare Leader Voices: Framework

* Leader Voices: Hooks and corresponding text field comments

* Leader Voices: wiki

* Leader Voices: oops, comments

* Decouple voice play calls to make global modification easier

* Move voices to own folder and give them a separate volume setting

* Oops, template needed too

* Oops, wiki needed too
2023-11-20 22:21:30 +02:00
Yair Morgenstern
450813fa49 Settlers no longer stuck in endless loops wanting to found cities on tiles they can't reach @tuvus 2023-11-20 22:17:38 +02:00
SomeTroglodyte
987f67d9cd
[code quality] Reorg, clean up and comment a few things (#10527)
* UncivGame is a pure class file again, GUI split off

* Purify GameSettings step 1 - non-multiplayer nested classes

* Purify GameSettings step 2 - multiplayer nested classes

* Purify GameParameters - BaseRuleset to own file

* Rework WindowState to centralize minimum/maximum treatment

* Rename MultiplayerTurnNotifierDesktop to UncivWindowListener

* Clarifications on what the WindowListener actually does (and now the attention-getting does something on non-Windows too)
2023-11-19 23:52:15 +02:00
Yair Morgenstern
2a9ec81523 Resolves #10512 resolves #10425 - Conditional tile checks pre-placement 2023-11-19 23:04:35 +02:00
Yair Morgenstern
f833918177 Resolved #10525 - AI clears inquisitors from city centers to make way for spaceship units 2023-11-19 22:16:54 +02:00
Yair Morgenstern
e6bb9d4d9a More simplification of motivationToAttack 2023-11-19 15:56:21 +02:00
Yair Morgenstern
13d0ea51d5 Separated hasAtLeastMotivationToAttack into separate class, split into subfunctions for main function readability 2023-11-19 15:52:16 +02:00
Yair Morgenstern
62687c2230 Unified errorSeverityForFilter checks into single function, we have a LOT of filters! 2023-11-19 00:10:08 +02:00
Yair Morgenstern
fb1e57668e Added tests for parameters for complex filters, fixed nested complex filter returning 'possible filtering' when it should have been known 2023-11-19 00:06:34 +02:00
Yair Morgenstern
9488aa6415
Version rollout (#10519)
* Bump version and create initial changelog entry

* Update Dutch.properties (#10513)

* Update French.properties (#10506)

* Update Italian.properties (#10504)

* Update Polish.properties (#10502)

* Update Polish.properties

* Update Polish.properties

* Update Polish.properties

* Update Brazilian_Portuguese.properties (#10495)

* Update Catalan.properties (#10479)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
2023-11-18 22:43:48 +02:00
SomeTroglodyte
98c3c446c5
Allow controlling Android fullscreen from options (#10518) 2023-11-18 22:38:36 +02:00
SomeTroglodyte
0d077ee099
(UX, minor) Change "took tile damage" notification to **select** the poor victim (#10471)
* Change "took tile damage" notification to select the poor victim

* Convenience constructor for NotificationAction:MapUnitAction

* More verbose Kdoc for MapUnitAction
2023-11-18 22:35:41 +02:00
SeventhM
accb62a0ed
Fix unit triggers not triggering/triggering off the wrong units (#10496) 2023-11-18 22:35:01 +02:00
Oskar Niesen
6fe9b7ea7f
AI diplomacy balancing (#10476)
* Merged Original AIDiplomacyBalancing changes to this branch

* Fixed being over supply resulting in the civ not attacking

* Fixed "War with allies" motivation not being added
2023-11-18 22:34:46 +02:00
Framonti
8c9e6b07e0
Test/add tests for cityexpansionmanager (#10510)
* improve error message and add test for precondition checking

* add tests for CityExpansionManager
2023-11-18 22:34:26 +02:00
Yair Morgenstern
167f25cacd Modding: Added "non-[filter]" and multi-value filtering to Tile filter 2023-11-18 22:34:04 +02:00
Yair Morgenstern
ddf8b449b3 Modding: Added "non-[filter]" and multi-value filtering to Improvement filter 2023-11-18 22:30:07 +02:00
Yair Morgenstern
5484576640 Modding: Added "non-[filter]" and multi-value filtering to Terrain filter 2023-11-18 22:27:47 +02:00
Yair Morgenstern
2a862aa895 Modding: Added "non-[filter]" and multi-value filtering to Building filter 2023-11-18 22:23:22 +02:00
Yair Morgenstern
68fd3d74b3 Modding: Added "non-[filter]" and multi-value filtering to Nation and Civ filters 2023-11-18 22:20:47 +02:00
Yair Morgenstern
dc6413d707 Modding: Added "non-[filter]" filtering for unit filters
Cleaned up unit filter validations to match actual filters
2023-11-18 22:16:43 +02:00
Yair Morgenstern
2b0568f025 Modding: Added "[relativeAmount] Air Interception Range" unique 2023-11-18 19:16:33 +02:00
Yair Morgenstern
870c146e34 Resolved #10474 - Add/remove attack images on the tile, even if the attacked unit has meanwhile been killed 2023-11-14 12:52:47 +02:00
Yair Morgenstern
e8b9864287 Resolved #10478 - *internal* tilesets to load are now determined pre-loading, to minimize concurrent modification exceptions 2023-11-14 12:18:05 +02:00
Yair Morgenstern
dfcedb6267 Resolved #10494 - dim resources on tiles not immediately visible 2023-11-14 11:51:03 +02:00
Yair Morgenstern
46e39d7d38
Bump version and create initial changelog entry (#10492)
Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
2023-11-13 22:34:21 +02:00
Yair Morgenstern
643f98b53f Resolves #10486 2023-11-13 22:33:29 +02:00
SomeTroglodyte
0029d08c5b
Patch for on-screen keyboard hiding pedia search results (#10469) 2023-11-13 22:26:49 +02:00
SomeTroglodyte
659a01c166
CrashScreen info improved, allow easier testing of CrashScreen (#10485)
* Drop AndroidTvLauncher - unused

* Additional memory info on Android CrashScreen

* Refactor getModsAndBaseRuleset - reduce clones and put base first

* Add Permanent audiovisual Mods to CrashScreen report

* Add a secret Debug option to intentionally crash Unciv

* Make "Secret" debug OptionsPopup page available on Android w/o physical keyboard

* Add AndroidTvLauncher back in

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2023-11-13 22:26:38 +02:00
SomeTroglodyte
60e2af3bba
Fix "hidden from users" where Nation describes its unique Building (if it replaces an existing one) (#10467)
* Refactor: move UI functions from Building to BuildingDescriptions

* Move Nation "unique building" diff code to BuildingDescriptions, fix hidden ignore, equalize to how BaseUnitDescriptions.getDifferences works

* Fix translation errors for difference description "Lost ability"
2023-11-13 22:19:47 +02:00
SomeTroglodyte
2847f7a8c1
Rivers... Moddable Stats and Civilopedia (#10424)
* River yields moddable and Civilopedia entry

* Improve text and better fresh water explanations

* Map editor exclusion as Unique, for River and previously hardcoded Improvements

* Map editor brush to Civilopedia link, starting locations cleaned

* Some SeventhM input applied

* Reword River/Lakes/Oasis civilopediaText and comments again
2023-11-13 22:18:25 +02:00
Oskar Niesen
22a50c7d2d
Fixed land/sea nukes trying to act like air units (#10470) 2023-11-13 22:18:09 +02:00
SomeTroglodyte
27a783104c
(UX, QOL) World screen top stats row scales down to squeeze into available width (#10473)
* Let WorldScreenTopBarStats scale itself down when content exceeds available width

* Refactor scale mapper functionality into reusable ScalingTableWrapper

* Use ScalingTableWrapper on WorldScreenTopBarResources too

* Oops, they're now equal, but technically it should be prefWidth now, and the comment is moot
2023-11-13 22:17:58 +02:00
SomeTroglodyte
ec148309f7
Allow the "Civ destroyed" Notification to show a location (#10489) 2023-11-13 22:13:37 +02:00
SeventhM
8f1722498b
Fix Multiplayer spectator ids not logging (#10480) 2023-11-13 22:12:36 +02:00
Oskar Niesen
32639f1ff5
Fixed promise not to settle (#10488)
* Settlers now account for the AgreedToNotSettleNearUs

* If the two Civs are at war the AI no longer cares about AgreedToNotSettleNearUs
2023-11-13 22:12:23 +02:00
SomeTroglodyte
cfeed82800
Whitespace linting for opening curly braces and inheritance colon (#10490) 2023-11-13 22:11:55 +02:00
Yair Morgenstern
78a4c3a963
Added Human and AI filters, separated civFilter from nationFilter (#10446)
* Added Human and AI filters, separated civFilter from nationFilter (very similar and yet slightly different)

* Changed "Human" and "AI" to "Human player" and "AI player"
2023-11-10 09:57:49 +02:00
SomeTroglodyte
916b8b451d
Fix Mod download issue - github url and indicator refresh (#10449)
* Change mod zip download URL for better compatibility

* Fix visual/has-update indicators not updating properly after download
2023-11-10 09:57:20 +02:00
SomeTroglodyte
fb30f610be
Mix of issue fixes around diplomacy and trade (#10462)
* Fix "AskForAssistance" Quest notification untranslatable

* Extend DiplomacyAction to allow showing the TradeTable of the other civ

* Make "trade ends" notifications clickable

* Make entries in Trade page of Empire Overview clickable

* Highlight selected civ in DiplomacyScreen, moddable

* A little proactive comment
2023-11-10 09:57:07 +02:00
Yair Morgenstern
05e25693b2
Version rollout (#10445)
* Bump version and create initial changelog entry

* Update French.properties (#10423)

* Update Polish.properties (#10420)

* Update Polish.properties

* Update Polish.properties

* Update German translation (#10419)

* Update Brazilian_Portuguese.properties (#10416)

* Update Spanish.properties (#10415)

* Update Italian.properties (#10413)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2023-11-07 10:44:39 +02:00
SomeTroglodyte
2bd0b847a4
Reorg SpecialistAllocationTable (#10418)
* Reorg SpecialistAllocationTable

* Fix comment typo

* Remove tooltip from GP icon, the one for the Specialist is sufficient
2023-11-07 10:40:56 +02:00
SomeTroglodyte
7e35e5668b
Refactor the "loading image" from Multiplayer into a reusable Widget (#10262)
* Refactor the "loading image" from Multiplayer into a reusable Widget

* Loading indicator - don't talk about Multiplatypus, box params in a Style
2023-11-07 10:40:44 +02:00
Oskar Niesen
12a4d129e7
Improved settler AI (#10428)
* Completely rewrote settler settle logic

* Added back original file to eligible locations

* Improved settling

* Fixed not finding cities in range

* Fixed settle AI not filtering impassible tiles.

* Fixed the possibility that there is no best tile within range.

* Fixed minimum city range being to low and causing an error

* Found the real fix for when there is no path to a tile to settle

* Adjusted tile ranking values

* Inverted sorting order to be from highest to lowest

* Fixed using tile instead of rankTile

* Fixed settle AI only looking at the current tile

* Changed behavior of settle AI at the start of the game

* Reduced the impact of being near a city

* Evaluation now assumes that a lighthouse is build while on a coast

* Settle highlight now sorts correctly

* Changed the weight of being near a city again

* Settle AI now prefers moving to the best tile when no viable tiles were in close distance

* Fixed an annoying bug where the settle does not value a city consistently for ranking

* Fixed a newer version of the unreachable tile error again

* Increased the distance to consider cities by one

* Tiles to settle now do not contain duplicate unique luxury resource values

* Increased coast tile value

* Removed only AI benefiting from ranking unexplored tiles

* Changed nearbyCities.any to a for loop

* Changed filter and sorting order

* Move rankTile to its own function

* Moved valuing tiles by distance to city to its own function

* Filtering tiles now creates a new map

* First settler no longer explores for a better location

* Removed bestTile rank from the return

* Changed BestTilesToFoundCity to return a separate class holding the return data

* Removed some trailing whitespace
2023-11-07 10:40:00 +02:00
Framonti
02844e51d7
add tests for CityFounder (#10439)
* 🎨 add spaces to better format code

*  add tests for CityFounder

* ️ exploit early returns to avoid computing some values
2023-11-07 10:39:34 +02:00
SeventhM
4393608907
Fix Multiplayer Specatator being unable to move the screen (#10442) 2023-11-07 10:39:06 +02:00
SeventhM
b854d61815
Fix free stat buildings not giving unique stat buildings in certain cases (#10444) 2023-11-07 10:38:54 +02:00
Yair Morgenstern
75c4be39a2 modding: Negative tile damage cannot heal more than max health 2023-11-07 10:35:54 +02:00
Yair Morgenstern
926ea3a201 chore: Slight readability improvements to Battle.kt 2023-11-05 01:00:36 +02:00
Yair Morgenstern
fba9048156 chore: Split NextTurnAutomation into Religion, Trade, and Diplomacy automation files 2023-11-05 00:51:33 +02:00
Yair Morgenstern
6a7d09b43a chore: RulesetValidator readability 2023-11-05 00:35:12 +02:00
Yair Morgenstern
9b5ded43d4 Mods with atlases that reference non-existent files will no longer cause crashes 2023-11-04 23:55:47 +02:00
Yair Morgenstern
14cc6cc3a7 4.8.16 2023-11-03 00:26:19 +02:00
Yair Morgenstern
0e868c2579
Version rollout (#10412)
* Bump version and create initial changelog entry

* Update German translation (#10409)

* Update Spanish translations (#10407)

* Update full_description.txt

* Update short_description.txt

* Update Spanish.properties

* Update Polish.properties (#10398)

* Update Indonesian.properties (#10396)

Fastlane update and other new translations

* Add missing translations to Ukrainian (#10393)

Co-authored-by: Kostiantyn Ko <mormat.iam@gmail.com>

* Update Italian.properties (#10392)

* Update French.properties (#10389)

* Update Dutch.translations (#10388)

* Update Simplified Chinese (#10386)

* Update Brazilian_Portuguese.properties (#10383)

* Update Romanian.properties (#10354)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: kensvin <kensvin28@gmail.com>
Co-authored-by: Kostiantyn Ko <test9@mormat.name>
Co-authored-by: Kostiantyn Ko <mormat.iam@gmail.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: ghd987654321 <141758961+ghd987654321@users.noreply.github.com>
2023-11-03 00:16:36 +02:00
SomeTroglodyte
2b20b971bc
Modded Citadel no longer hard-codes name and icon in Notification (#10382) 2023-11-03 00:09:47 +02:00
SomeTroglodyte
652b3c9159
Potpourri of RekMod-inspired little updates (#10390)
* RekMod-inspired: StatPercentFromReligionFollowers does work on FounderBelief target

* RekMod-inspired: Make StatPercentFromReligionFollowers check correct Religion

* RekMod-inspired: Prep: flags on ImprovementBuildingProblem

* RekMod-inspired: Don't offer e.g. Kampong Ayer to non-Brunei Workboats

* Update "filtering Uniques" documentation
2023-11-03 00:09:34 +02:00
SomeTroglodyte
c9d10cd8e1
Fix mini-player showing last track during inter-track silence, (#10401)
and music not looping when having only Thatched Villagers available.
2023-11-03 00:09:23 +02:00
SomeTroglodyte
9970549543
Allow modders to hide individual Uniques from Civilopedia (#10394)
* Allow hiding individual Uniques from Civilopedia via a conditional-type modifier

* Fix oversight

* Fix another oversight
2023-11-03 00:09:11 +02:00
Oskar Niesen
25aed40686
Fixed null reference error related to nuking (#10408) 2023-11-03 00:09:01 +02:00
SomeTroglodyte
11108112b5
No ruins undo (#10376)
* Encapsulate Undo functionality

* Fix Ruins-Undo exploit

* Reorg RuinsManager candidate determination

* Deep RuinsManager clone

* Revert "Fix Ruins-Undo exploit"

This reverts commit 6df6a1a071.
2023-10-30 14:49:26 +02:00
Yair Morgenstern
c8365b8919 Easier location of mod errors, by specifying not only the name of the object with unique problems, but also the type 2023-10-30 13:32:13 +02:00
Yair Morgenstern
6ce685b719 Added test for both sides of filtering unique, to not raise mod warnings on both the filter and the filtered unique 2023-10-30 13:22:58 +02:00
Yair Morgenstern
d51b6a679d Tile generation condition parameters converted to fractions, to avoid errors 2023-10-30 12:44:34 +02:00
Yair Morgenstern
eb3f92c989 RulesetValidator reorg - instead of running 2 sets of unique checks for base rulesets and filtering out results from the first to get the second, we now separate and have one function for non-base-rulesets, and one for base rulesets. 2023-10-30 12:37:07 +02:00
Yair Morgenstern
fae5e84675 I was wrong, this is for *parameter severity* 2023-10-30 11:46:42 +02:00
Yair Morgenstern
674044a76f chore: General rename UniqueComplianceErrorSeverity -> UniqueErrorScope.
Each error has in fact 2 determiners: What the error *severity* is (probably ok, warning, error) and what the *scope* is (error regardless of what ruleset we're in, error because of the specific ruleset)

Having the warning be as part of the scope is...problematic, but that's for phase 2, this is just a rename
2023-10-30 11:45:51 +02:00
Yair Morgenstern
e76298b890
Version rollout (#10381)
* Bump version and create initial changelog entry

* update Simplified Chinese (#10371)

* Update Polish.properties (#10365)

* Two German spelling mistakes (#10345)

* spelling mistake in German translation

Handelsruten --> Handelsrouten

* Update German.properties

* Update Spanish.properties (#10341)

* Add missing translations to Ukrainian (#10339)

Co-authored-by: Kostiantyn Ko <mormat.iam@gmail.com>

* Update French.properties (#10338)

* Update Brazilian_Portuguese.properties (#10337)

* Update Italian.properties (#10336)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: TheKingOfLight <72839891+TheKingOfLight@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Kostiantyn Ko <test9@mormat.name>
Co-authored-by: Kostiantyn Ko <mormat.iam@gmail.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2023-10-29 19:16:25 +02:00
Oskar Niesen
6ff9f688a7
AI units swap-retreat (#10364)
* Added AI Unit retreat behaviour

* Reduced highest value to allow for variation

* Fixed distance calculations

* Tiles farther away are now checked first

* Units no longer try to retreat when at a far distance

* Changed unit priority values to account for unit health for retreating

* Units don't retreat while at peace

* canUnitSwapToReachableTile no longer removes the units from their tiles.

* Decreased retreat trigger range

* Renamed tryRetreat to trySwapRetreat to match its current functionality
2023-10-29 19:03:17 +02:00
SomeTroglodyte
eb33b7d513
Custom save/load UI tweaks and blocking saving online MP games locally (#10358)
* Allow typing Y and N in file names in Linux custom save file dialog

* Fix default custom save location suggestion on X11

* Minor linting

* Allow clean reactivation of custom buttons after cancelling the file chooser

* User-Cancel support on Android and non-X11 desktop

* Block custom save for online multiplayer games

* Fix X11 custom save remembering location

* Fix X11 custom save "Save" button enabling, forbid potentially bad names

* Add overwrite confirmation to X11 custom save

* Redefine how local saving of online multiplayer games is blocked
2023-10-29 19:00:45 +02:00
SomeTroglodyte
74cfda9854
Tighten RulesetValidator for Terrain (#10355)
* Tighten RulesetValidator for Terrain

* Fix unintended indentation (say that fast repeatedly)
2023-10-29 19:00:34 +02:00
SomeTroglodyte
5dde55a34b
Automated units stay automated after upgrade (#10361) 2023-10-29 19:00:22 +02:00
SomeTroglodyte
cf2ff124cf
Fix Mod checker crash on RekMod (#10349)
* Verbose exception for the original RekMod's Civilian crash

* Make ConstructImprovementInstantly validation gameInfo-agnostic

* Helpers to encapsulate repetitive Conditional test patterns, eliminating ruleset(), all ruleset access guarded

* Make ConditionalFirstCivToResearch actually work on Policies - ???

* Linting

* Revert params accessor helpers and reduce ConditionalFirstCivToResearch to tech only

* Implement ConditionalFirstCivToAdopt for nicer symmetry
2023-10-29 19:00:09 +02:00
Oskar Niesen
e214aa78d4
Melee units are now more likely to attack cities (#10363) 2023-10-29 18:59:47 +02:00
SomeTroglodyte
b178051bcf
City overview refreshes for changes done in a CityScreen called from it (#10367) 2023-10-29 18:59:27 +02:00
Oskar Niesen
4c5e6cbb29
Nukes now value hitting units directly more and will account for multiple military units on the same tile (#10346) 2023-10-29 18:59:16 +02:00
Oskar Niesen
cb661182ec
AI trading uses gold inflation (#10370)
* Fixed cities being sold for at most 1000 gold

* Replaced evaluateBuy/SellCost with evaluateBuy/SellCostWithInflation

* Fixed goldInflation being multiplied instead of divided

* Increased inflation modifier, lowering it's impact

* Changed inflation values to be lower

* Moved return value to be inline again (it was moved for testing)
2023-10-29 18:58:59 +02:00
SeventhM
bb954295ff
Fix [stats] unique adding multiple times (#10352)
* Fix [stats] unique adding multiple times

* Used the wrong function
2023-10-25 18:34:57 +03:00
Yair Morgenstern
8d0853f0a9 4.8.14 2023-10-23 10:23:47 +03:00
Yair Morgenstern
a2f2b1c009
Version rollout (#10334)
* Bump version and create initial changelog entry

* Update Bulgarian.properties (#10333)

* Update Bulgarian.properties

* Update Bulgarian.properties

* Update Bulgarian.properties

typo: thinkToSelect --> thingToSelect

* Update Spanish.properties (#10328)

* Update Spanish.properties

* Update Spanish.properties

* Update Indonesian.properties (#10327)

* Update Finnish.properties (#10326)

* Translate a number of strings to Ukrainian (#10322)

Co-authored-by: Kostiantyn Ko <mormat.iam@gmail.com>

* Update Swedish.properties (#10313)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Dob <100198047+dobval@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: kensvin <kensvin28@gmail.com>
Co-authored-by: Gekko03 <148203740+Gekko03@users.noreply.github.com>
Co-authored-by: Kostiantyn Ko <test9@mormat.name>
Co-authored-by: Kostiantyn Ko <mormat.iam@gmail.com>
Co-authored-by: Mr-Bajs <93934125+Mr-Bajs@users.noreply.github.com>
2023-10-23 10:08:47 +03:00
SeventhM
b687d84e54
Allow "[stats]" unique on terrains (#10324)
* Allow "[stats]" unique on terrains

* send stateForCondtitionals in method call
2023-10-23 10:02:58 +03:00
PLynx
2dfac21004
Added five new uniques (#10311)
* Added two new Conditional Uniques

These are:
- <when above [amount] gold>
- <when below [amount] gold>

* Added Remove Building unique

It has two parameters: buildingFilter and cityFilter

* Minor example update

* Applied the corrections proposed by SomeTroglodyte

* Update uniques.md

* Slightly changed an unique text

Removed "in" word from the unique

* Updated the Stat Conditional to support more stats

Now supports more stockpileable Stats
- Gold
- Faith
- Culture
- Science

* Added the game speed-adjusted conditionals

Now there are 5 uniques in my pull request

* Integrated the Stat and Resource Conditionals

Requested by @yairm210

* Applied the suggestions of @yairm210

* Applied the suggestions of @yairm210 again

I hope my PR is ready to merge
2023-10-23 10:02:42 +03:00
SomeTroglodyte
482900f07b
Fix android pause (#10318)
* Fix MusicController Pause handling for Android's pause event

* Revert inadvertent instrumentation change
2023-10-16 09:39:20 +03:00
SomeTroglodyte
9efefcce27
PolicyPickerScreen description links to Civilopedia (#10319) 2023-10-15 18:03:43 +03:00
SomeTroglodyte
c6f820b0f2
Remove UniqueTarget.Terrain from UniqueType.Stats as there is no implementation (#10321)
* UniqueType.Stats has no implementation for Terrain, remove UniqueTarget

* Generated Docs
2023-10-15 18:03:30 +03:00
Yair Morgenstern
bfa64ea18d
Version rollout (#10312)
* Bump version and create initial changelog entry

* Update Catalan.properties (#10310)

* Fix Manufactory name (#10306)

* Fix Manufactory name

Like, why on earth was it called the same as the factory??

* Update Spanish.properties

* Update Spanish.properties

* Update Japanese.properties (#10269)

* Update Japanese.properties

* Update Japanese.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: North Field <56919414+Harukin1030@users.noreply.github.com>
2023-10-13 11:42:15 +03:00
SeventhM
e587f28a88
Fix auto assign production not working after a building is built (#10299)
* Fix auto assign production not working after a building is built

* Fix issues in online multiplayer and remove validation in addbuiling
2023-10-13 11:38:43 +03:00
SeventhM
3eff519264
Fix consuming resources not being affected by conditionals (#10270)
* Fix consuming resources not being affected by condtionals

* Add requirements from buildings back in

* one too many parenthesis

* Whoops, forgot a bracket

* Fix Iconstruction

* Accidental font regression

* Address suggested changes
2023-10-13 11:37:57 +03:00
SomeTroglodyte
249241247b
Allow games with zero researched techs to be 'before' the Ancient Era (#10309) 2023-10-12 20:38:36 +03:00
SomeTroglodyte
353a2c8153
Minor Fix: VictoryScreenIllustrations (#10298)
* Fix VictoryScreenIllustrations

* Remove obsolete line
2023-10-09 22:31:13 +03:00
SomeTroglodyte
13e3baac74
Split Fonts.kt (#10267)
* Fix font "symbols" not showing

* Move Fonts.kt to sub-package

* Re-sort imports

* Move top-level constants to prepare split

* Split Fonts.kt each existing class to its own file

* Split off FontRulesetIcons

* Linting and comments
2023-10-08 22:03:53 +03:00
SomeTroglodyte
6d4603431b
Fix font "symbols" not showing (#10266) 2023-10-08 21:38:23 +03:00
Yair Morgenstern
6dc7f0ec4c chore: 'use gold' automation from NextTurnAutomation
Cleaned up Tile.kt a bit by moving single-use functions to where they are used
2023-10-08 17:15:53 +03:00
Yair Morgenstern
dd67a7d3df chore: Extract city resource functions from City file 2023-10-08 13:06:48 +03:00
Yair Morgenstern
ee9f735e9f chore: Removed dead functions 2023-10-08 12:56:59 +03:00
Yair Morgenstern
8293d78ec5 chore: Split 'city state civ diplomacy table' from DiplomacyScreen 2023-10-08 12:44:48 +03:00
Yair Morgenstern
9c2a8a6406 chore: Split 'major civ diplomacy table' from DiplomacyScreen 2023-10-08 11:57:58 +03:00
Yair Morgenstern
2bd65f9f42 chore: Extracted all 'next turn' logic from DiplomacyManager to DiplomacyTurnManager 2023-10-08 11:48:33 +03:00
Yair Morgenstern
b2a29f1be2 4.8.12 2023-10-07 22:33:00 +03:00
Yair Morgenstern
e7aef72e93
Version rollout (#10264)
* Bump version and create initial changelog entry

* Update Dutch.properties (#10260)

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update German translation (#10256)

* Update Spanish.properties (#10251)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: EmperorPinguin <99119424+EmperorPinguin@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
2023-10-07 22:18:29 +03:00
Yair Morgenstern
d714b00dd7
Separate unit automation from other actions (#10248)
* Separate unit automation from other actions

* Change field name
2023-10-07 22:02:22 +03:00
Oskar Niesen
a81d5f0837
AI now uses free tech points (#10245)
* AI now uses free tech points

* Refactored chooseTechToResearch

* Reverted combining lists to use a +
2023-10-07 22:00:49 +03:00
SomeTroglodyte
49e2979427
Align ruleset icons in text to font metrics (#10233)
* Try to respect actual font layout, so fontSizeMultiplier works for ruleset icons too

* Replace font-based nation symbol in top bar with statically sized actor

* Reuse getReadonlyPixmap in extractPixmapFromTextureRegion

* Tweak topbar selected civ vertical align to be more pleasing to the human eye

* FasterUIDevelopment missing implementation of FontMetricsCommon

* Address hardcoded pixel coordinates comment

* Readability and comment cleanup

* More readability changes
2023-10-07 22:00:30 +03:00
SomeTroglodyte
459b00ee22
Pure package reorg: Widgets (#10261)
* Move AutoScrollPane

* Move BorderedTable

* Move ColorMarkupLabel

* Move ExpanderTab

* Move KeyCapturingButton

* Move LanguageTable

* Move SortableGrid

* Move TabbedPager

* Move TranslatedSelectBox

* Move UncivSlider

* Move UnitGroup

* Move WrappableLabel

* Move ZoomableScrollPane
2023-10-07 19:25:06 +03:00
Yair Morgenstern
8e7a467496 chore: Separated 'declare war' logic from DiplomacyManager 2023-10-05 10:55:17 +03:00
Yair Morgenstern
7185fea243 chore: Split MapGenerationRandomness from MapGenerator 2023-10-05 10:38:47 +03:00
Yair Morgenstern
15c8f808c4
Version rollout (#10247)
* Bump version and create initial changelog entry

* Update Russian.properties (#10243)

* Update French.properties (#10241)

* Update Polish.properties (#10231)

* Update Brazilian_Portuguese.properties (#10227)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Anoant <143289571+Anoant@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
2023-10-05 10:29:59 +03:00
SomeTroglodyte
5541407a3a
Fade in and out for City Ambiance Sounds (#10230)
* Extend MusicController to allow one extra 'overlay' track

* Reduce CityAmbiencePlayer to a proxy for MusicController's 'overlay'

* Treat all the LongLine complaints
2023-10-05 10:25:06 +03:00
SomeTroglodyte
a4e3617037
Fix Tutorial loader for mods on Android (#10229) 2023-10-05 10:24:54 +03:00
SomeTroglodyte
ed97c5b0ea
Notifications remove backward compatibility (#10228)
* Remove backwards compatibility code from Notification serializer

* Notification constructor simplified

* One measly typo
2023-10-05 10:24:27 +03:00
Oskar Niesen
8c6e046fc8
Defensive pact button shows on both sides when a DoF is about to end (#10237) 2023-10-05 10:24:19 +03:00
Oskar Niesen
8e355568e0
Defensive pact functionality is now canceled with otherCiv before calling in defensive pact allies (#10238) 2023-10-05 10:24:09 +03:00
SomeTroglodyte
b97339381a
Fix ai buy tiles (#10239)
* Fix TriedToBuyNonContiguousTileException crash from NextTurnAutomation maybeBuyCityTiles

* Descriptive exceptions messages from buyTile
2023-10-05 10:23:53 +03:00
SomeTroglodyte
815df1bcc4
Some religion stuff (#10242)
* Enable HiddenWithoutReligion to work directly on a Tutorial

* Remove religious units from Vanilla

* Fix limited uses of Missionary and Prophet
2023-10-05 10:23:25 +03:00
Yair Morgenstern
674b12a919 Resolved #10240 - Great Prophets spawn again 2023-10-05 10:22:53 +03:00
Yair Morgenstern
f812c828e5 chore: Split 'head towards enemy city' into subfunctions
Quite complex for a seemingly simple task, that's why it gets its own object
2023-10-04 23:22:16 +03:00
Yair Morgenstern
7503493d7d chore: Split civilian unit automation into separate file
Also limited missile automation to air units only, doesn't make sense for land-based self-destructing units to follow missile automation
2023-10-04 22:56:14 +03:00
Yair Morgenstern
f4b7822728 chore: Split SpecificUnitAutomation into air units and religious units, with the remainder being mostly great person automation but also a few 'others' so I'm not renaming it 2023-10-04 22:39:25 +03:00
Yair Morgenstern
f46b3fc62b chore: clarified double movement in movement cost 2023-10-04 22:06:17 +03:00
Yair Morgenstern
0d50b928ea chore: Separated movement cost from unit movement file 2023-10-04 22:00:37 +03:00
Yair Morgenstern
5b3c3f3aaf chore: move UnitMovement to subfolder, for splitting 2023-10-04 21:53:14 +03:00
Yair Morgenstern
4e8b454284 fix broken links from capture reorg 2023-10-04 21:39:58 +03:00
Yair Morgenstern
510fd7927a chore: Separated capturing logic out from Battle 2023-10-04 21:00:09 +03:00
Yair Morgenstern
bcd5c361df Civilian units can get promotions upon being built
Promotions with no icon get default star icon
2023-10-04 00:53:39 +03:00
Yair Morgenstern
9e089bd91d chore: Simplified interception notifications 2023-10-03 13:15:00 +03:00
Yair Morgenstern
f503737e15
Version rollout (#10225)
* Bump version and create initial changelog entry

* Update Simplified_Chinese (#10214)

* Update Polish.properties (#10212)

* Update Polish.properties

* Update Polish.properties

* Update Polish.properties

* Update Russian.properties (#10211)

Add required translations and one missing; also some corrections

* Update Italian.properties (#10210)

* Update Brazilian_Portuguese.properties (#10203)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Nicolas Flamme <nclsf87@gmail.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
2023-10-03 13:04:53 +03:00
Yair Morgenstern
205743e11f chore: Separated Nuke function into subfunctions 2023-10-03 13:04:20 +03:00
Yair Morgenstern
ec1451c9e9 chore: Separated Air Interception logic into separate object 2023-10-03 12:40:42 +03:00
Yair Morgenstern
cc6ab7f7d5 chore: Separated Nuke logic into separate object 2023-10-03 12:32:39 +03:00
Framonti
348910dcf7
🐛 fix golden age points computation to consider negative happiness (#10224) 2023-10-03 12:11:21 +03:00
Oskar Niesen
b16cbc1b0c
City-States don't trigger defensive pacts (#10221) 2023-10-03 12:11:13 +03:00
SomeTroglodyte
ccddf1e018
City overview Fix Hotfix (#10220)
* Hotfix kludge to make City Overview behave when not taking up all screen width

* Guard against unsupported SortableGrid config
2023-10-03 12:11:03 +03:00
SomeTroglodyte
937f21188c
Fix activating unit art in civilopedia crashes (#10215)
* Fix activating unit art in civilopedia crashes

* Remove testing code
2023-10-03 12:10:53 +03:00
SeventhM
98533b91f9
Reimplement and fix #10142 (#10213)
* Test Free Buildings

* Flip the order of logging free buildings to avoid loops with stat buildings

* unprivate constructionComplete for the notification and add validating the queue to addBuilding

* reimplement #10142

* Switch free buildings in cityFilter to also use constructionComplete for consistency
2023-10-03 12:10:43 +03:00
Yair Morgenstern
3eff497bd8 chore: More luxury assignment into the new object 2023-10-03 11:53:50 +03:00
Yair Morgenstern
2582d913d3 chore: Separated luxury resource placement logic into a separate object 2023-10-03 11:42:07 +03:00
Yair Morgenstern
a2a5cb7c2c chore: Separated minor civ placement into a separate object 2023-10-03 11:22:17 +03:00
Yair Morgenstern
e1a33f2116 chore: Separated start normalization into a separate object 2023-10-02 12:26:35 +03:00
Yair Morgenstern
f52e7d37f4 chore: Split normalizeStart into subfunctions for easier parsing 2023-10-02 12:06:16 +03:00
Yair Morgenstern
f90d8ba267 chore: Separated MapRegionResources with more functions related to placing resources in tiles 2023-10-02 11:38:57 +03:00
Yair Morgenstern
4d81a62b8f chore: Started splitting resource functions into separate class from MapRegions 2023-10-02 11:27:00 +03:00
Yair Morgenstern
1e085eb60a chore: Split MapRegions into class files, first step of refactor 2023-10-02 11:10:48 +03:00
Yair Morgenstern
9386e4a7ce 4.8.9-patch2 2023-10-01 16:04:04 +03:00
Yair Morgenstern
43ff2ac1f5 Fixed unique validation refactor breaks 2023-10-01 15:29:04 +03:00
Yair Morgenstern
c4aeb4d32a chore: Split conditional unique validation to separate function 2023-10-01 15:09:54 +03:00
Yair Morgenstern
6d56fafbbe chore: Split RulesetValidator into subfunctions for easier parsing, and separate class for unique validations 2023-10-01 14:46:45 +03:00
Yair Morgenstern
c15e72c25a Resolved #10194
Problem was that updating the select box was inconsistent
Simplified by
- Separating 'do we have maps' and 'do we have recent maps' logic from the loading of all maps
- Map loading done in one continuous thread not one-per-map
- Only the map-loading thread triggers selectbox load
2023-10-01 14:31:50 +03:00
Yair Morgenstern
ffd77c82d8 4.8.9-patch1 2023-10-01 13:52:00 +03:00
Yair Morgenstern
98ef5186af Revert "Apply conditionals for free buildings to the destination city instead of the originating city (#10142)"
This reverts commit 7288b0a442.
2023-10-01 13:50:02 +03:00
Yair Morgenstern
8f00871044 performance: calculate current settler tile rank once, when comparing to other settlers around on first turn 2023-10-01 13:47:12 +03:00
Yair Morgenstern
ffc3a66707 Converted "May enhance a religion" unique to a UnitAction 2023-10-01 12:11:52 +03:00
Yair Morgenstern
6dbf240899 Converted "May found a religion" unique to a UnitAction 2023-10-01 12:01:54 +03:00
Yair Morgenstern
de32223c36 Added UnitAction unique type for modder clarity and ruleset validation 2023-10-01 11:12:26 +03:00
Yair Morgenstern
6a2b483640 4.8.9 2023-10-01 10:17:19 +03:00
Yair Morgenstern
736d737abf
Version rollout (#10202)
* Bump version and create initial changelog entry

* Update Spanish.properties (#10201)

I'm not sure about using an  '@' for indicating both grammatical genres.

I mean, the current use is not wrong, but it bothers me that something's genres are feminine/masculine and the article used is the opposite.

On the other side, I don't know if it looks clean, nice or professional to use these variants, not only the '@', but the '/a' as well.
But it really calms my mind.

* Add required Russian translations (#10200)

* Update Bulgarian.properties (#10193)

* Update Italian.properties (#10191)

* Update Italian.properties

* Update Italian.properties

* Update German translation (#10189)

* Update Brazilian_Portuguese.properties (#10188)

* Update Polish.properties (#10186)

* Update Polish.properties

* Update Polish.properties

* Update French.properties (#10185)

* Update Simplified_Chinese.properties (#10184)

6365 rows. The value is wrong. "Units heal 10 health per turn in enemy territory or neutral land"  should translate to "在异国领土和无主的领土上,每回合会恢复10点生命值" and not "在异国领土和无主的领土上,每回合会恢复15点生命值"。

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Nicolas Flamme <nclsf87@gmail.com>
Co-authored-by: Dob <100198047+dobval@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
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>
Co-authored-by: liweishu <44702553+liweishu@users.noreply.github.com>
2023-10-01 10:12:46 +03:00
SomeTroglodyte
8f7acf37d2
Pedia pixel units (#10187)
* Display Pixel Unit Art in Civilopedia

* Pixel Unit Art in Civilopedia - Setting UI

* Change FormattedLine.extraImage sizing to apply to longer coordinate

* Pixel Unit Art in Civilopedia - better centering using 'crop to content'
2023-10-01 09:45:02 +03:00
SomeTroglodyte
9ade2fbcc5
Fix top bar layout (#10190)
* Fix topbar layout never going back to default un-moved floating buttons

* Tweak topbar resources layout so the half-moved floating buttons triggers earlier, and swap turns label back to the left
2023-10-01 09:44:19 +03:00
SeventhM
7288b0a442
Apply conditionals for free buildings to the destination city instead of the originating city (#10142)
* Apply conditionals for free buildings to the destination city instead of the originating city

* Attempt 1 at addressing issues

* Forgot matching uniques for cities

* Forgot import

* Remove the intended(?) non functional removal of free buildings on capture
2023-10-01 09:44:05 +03:00
SomeTroglodyte
0f75947d18
City overview restore fixed header (#10197)
* More SortableGrid comments

* Fix City Overview header row

* CityOverviewTab minor lint

* Documentation for the 'Gdx Scene2D debug' option

* Lint - TabbedPager sort imports and some spaces
2023-10-01 09:43:53 +03:00
Yair Morgenstern
6d6dc51bea
Get rid of old religion style actions!!! (#10192)
* Giant refactoring - get rid of old religion style actions!!!

* Added special promotion to replace Great Mosque of Djenne ability

* removed double promotion added my mistake

* Added AI recognition of cities with bonus spread religion charges

* Added "disallowed for pantheon" filtering to new unit actions

* merge unit action changes with religion action changes

* Use new invokeUnitAction function for simplicity

* revert inquisitor unique change used for tests

* separate modifier side effects from old-style side effects

* Use canUSe shorthand for clarity
2023-10-01 09:43:26 +03:00
Yair Morgenstern
2560d73f7d #10183 - Can still spectate AI-only matches in singleplayer 2023-09-28 21:03:47 +03:00
Yair Morgenstern
bb0dca8651 resolved #10183 - New online multiplayer no longer stuck when first player is human spectator 2023-09-28 21:01:16 +03:00
Yair Morgenstern
190d488c06 modding: Mod checker displays *all* unknown uniques 2023-09-28 20:46:31 +03:00
Yair Morgenstern
c14a94fa15 Unify 'get usable unit action uniques' to function 2023-09-28 16:37:35 +03:00
Yair Morgenstern
03e09d85ee refactor: introduced UnitActions.invokeUnitAction() to unify automation logic for unit actions 2023-09-28 15:45:21 +03:00
Yair Morgenstern
d1b2d652e3 reorg: Separated UnitActions into 3 files:
- UnitActionsFromUniques
- UnitActionModifiers
- UnitActions retains actions relevant to all units
2023-09-28 15:30:39 +03:00
Yair Morgenstern
6ffe13e780 "if it hasn't used other actions yet" conditional works with new limited unit actions ("<[amount] times>") - paves the way for real deprecation of religion action shenanigans 2023-09-28 09:25:35 +03:00
Yair Morgenstern
2363269814 AI 'found religion' takes the action from the list of unit actions, so player and AI ability to act are always the same 2023-09-28 09:11:34 +03:00
Yair Morgenstern
45db7ade2e isTriggerable fixed to reinclude timed uniques 2023-09-27 23:25:53 +03:00
Yair Morgenstern
50e0c0f4e0 refactor: unified 'is triggerable' logic 2023-09-27 18:04:48 +03:00
Yair Morgenstern
b6f3c8571f chore: Move files to correct folders 2023-09-27 13:19:13 +03:00
Yair Morgenstern
f69209029d performance: #10173 - Use string-to-type map to initialize type for uniques, this is the major time component of unique creation 2023-09-26 17:44:34 +03:00
Yair Morgenstern
5d22482a56
Version rollout (#10182)
* Bump version and create initial changelog entry

* Update Dutch.properties (#10174)

* Update Turkish.properties (#10171)

* Update Turkish.properties

Almost fully translated up to line 950 with very few lines untranslated to that point.

(do let me know if I did anything wrong I never used github before)
(but I did read the translating text so I did not change things like [amount])

* Update Turkish.properties

Changed a few things and translated up to 1000~

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

* Update Simplified_Chinese (#10168)

* Update Spanish.properties (#10166)

* Update French.properties (#10165)

* Update Polish.properties (#10164)

* Update Italian.properties (#10163)

* Update Brazilian_Portuguese.properties (#10162)

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: TheFighter <95092927+The-Fighter@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@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>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
2023-09-26 17:36:45 +03:00
Yair Morgenstern
9c930347c3 performance: #10173 - Don't need to always create hashsets, don't need linked hash set 2023-09-26 16:56:16 +03:00
Yair Morgenstern
d5dffa928a performance: #10173 - Only check promotion circular references once, not once per promotion 2023-09-26 16:46:05 +03:00
Yair Morgenstern
59af72da3f performance: #10173 - Cache unique parameter validity for the same ruleset 2023-09-26 15:57:28 +03:00
Yair Morgenstern
d62408fd31 performance: Only build strings in ruleset validation when necessary 2023-09-26 14:56:46 +03:00
Oskar Niesen
700e24166a
AI Open Borders Offer fix (#10178)
* Increased declined flags time

* AI now only offers open borders if it has the relevant technologies

* Increased the factor of AIs wanting to fight instead of sign open borders
2023-09-26 14:47:25 +03:00
Oskar Niesen
920d819595
Fix Nuke Notification (#10167)
* Added notifications to Civs that didn't have tiles hit by nuke

* Changed notifications based on if the nuke fails to detonate

* Moved nuke notifications above unit hit notification

* Added translations for new messages

* Moved a line of code back to preserve original order

* Changed notification messages
2023-09-26 14:47:13 +03:00
SomeTroglodyte
1ec83c62bd
Fix City construction context menu changing Puppets (#10180) 2023-09-26 13:24:43 +03:00
Yair Morgenstern
0400bb5f51
Version rollout (#10161)
* Bump version and create initial changelog entry

* Update German translation (#10160)

* Russian.properties (#10156)

* Update Russian.properties

* Update Russian.properties

* Update French.properties (#10149)

* Update Brazilian_Portuguese.properties (#10148)

* Update Polish.properties (#10147)

* Update Italian.properties (#10145)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Anoant <143289571+Anoant@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@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: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2023-09-21 15:03:57 +03:00
Oskar Niesen
5fc49f8e22
Added return worker notification (#10140)
* Fixed owner not being notified when a worker is returned

* Changed notification to use a sequence of actions
2023-09-21 15:00:37 +03:00
SomeTroglodyte
4fcbd48662
Reorganize and fix WorldScreenTopBar (#10154)
* Reorganize WorldScreenTopBar and change its update to rebuild the cells instead of tweaking layout

* Fix layout error: filler backgrounds looking too small
2023-09-21 15:00:13 +03:00
SomeTroglodyte
b6db8df484
Allow Space Key to close PlayerReadyScreen (#10155) 2023-09-21 14:59:34 +03:00
Oskar Niesen
5a8f18f726
Liberate civ open borders fix (#10150)
* Liberating a city from a destroyed Civ now gives open borders

* Conquering civ no longer offers open borders to the civ being liberated.
2023-09-21 14:59:22 +03:00
Yair Morgenstern
0d942ac175 Reload images when downloading or removing a mod 2023-09-21 14:58:23 +03:00
Yair Morgenstern
92b71102e1 Fixed mod compatibility autochanges
Tested by forcing a new Deciv game to load with a much older mod version
2023-09-21 14:37:21 +03:00
Yair Morgenstern
ebfdbb8c4a debug: More details for destination tile when failing to move to a tile 2023-09-21 14:17:42 +03:00
Yair Morgenstern
7de4853b54 resolved #10137 - mod checker accepts era for unit type 2023-09-18 10:01:50 +03:00
Yair Morgenstern
6585cc0eb0
Version rollout (#10143)
* Bump version and create initial changelog entry

* Update Catalan.properties (#10138)

* Update Russian.properties (#10136)

* Update Russian.properties

* Update Russian.properties

Corrections of aztecs cities

* Update Polish.properties (#10134)

* Update Dutch.properties (#10133)

* Update Brazilian_Portuguese.properties (#10132)

* Update Bulgarian.properties (#10131)

* Update Spanish.properties (#10129)

* Update Polish.properties (#10128)

* Update Italian.properties (#10123)

* Update French.properties (#10122)

* Update Russian.properties (#10120)

* Update German translation (#10118)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Anoant <143289571+Anoant@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Dob <100198047+dobval@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: hotorcelexo <IgorPolyakov@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
2023-09-18 10:00:09 +03:00
Oskar Niesen
cc1624604e
AI diplomatic actions rework (#10071)
* AI now can offer declaration of friendship

* AI now offers open borders

* Added spectator notifications for DoFs and defensive pacts

* AI now wants friendship less as more Civs die

* Re-added spectator notifications that weren't added in the merge

* Replaced min with coerceAtLeast

* Replaced .filter and .count() with .count

* Removed some minus DoF motivation modifiers being in a military focus.

* Fixed AI offering open borders with City-States

* AI now signs defensive pacts

* Increased motivationToAttack weight when determining value of a declaration of friendship

* Removed double trade processing and notifications from Treaties

* Removed commented code

* Added wantsToSignDefensivePact

* Added defensive pact trade evaluation

* Revert "Removed commented code"

This reverts commit 6476a08d26.

* Revert "Removed double trade processing and notifications from Treaties"

This reverts commit 371e8e8a62.

* Changed wantsToSignDefensivePact to use a for loop

* Changed chance to consider offering a defensive pact back to 30%

* Added DeclinedOpenBordersFlag

* Added DeclinedDeclarationOfFriendshipFlag

* Civ AI now has a positive modifier when friends with under 1/4 of alive Civs

* AI values friendship based also on relative strength

* Changed AI valueing of a defensive pact

* AIs not use DeclinedDeclarationOfFriendship flag

* Fixed otherCivNonOverlappingDefensivePacts causing error with unmet Civs
2023-09-18 09:48:22 +03:00
SomeTroglodyte
ae19a7bd0a
Readability helpers for Map of Sets: add, contains (#10116) 2023-09-18 09:46:55 +03:00
SomeTroglodyte
a3d431155d
A "Status" column for City Overview (#10126)
* Avoid the detekt false positive for typed lambda `it` and its comment

* Fix regression of what-is-a-garrison (8952)

* Initial implementation of "Status" column

* "Status" column gets a header icon
2023-09-18 09:46:29 +03:00
SomeTroglodyte
e59426fb03
Generic Widget/Provider framework for sortable grids (#8962)
* City Overview reorg - adding a Column should get easier

* City Overview reorg - patch

* City Overview reorg - SortableGrid Widget

* SortableGrid Widget - cleanup

* Generalize equalizeColumns

* SortableGrid framework - cleaner v2

* Revert file rename to facilitate merge

* Post-merge missed change

* SortableGrid merge fix

* Resolve wildcard import

* Post-merge fix: showOneTimeNotification

* Post-merge fixes

* Post-merge cleanup

* More Post-merge cleanup

* Fix sort (bug symptom: dependence on column click order)

* Tooltip update to "fix" icons if hideIcons=false

* Allow hideIcons control for grid header Tooltip

* Lint String.tr() Kdoc

* Move getComparator() default implementation to interface

* Nicer getComparator() implementations, better sorting for WLTK column

* Fix "Tooltip update to "fix" icons" reverting tooltip color

* Suppress detekt false positives

* Fix merge error
2023-09-13 19:42:22 +03:00
Yair Morgenstern
0be6cd062f 4.8.5 2023-09-13 11:17:57 +03:00
Yair Morgenstern
55809c9b22 Unique deprecation - "Receive free [unit] when you discover [tech]" replaced with trigger + condition, tested 2023-09-13 11:11:37 +03:00
Yair Morgenstern
550e18689a
Version rollout (#10115)
* Bump version and create initial changelog entry

* Update Korean.properties (#10112)

* Update Polish.properties (#10110)

* Update Brazilian_Portuguese.properties (#10109)

* Update Simplified_Chinese (#10108)

* russian (#10106)

* Update Russian.properties

Corrections some cities

* Update Russian.properties

def. pact with..

* Update Spanish.properties (#10105)

* Japanese translation (#10104)

* Randomly chose not translated strings.

* Some more translation

* Some more translation

* Added more translation

* Chinese names

* Update Japanese.properties

Fixed 2 typos

* Update Catalan.properties (#10103)

* Update French.properties (#10102)

* Update German translation (#10099)

* Update Italian.properties (#10098)

* Update Italian.properties (#10097)

Co-authored-by: Tommaso Petrolito <tpetrolito@deloitte.it>

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Yattong the Mackerel <saud2410@naver.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: Anoant <143289571+Anoant@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: 有賀 清一 Seiichi Ariga <seiichi.ariga@gmail.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: TommasoPetrolito <tommasouni@gmail.com>
Co-authored-by: Tommaso Petrolito <tpetrolito@deloitte.it>
2023-09-13 10:33:59 +03:00
Oskar Niesen
16d716d794
Removed double notifications and processing of treaties when traded (#10101)
* Removed double notifications and processing of treaties when traded

* Added comment to only processing one side of the trade
2023-09-13 10:28:07 +03:00
SomeTroglodyte
8e3ebc7724
Global Constructions Blacklist (#10061)
* Improved handling of "Nothing" construction

* Suppress "All" entries when you have only one city

* Global Construction Blacklist

* Reviews

* Reviews - missed renames
2023-09-13 10:27:43 +03:00
SomeTroglodyte
8aeae30050
Prevent selling free buildings (#10094)
* A few yield extensions - use in existing code to do later

* Refactor getFreeBuildings to allow hasFreeBuilding not enumerating all

* Prevent selling free buildings - with a little easter egg

* Test translatability

* Shift "Free Building" methods towards preferring object parameters

* Remove easter egg

* Linting and improving Kdoc precision

* Linting and improving Kdoc precision: CityConstructions
2023-09-13 10:27:32 +03:00
SomeTroglodyte
6016754a18
Defense against Circular upgrade paths in mods (#10114)
* Convert stack overflow into explicit exception when a mod has recursive unit upgrade/replaces

* RulesetValidator detects recursive unit upgrade/replaces
2023-09-13 10:26:47 +03:00
Yair Morgenstern
824b0d2af9
Version rollout (#10096)
* Bump version and create initial changelog entry

* Update Korean.properties (#10093)

* Update Spanish.properties (#10084)

* Update Italian.properties (#10082)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Yattong the Mackerel <saud2410@naver.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2023-09-11 09:47:55 +03:00
SeventhM
c2acdadc50
Fix unique Great Prophets not having the correct cost when buying at an increasing cost (#10095) 2023-09-11 09:29:25 +03:00
SeventhM
2061b2cc03
Fix free units with a build limit not spawning (#10091)
* Fix free units with a build limit not spawning

* Flip the amount when at the limit

* Unrelated linting
2023-09-11 09:29:18 +03:00
SeventhM
fbb516f90f
Fix AI getting stuck when it can't promote with enough xp (#10089)
* Fix AI getting stuck when it can't promote with enough xp

* Reverse the check for promotions

* Forgot to remove extra break
2023-09-11 09:29:06 +03:00
SomeTroglodyte
19f9cba058
Allow the Space key to close Alert popups with no actual choice (#10085) 2023-09-11 09:28:59 +03:00
Oskar Niesen
c3484381c3
Fixed politics tab not showing defensive pacts (#10079)
* Override DoF displayed on Politics table with defensive pact when applicable and added CYAN color to table and diagram.

* City-state alliances now show as CYAN in the politics table
2023-09-11 09:28:52 +03:00
Yair Morgenstern
a68f7db463
Version rollout (#10080)
* Bump version and create initial changelog entry

* Update Polish.properties (#10075)

* Update Brazilian_Portuguese.properties (#10074)

* Update Russian.properties (#10073)

* Update Russian.properties

* Update Russian.properties

New string and corrects

* Update Russian.properties

#2

* Update Russian.properties

*3

* Update German translation (#10069)

* Update Dutch.properties (#10067)

* Update French.properties (#10066)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Anoant <143289571+Anoant@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
2023-09-07 10:13:19 +03:00
Yair Morgenstern
30570747a8
Unify placeholder parsing for unique parameters (#10072)
* Unify placeholder parsing for unique parameters

* Remove double "remove conditional" call - kudos @SomeTroglodyte
2023-09-07 09:57:40 +03:00
Yair Morgenstern
55a3fa2a75 cleanup: Copy Zero vectors before passing to localToStageCoordinates (#10048) 2023-09-06 12:38:14 +03:00
Framonti
538330db87
Test/refactor target helper and test it (#10048)
* ♻️ merge together two branches executing same code

* ♻️ swap if-else chain with when to improve readability

* ️ swap conditions to first check the lighter computationally-wise

* ♻️ extract method to increase readability

* 💚 add some tests for TargetHelper

* 💡 add comment explaining how Unciv grid system works using a graphical example

* 💚 add other tests

* ♻️ change method name to better reflect what it does

* 🐛 fix import after rebase

* 🔥 remove parameter when value is the default and use static field for Vector2(0f, 0f)

* ♻️ split setTileTerrainAndFeatures in two different methods

* ♻️ update older tests to use the new functions
2023-09-05 22:25:28 +03:00
Yair Morgenstern
4f9dc953cb
Version rollout (#10065)
* Bump version and create initial changelog entry

* Update Polish.properties (#10057)

* Update German translation (#10056)

* Update Spanish.properties (#10051)

* Update French.properties (#10049)

* Update Italian.properties (#10046)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2023-09-05 19:10:29 +03:00
SomeTroglodyte
855b2959a1
Fix Map Editor double map holders after ruleset change (#10047)
* Fix Map Editor double map holders after ruleset change

* Fix buttons are vertical in AskFitMapToRulesetPopup

* Sort imports over mapeditor package
2023-09-05 19:02:36 +03:00
SomeTroglodyte
5bccc4abf3
Fix longpress triggering when an onClick discards its actor (#10052) 2023-09-05 19:02:27 +03:00
Oskar Niesen
eec3732c96
Defensive pact notification fix (#10025)
* Fixed Civ getting two notifications of canceling their defensive pact when attacking.

* Added Defensive Pact related warnings to the Declare War popup

* Improved the warning to not include Civs that are already at war with the aggressor

* Improved the warning to not include Civs that are already at war with the aggressor

* Added defensive pact related warning translations

* Refactored removeDefensivePacts

* DeclareWarButton text now uses arrayListOf<String> and changed the for loop to a while loop

* Extracted the DeclareWarButton text to a new method.
2023-09-05 19:01:45 +03:00
Yair Morgenstern
5cc57f9293 performance: Don't calc checksum for non-multiplayer games, no one cares if you hack your own game 2023-09-05 18:52:42 +03:00
SomeTroglodyte
a2fa4cebf4
Improve BaseUnit hasUnique(FoundCity) handling (#10063) 2023-09-05 15:40:55 +03:00
SomeTroglodyte
f7069851c7
Fix Gdx not forced to UTF-8 when saving a game (#10062) 2023-09-05 14:35:54 +03:00
Yair Morgenstern
e58dd7c1f6 Buildings missing from ruleset are removed from loaded games *properly* 2023-09-04 16:42:21 +03:00
Yair Morgenstern
9fd7ddf050
Version rollout (#10044)
* Bump version and create initial changelog entry

* Update German translation (#10042)

* Update Brazilian_Portuguese.properties (#10039)

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

* Update French.properties (#10037)

* Update Swedish.properties (#10035)

* Update Swedish.properties

* bracket fix

* Update Spanish.properties (#10034)

* Update Russian.properties (#10033)

* Update Bulgarian.properties (#10032)

* Update Bulgarian.properties

* Update Bulgarian.properties

* Update Bulgarian.properties

* Update Bulgarian.properties

* Update Polish.properties (#10030)

* Update Polish.properties

* Update Polish.properties

* Update Polish.properties

* Update Polish.properties

* Update Polish.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Mr-Bajs <93934125+Mr-Bajs@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Anoant <143289571+Anoant@users.noreply.github.com>
Co-authored-by: Instrumentarium <143902440+Instrumentarium@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
2023-09-04 15:02:51 +03:00
Yair Morgenstern
06691d429e Resolved #10011 - Teleport units away from city center when liberating 2023-09-04 14:58:48 +03:00
Yair Morgenstern
1037b3d240 Resolved #10031 - don't add icons to selection boxes 2023-09-04 14:41:47 +03:00
Yair Morgenstern
743c90d454 chore: Moved TranslatedSelectBox to its own file in ui.components - see #10031 2023-09-04 14:41:05 +03:00
SeventhM
d19281e0e6
Add unique for a promotion to be free (#10015)
* Add unique for a promotion to be free

* Have Ai prefer free promotions

* Allow AI to get multiple promotions each step
2023-09-04 14:37:59 +03:00
Oskar Niesen
087c2a0946
Fixed AI unit attack decision making (#10036)
* Limited the impact of a high attacksToKill value

* Fixed chooseAttackTarget returning nothing when attackableEnemies only has one element
2023-09-04 14:37:44 +03:00
SeventhM
ac5e51dbea
Fix cities getting the resource list of other cities (#10041) 2023-09-04 14:37:06 +03:00
SomeTroglodyte
d758da4d11
Fix ChangesTerrain unique for base terrains (#10043)
* Fix UniqueType.ChangesTerrain not working for base terrain parameter

* Fix spawnRiver resultingTiles to include all affected tiles on both sides of the River

* Fix terrain conversion for rivers from Map Editor partial generation / paint from-to

* forEach linting

* Instrumentation for generateSingleStep

* forEach linting

* Remove lazies
2023-09-04 14:36:52 +03:00
Yair Morgenstern
8b9d0af4bf 4.8.0 2023-09-03 09:55:02 +03:00
Yair Morgenstern
057a7ce9b5
Version rollout (#10029)
* Bump version and create initial changelog entry

* Update Dutch.properties (#10023)

* Update Simplified_Chinese.properties (#10020)

* Update Italian.properties (#10019)

* Update Russian.properties (#10017)

* Update Russian.properties

Defensive pacts

* Update Russian.properties

Some lines

* Update Spanish.properties (#10016)

* Update Spanish.properties

* Correct Kongo name

* Update French.properties (#10013)

* Update German translation (#10008)

* Update German translation

* Update German translation

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: qw142536 <123065131+qw142536@users.noreply.github.com>
Co-authored-by: TommasoPetrolito <tommasouni@gmail.com>
Co-authored-by: Anoant <143289571+Anoant@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
2023-09-03 09:42:57 +03:00
SomeTroglodyte
ca160b56fa
City construct menu (#9961)
* Some preparation refactoring

* Some preparation API extension

* Initial constructions context menu

* More CityConstructions API clarification

* Templates and KeyBindings

* Fix quirks and prettify highlighting issues
2023-09-03 09:36:11 +03:00
SeventhM
dcb50bbbf5
Fix: "Only available" not working properly for religions or transforming/upgrading units (#10012) 2023-09-03 09:32:40 +03:00
SomeTroglodyte
bb3335aaa8
Pedia Search (#9997)
* Minor Civilopedia linting

* Civilopedia Search Popup

* Add missing "entire current complex ruleset" scope

* Address comments

* Wording change

* Remove comment
2023-09-03 09:32:28 +03:00
Yair Morgenstern
6f9d2ea6d5 There's no need to save the civ uniques in *every* city unique usage differently, waste of RAM and CPU 2023-08-31 15:26:29 +03:00
Yair Morgenstern
ad7397ecc9 Performance: Cache uniques when choosing best tiles to settle/create improvements on
Resuse cache between cities for choosing best improvement for worker to pick (but not between workers...YET)

Alternate title: MOAR CACHES EVERYWHERE
2023-08-31 14:42:10 +03:00
Yair Morgenstern
f8ccefd10c performance: Use the same trick of 'save unfiltered, return filtered' for cached city uniques, so devs don't need to worry about cache state when improving performance!
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!
2023-08-31 14:27:57 +03:00
Yair Morgenstern
97b16d2b5f performance: Unique caching revamp!
- 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
2023-08-31 14:15:32 +03:00
Yair Morgenstern
e2faba879b
Version rollout (#10006)
* Bump version and create initial changelog entry

* Update Catalan.properties (#10003)

* Update Brazilian_Portuguese.properties (#10000)

* Update French.properties (#9999)

* Update Simplified_Chinese (#9995)

* Update Italian.properties (#9993)

* Update German.properties - missing and changed translations added… (#9991)

* Update German.properties - missing and changed translations added + making one previous string translation consistent with similar ones

* Update German.properties unified translation of "defensive" in my changes

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: qubodup <qubodup@gmail.com>
2023-08-30 23:54:28 +03:00