Commit Graph

6673 Commits

Author SHA1 Message Date
Yair Morgenstern
0b89e609c7 Map editor generation steps don't add multiple terrain features of the same type 2023-12-31 08:52:04 +02:00
Yair Morgenstern
fbef276d0b 4.9.14 2023-12-30 21:36:00 +02:00
Yair Morgenstern
94efddb459 Solved detekt for realz 2023-12-30 21:32:42 +02:00
Yair Morgenstern
4cda91eb7f Fix detekt warnings 2023-12-30 21:28:18 +02:00
Yair Morgenstern
c56df66c7e Deprecated old uniques 2023-12-30 21:21:44 +02:00
Yair Morgenstern
a2fd43f840
Version rollout (#10837)
* Bump version and create initial changelog entry

* Update Catalan.properties (#10834)

* Update Polish.properties (#10831)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
2023-12-30 21:21:25 +02:00
Yair Morgenstern
ab133027cd Fixed scenarios crashing 2023-12-30 21:14:04 +02:00
Oskar Niesen
16fce2bb1d
Worker AI short distance priority fix (#10835)
* Removed extra tilesToAvoid check

* Fixed getBasePriority being negative
2023-12-30 21:01:29 +02:00
Yair Morgenstern
5898f91bb8
New Citizen Focus Options - again (#10827)
* Add Gold Growth and Production Growth Focus
New Manual Focus doesn't reallocate population

* Use Stat Names (and symbols) for focus

* Missing reassign code

* Clean up table for efficiency

* Table v2

* minor translation changes

* COMPATIBILITY

* v3 table

* Minor fixups

* Add Gold Growth and Production Growth Focus
New Manual Focus doesn't reallocate population

* Use Stat Names (and symbols) for focus

* Missing reassign code

* Clean up table for efficiency

* Table v2

* minor translation changes

* COMPATIBILITY

* v3 table

* Minor fixups

* Update to master code
Remove duplicating Food yield multiply

* Revert Compatibility Version

---------

Co-authored-by: itanasi <44038014+itanasi@users.noreply.github.com>
2023-12-30 20:54:12 +02:00
SeventhM
cd4e0333f4
Spawn multiple great people if eligible (#10833)
* Spawn multiple great people if eligible

* Fix referrence to outdated dev environment
2023-12-30 20:53:29 +02:00
SeventhM
24c888ef19
Initial Great Writer functionality (#10721)
* Initial Great Writer functionality

* Cleanup code

* And then ignore the fact that I cleaned it

* Temporary copy of Culture icon for unitActionIcons
2023-12-30 20:53:22 +02:00
Oskar Niesen
2768042700
AI focuses city-state gold gifting (#10836)
* AI prioritises gifting gold to city-states with more influence invested

* AI only gives smaller city-state gold gifts if it already has influence

* AI prioritises gifting gold to city-states with the investment quest

* Only UseGoldAutomation includes valuing if the city-state has a quest
2023-12-30 20:49:57 +02:00
Yair Morgenstern
bd1a3d4d2a Resolved #10818 - Updating server URL allows checking connection immediately 2023-12-30 20:49:36 +02:00
Yair Morgenstern
f0486c1454
Trigger 'capture city' as a unit trigger (#10824)
This will default back to civ trigger if the unique is not a unit trigger, so there should be 100% backwards compatibility
2023-12-28 23:11:31 +02:00
Yair Morgenstern
be0d6c9936
Version rollout (#10826)
* Bump version and create initial changelog entry

* Update Spanish.properties (#10821)

* Update Finnish.properties (#10819)

* Update Finnish.properties

* Update Finnish.properties

* Update Simplified Chinese (#10816)

* Update Brazilian_Portuguese.properties (#10813)

* Update French.properties (#10812)

* Update Italian.properties (#10811)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Securetux <110048962+Securetux@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: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2023-12-28 23:07:37 +02:00
Yair Morgenstern
783f846761 Remove source compatibility to java 8, in preparation for Gradle 8.5 upgrade
See #10740
2023-12-28 23:07:24 +02:00
Oskar Niesen
7745cd1c88
Worker AI Rework (#10776)
* WorkerAutomation now uses UnitAutomations's getDangerous tiles

* getPriority now values the current unit tile

* getPriority now values if the tile is worked instead of if it provides a yield

* getPriority prioritises clearing fallout

* getPriority prioritises new resources

* Fixed error in WorkerAutomationTest

* FindTileToWork now uses tilesToAvoid instead of checking for enemies itself

* Workers prioritise their own tile first

* Began reworking tile priority

* Changed getBasePriority() to account for tile damage

* findTileToWork now groups tiles and finds the best tile from the top group

* Fixed method calling findTileToWork()

* Workers don't build roads if their GPT is below 20

* Workers have multiple stages of wanting to connect cities

* Workers prioritise best tiles based on closeness

* Changed stuff

* Fixed a situation where a worker would be on a tile without improving it

* Reduced city connection priority

* Worker prioritises improving closer tiles more

* Worker prioritises improvements that are closer to being finished

* Reverted changes that broke tryConnectingCities more (it is already a little broken)

* Improved repair priority

* Added cityDistanceWant to tryConnectingCities

* Created a partial Test

* Finished first test

* Fixed a merge issue

* Fixed tileHasWorkToDo not accounting for base improvement values

* Added a failing test

* CityPopulationManager now assigns population to tiles in a predictable way for the Worker BasePriority tileProvidesYield

* Added an extra test with two cities and no roads

* Fixed Test creating new workers which ends up failing the test

* Test no longer research and have unnecessary research

* Test no longer include city center tiles as improvements built

* Added a failing test and removed a tryConnectCity filter

* Workers now improve tiles with unseeable resources on them

* Added a resource test

* Fixed should build roads in turns test

* Added an extra test

* tryConnectingCities takes into account the improvement priority

* Separated the improvement stat bonus from the base priority for tryConnectCities

* getBasePriority() now ranks a tile based on its base stats

* replaced mostUnderdevelopedCity with closestUnderDevelopedCity

* changed build road distances wanted

* getImprovementRanking now accounts for resources

* tilePriority now uses a float instead of an int

* Fixed float to int conversion in SpecificUnitAutomation

* Added a test for pillaging
2023-12-28 22:42:11 +02:00
SeventhM
0cbd9810a3
Fix stat on tile uniques doubling on improvement tiles (#10814)
* Fix stat on tile uniques doubling on improvement tiles

* Move to statsFromObject because that's what it is
2023-12-28 22:41:35 +02:00
SeventhM
4ba4eb6e20
Avoid crash if "Only available" unique in policy branch has 2 or more params (#10815)
* Unnecessary linting: for instead of foreach

* Avoid crash if "Only available" unique in policy branch has 2 params

* rename
2023-12-28 22:41:24 +02:00
Oskar Niesen
e823d82471
AI doesn't counter offer and request a defesive pact, open borders or research pact at the same time (#10823)
* AI now does not offer a defensive pact/open border/research agreement if there is a pending counter offer with it

* Moved searching for a pending trade offer to a new function
2023-12-28 22:40:30 +02:00
Rémi Dufour
f1bd13c80c
Randomize seed checkbox (#10782)
* randomize seed checkbox working

* don't reseed when checking the box
2023-12-28 22:40:19 +02:00
SeventhM
3b7974942c
Allow for improvement removal "improvements" (#10820)
* Allow for improvment removal "improvements"

* Flip concatination to avoid multiple startsWith
2023-12-28 22:38:24 +02:00
Oskar Niesen
6c8be3c4e5
Civs now have a 50% chance of picking their favored religion (#10825) 2023-12-28 22:38:13 +02:00
Yair Morgenstern
278288442b Religion button respects "hidden from users" modifier on uniques 2023-12-28 21:58:10 +02:00
Yair Morgenstern
5859aaadca
Version rollout (#10810)
* Bump version and create initial changelog entry

* Update Italian.properties (#10807)

* Update Catalan.properties (#10806)

* Update Polish.properties (#10805)

* Update Turkish.properties (#10803)

* Update Turkish.properties

Added new translations

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

Added fastline translate

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

* Update French.properties (#10800)

* Update Spanish.properties (#10799)

Tradicción is incorrect

* Update Brazilian_Portuguese.properties (#10796)

* Update Romanian.properties (#10798)

* Update Romanian.properties

* Update Romanian.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: komandotayfa <53448093+komandotayfa@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: brihuega <jose.brihuega@gmail.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Tomkode <79474984+Tomkode@users.noreply.github.com>
2023-12-25 21:04:43 +02:00
SomeTroglodyte
bae3566a97
Fix ShadowedLabel using Stack's internal default size, so the usage in BattleTableHelpers had a vast distance between label and shadow. (#10804) 2023-12-25 20:11:42 +02:00
Yair Morgenstern
30c9876e2f Console: Simplified input validation, with exception throwing 2023-12-24 23:51:00 +02:00
Yair Morgenstern
46e5d7e245 Console: added 'set player type' command, for scenario setup 2023-12-24 23:13:35 +02:00
Yair Morgenstern
c3d592393e Added experimental scenarios! 2023-12-23 23:36:14 +02:00
Yair Morgenstern
8e2b443427 Add spaces between 'replaces' unit promotion uniques 2023-12-22 11:31:15 +02:00
Yair Morgenstern
05d9a09579
Version rollout (#10795)
* Bump version and create initial changelog entry

* Update Spanish.properties (#10780)

* Even more translations of Malay.properties (#10778)

I plan to finish the UI section this week. Honestly, going through and skimming a bit I've seen things I've never seen in game.

* Update Brazilian_Portuguese.properties (#10775)

* Some German translations (#10772)

* Update French.properties (#10768)

* Update Italian.properties (#10767)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@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>
Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@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-12-22 10:12:28 +02:00
Why-not-now
1d97ededbd
Update units ruleset validation (#10781)
* Update units ruleset validation

Removed check for 0 rangedAttack ranged units. Definition here: 75af329b16/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt (L349)
Renamed obseleteTech to upgradeTech

* Undo renaming

* Removed duplicate check

See 93224f1491/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt (L51-L53)

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2023-12-22 10:08:21 +02:00
Yair Morgenstern
b56a168e86
Save city focus as string, to allow changes in available city focuses without breaking games (#10794) 2023-12-22 10:07:28 +02:00
SomeTroglodyte
5f8d2ce340
Make City-state boni display respect hidden from users flags (#10786) 2023-12-22 10:00:21 +02:00
Oskar Niesen
7417b4c041
Added AutoPlay until end setting (#10789)
* Added a new AutoPlay until end button

* Added the new AutoPlay until victory setting to translation

* Reverted some comment fixes to hopefully not have a merge conflict
2023-12-22 10:00:03 +02:00
SomeTroglodyte
f529d969f0
Mod declarative compatibility - a little more (#10751)
* Mod compatibility - update declarations

* Mod compatibility - logic and UI changes

* Mod compatibility - flag some invalid use patterns

* RulesetValidator - lint until Studio shuts up

* Fix isBaseRuleset test in ModRequires validation

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2023-12-22 09:59:38 +02:00
Yair Morgenstern
746918b1d3
Revert "New Citizen Focus Options (#10745)" (#10793)
This reverts commit 07c6728123.
2023-12-22 09:45:45 +02:00
itanasi
07c6728123
New Citizen Focus Options (#10745)
* Add Gold Growth and Production Growth Focus
New Manual Focus doesn't reallocate population

* Use Stat Names (and symbols) for focus

* Missing reassign code

* Clean up table for efficiency

* Table v2

* minor translation changes

* COMPATIBILITY

* v3 table

* Minor fixups
2023-12-22 09:38:43 +02:00
Oskar Niesen
d1bb563333
One player in each round will be processed even if all players are defeated. (#10788) 2023-12-22 09:38:14 +02:00
SomeTroglodyte
d3ac2c5ede
(UI) Politics overview diagram: Add legend popup (#10451)
* Refactor Battle damage shadowed Label into reusable WidgetGroup

* Make Politics Overview "Grid header" fixed and some linting

* Add a Legend popup explaining line colors in the Politics Overview Diagram: Click inside

* Missing translation template

* Final decision on background didn't make it in properly

* Remove unused png - those are now in the Construction atlas

* Smaller background image

* Color and shadow choices

* Redo atlas to include both 10505 and this
2023-12-22 09:37:47 +02:00
Yair Morgenstern
c08270362e Resolves #10792 - 'unique is requirement for tech' only looks at tech conditional 2023-12-22 09:35:12 +02:00
SomeTroglodyte
beced92a69
Linting of MapUnit class (#10785)
* Reorganize - restore meaning to existing regions, sort fields into regions, treat warnings

* Reorganize - double-check pure/side-effect regions and move inappropriate placements
2023-12-21 17:19:02 +02:00
Yair Morgenstern
851ab2e7b8 Separate higher-level autosave functions from lower-level file functions 2023-12-19 23:45:12 +02:00
Yair Morgenstern
7a28f15106 Revert "Great Person Points - Rounding changes, Breakdown UI (#10714)"
This reverts commit 64a455152a.
2023-12-19 23:10:36 +02:00
Yair Morgenstern
1cee3f722e Unit by default not selected on turn start 2023-12-19 23:05:35 +02:00
Yair Morgenstern
b04da39799 Added 'upon turn end' trigger 2023-12-19 22:34:34 +02:00
yairm210
93224f1491 4.9.10-patch1 2023-12-18 19:40:30 +00:00
SomeTroglodyte
77de68cfc5
Fix any tech researched clearing all units from queues (#10777) 2023-12-18 21:40:22 +02:00
Yair Morgenstern
08514cbd2e 4.9.10 2023-12-17 22:33:05 +02:00
Yair Morgenstern
c0f837628b Resolved #10674 - added mod checker warning that movement uniques do not always work with conditionals 2023-12-17 22:25:30 +02:00