Commit Graph

6688 Commits

Author SHA1 Message Date
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