Commit Graph

6800 Commits

Author SHA1 Message Date
SomeTroglodyte
50a6e5bbdb
Download mod releases or any mod zip (#10881)
* Allow almost any mod zip download source

* Linting

* Add basic "Release page section" link capability, more linting

* Refactor: Move Github to logic

* Refactor: Split Github into files

* Refactor: centralizing all API knowledge

* Try bumping detekt version to fix false complaint

* Attempt to trick detekt to not complain about `it`

* Better overload-ambiguity-solving + detekt-compatible SAM use
2024-01-07 16:07:15 +02:00
SeventhM
68786d7603
Fix Great General counter not decreasing upon spawning a general (#10882)
* Fix Great General counter not decreasing upon spawning a general

* Actually, screw it, might as well trmove this whole section
2024-01-07 16:07:04 +02:00
PLynx
1b6d75c4db
Add <every [positiveAmount] turns> Conditional unique (not TriggerCondition) (#10871)
* Added a ConditionalEveryTurns unique

* Auto-generated the docs entry
2024-01-07 16:06:55 +02:00
Yair Morgenstern
aa18e826df Console: autocomplete ALL THE THINGS! 2024-01-04 10:35:07 +02:00
Yair Morgenstern
e049427b75 Console: Unified autocomplete 2024-01-04 09:59:25 +02:00
Yair Morgenstern
7ba5924c6d Console: Normalized addStat subcommand 2024-01-04 09:40:34 +02:00
Yair Morgenstern
24c0894f2b Console: Format is inherent part of console action 2024-01-04 09:36:29 +02:00
Yair Morgenstern
3633e95584 City/civ names match ignore case and match with spaces or - 2024-01-04 09:16:38 +02:00
Yair Morgenstern
3b66009dd2
Version rollout (#10869)
* Bump version and create initial changelog entry

* Update Hungarian.properties (#10864)

[...] -> (...)

* Fix some right-side uses of square brackets in translations (#10861)

* Update Korean.properties (#10860)

* Update Indonesian.properties (#10859)

Fix extra placeholder issue

* Update Brazilian_Portuguese.properties (#10856)

* Update Latin.properties (#10849)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: balazsszalab <balazsszalab@freemail.hu>
Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com>
Co-authored-by: Yattong the Mackerel <saud2410@naver.com>
Co-authored-by: kensvin <kensvin28@gmail.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
2024-01-04 09:15:49 +02:00
soggerr
92e45f89a9
Show carried hammers from mid turn obsolete units (#10841)
Without this, when you get a mid-turn free tech like Oxford University,
the units in city queues are updated but the hammers aren't carried
over from the obsolete unit until the end of turn. This means that to
the player it shows 0 progress for all the new units in queue and
appears like the progress from obsolete units was lost which can be
disconcerting and makes strategizing during that turn difficult.
2024-01-04 09:04:14 +02:00
Oskar Niesen
fa9d7e1ca7
Fixed crash when a worker tries to build a cached improvement that it can't build (#10854)
* Worker won't try to build the cached improvement that it can't build

* Accounted for the repair case as well
2024-01-04 09:04:05 +02:00
Oskar Niesen
1a0bdff019
valueCityStateAlliance no longer causes a crash when the city-state has not been met (#10853) 2024-01-04 09:03:56 +02:00
SomeTroglodyte
a37807f4bb
Wiki: Texture packing updated (#10851)
* Wiki: Remove texture atlas info from the Introduction, minor formatting changes

* Wiki: Add texture atlas info back in under Images-and-Audio, expanded (external tools, settings, encoding warning).

* On second thought...

* Double-check wording for 'game.png is no longer a special boy', ensure game atlas is merged into textureRegions only once
2024-01-04 09:03:48 +02:00
SomeTroglodyte
42188f160c
City-stationed unit icons get a circular touchable area (#10866)
* Linting

* Move ClickableCircle to allow reuse

* Make the Unit list icons clickable only within their circle
2024-01-04 09:03:37 +02:00
SomeTroglodyte
8573aaf8d1
Minor ImprovementPicker linting (#10862) 2024-01-04 09:03:28 +02:00
SeventhM
665b5aa87c
Add unique to allow for generalized great generals (#10828)
* Add unique to allow for generalized great generals

* Don't add compatibility for rulesets with conditional generals

* Add to rulesets

* add in pre Kotlin 9 parenthesis

* whoops missed a parenthesis

* I guess pre Kotlin 9 parenthesis was unnecessary, whoops

* Add back old variables to clone function

* Move the list of all potential generals to Ruleset

* Move list of unit construction rejections to IConstruction

* flip !any{} to none{}

* Fix imports

* Typo
2024-01-04 09:03:14 +02:00
Rémi Dufour
6e84377090
set minimum max coast extension to 1 (#10850) 2024-01-02 11:53:05 +02:00
Yair Morgenstern
1cd72e4272
Version rollout (#10848)
* Bump version and create initial changelog entry

* Use randomize seed checkbox for partial generation (#10844)

* use randomize seed checkbox for partial generation and debug the behavior of raiseMountainsAndHills in partial generation

* small changes

* Update Finnish.properties (#10843)

* Update Finnish.properties

* Update Finnish.properties

* Update Finnish.properties

* Update Korean.properties (#10842)

* Update French.properties (#10838)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Rémi Dufour <remi.dufour@protonmail.com>
Co-authored-by: Securetux <110048962+Securetux@users.noreply.github.com>
Co-authored-by: Yattong the Mackerel <saud2410@naver.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
2023-12-31 23:09:09 +02:00
Oskar Niesen
15a17335c1
Worker remove feature far away from cities fix (#10847)
* Worker AI doesn't remove forests and marshes away from their borders.

* Reverted a previous change that slipped into this branch
2023-12-31 23:06:14 +02:00
Yair Morgenstern
35c19bf9de Fixed tests 2023-12-31 22:59:33 +02:00
Yair Morgenstern
ac82d8bcb4 Added Tile Breakdown table, accessible by clicking on the stats in tile info table 2023-12-31 22:48:04 +02:00
Yair Morgenstern
15dfb892a7 Solved rare pillage-related crash 2023-12-31 22:42:19 +02:00
Yair Morgenstern
b3cdd4fbab game.png is no longer a special boy 2023-12-31 16:22:12 +02:00
Yair Morgenstern
9fcb6860b7 Console: Add "activate trigger" for civ! 2023-12-31 15:39:17 +02:00
Yair Morgenstern
7b43f90dd0 Console: Allow "-delimited strings 2023-12-31 15:26:59 +02:00
Yair Morgenstern
662ba037c8 'capture all capitals' victory accepts defeat of civs that did not found capitals 2023-12-31 14:33:48 +02:00
Yair Morgenstern
8b3163a926 Added console command to reveal entire map 2023-12-31 14:33:17 +02:00
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
Yair Morgenstern
805f008af5
Version rollout (#10766)
* Bump version and create initial changelog entry

* Update Latin.properties (#10765)

* Update Malay.properties (#10764)

It's gonna be a long time till I translate everything. Goddamn there's like 10k+ things to translate. Anyways, gonna sleep.

* Update Catalan.properties (#10762)

* Update French.properties (#10754)

* Update Afrikaans.properties (#10752)

Translation update

* Update Polish.properties (#10750)

* Update Brazilian_Portuguese.properties (#10749)

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

* fix tests

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Mikhail <151419244+MetaFBMI@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: SielVlokkies <153941039+SielVlokkies@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
2023-12-17 22:20:00 +02:00
PLynx
cde26d325e
Add the remove unit promotion unique (#10759)
* Added the remove unit promotion unique

* Moved two lines of code inside if
2023-12-17 22:03:52 +02:00
SomeTroglodyte
3fd9bc2df3
Fix key bindings all reset to unbound on entering options and leaving without looking at the keys page (#10753) 2023-12-17 22:03:43 +02:00
Rémi Dufour
3797817291
Coast spread algorithm (#10741)
* new algo for coast placement

* optimization?

* change default max coast extension

* put spreadcoast in a function

* default change back, nextBoolean() and for loop
2023-12-17 22:03:31 +02:00
itanasi
af4dea60e0
Stop on Path Blocked (#10758)
* The change

* The change properly this time
2023-12-17 22:03:14 +02:00
Will Allen
51e444df6d
Units that can't build roads should not have connect roads automation. (#10760) 2023-12-17 22:02:59 +02:00
Rémi Dufour
1316271ac6
avoid initializing with terrain that shouldn't be naturally generated (#10756)
* avoid initializing with terrain that shouldn't be naturally generated

* add space

* fix partial generation freeze

* one-liner unique check
2023-12-17 22:02:45 +02:00
SeventhM
7ff38b2687
Fix Great Scientist science calculation (#10763)
* Linting

* Simplify adding science of last 8 turns
2023-12-17 22:02:33 +02:00
SeventhM
7bc3f22733
Show stat percent differences in replacement building differences (#10730) 2023-12-17 22:02:02 +02:00
dHannasch
4b5bb54b72
Add BaseUnit.automaticallyUpgradedInProductionToUnitByTech() (#10664)
* Update BaseUnit.kt

* Update RulesetValidator.kt

* Update BasicTests.kt

* Update BaseUnit.kt

* Update TechManager.kt

* Update BaseUnit.kt

* Update BaseUnit.kt
2023-12-17 22:00:45 +02:00
dHannasch
18c17e3a18
Don't list Unique requiring a tech in the Civilopedia for that tech (#10650)
* Update BuildingDescriptions.kt

* Update BaseUnitDescriptions.kt

* Update DescriptionHelpers.kt

* Update BuildingDescriptions.kt

* Update DescriptionHelpers.kt

* Update Technology.kt

* Update Technology.kt

* Update TechnologyDescriptions.kt

* Update BaseUnit.kt

* Update BaseUnit.kt

* Update Building.kt

* Update TechnologyDescriptions.kt

* Update Building.kt

* Update Building.kt

* Update Building.kt

* Update BaseUnit.kt

* Update BaseUnitDescriptions.kt

* Update BuildingDescriptions.kt

* Update TechnologyDescriptions.kt
2023-12-17 22:00:30 +02:00
Yair Morgenstern
d2d2e5b1ae
Version rollout (#10747)
* Bump version and create initial changelog entry

* Update Russian.properties (#10742)

* Update Polish.properties (#10735)

* Update Polish.properties

* Update Polish.properties

* Update Polish.properties

* Update Korean.properties (#10733)

* Update French.properties (#10732)

* Update Italian.properties (#10731)

* Update Brazilian_Portuguese.properties (#10729)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Anoant <143289571+Anoant@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Yattong the Mackerel <saud2410@naver.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: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
2023-12-15 11:53:05 +02:00
SeventhM
297aa3e082
Avoid crash in mod checker for mods with undefined tech requirements (#10744) 2023-12-15 11:13:23 +02:00
soggerr
c60700193f
Show average damage in battle calculations (#10738)
Change BattleTable to calulate average damage and show alongside the min
and max for easier calculations when planning to attack with multiple
units such as when sieging a city

Unfortunately for min-maxers the randomness is still turn dependent
for a given defending unit, so the damage randomness will not average
out across multiple attacks on a given turn but they will all be more or
all be less depending on the luck that turn.
2023-12-15 11:13:12 +02:00
soggerr
bc1a428eeb
Allow battle calculations when not your turn (#10737)
Allow BattleTable display when it is not the viewing players turn.
This will allow for more planning while waiting for other players.
2023-12-15 11:12:45 +02:00
SeventhM
ad820b6a72
Fix stats from tileFilter unique not working on improvements (#10728) 2023-12-15 11:12:34 +02:00
SeventhM
93b89e1922
Add damage dealing unit trigger (#10720)
* Add damage dealing unit trigger

* Switch Heal/Damage uniques to only allow positive amounts
2023-12-15 11:12:21 +02:00
SeventhM
023b2959af
Fix not getting unique unit from tile based free unit trigger (For real this time) (#10746) 2023-12-15 11:12:05 +02:00
Yair Morgenstern
9a9559a20c Deprecate old religion uniques - finally!!! Months in the making! 2023-12-13 23:28:36 +02:00
Yair Morgenstern
be211d0cc4
Version rollout (#10727)
* Bump version and create initial changelog entry

* Update Italian.properties (#10719)

* update Turkish.properties (#10709)

* 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 Simplified_Chinese.properties (#10708)

---------

Co-authored-by: yairm210 <yairm210@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: AutumnPizazz <114050365+AutumnPizazz@users.noreply.github.com>
2023-12-13 23:10:26 +02:00
Yair Morgenstern
358e12a54d Avoid ANRs when users select mods that take above 500ms to run checks on 2023-12-13 23:05:10 +02:00
Yair Morgenstern
626973bfb7 Resolved crash when returning to empire overview and a category is missing 2023-12-13 22:55:36 +02:00
WhoIsJohannes
62469daff6
Add another confirmation when buying a religious unit in a city that … (#9570)
* Add another confirmation when buying a religious unit in a city that doesn't follow a religion founded by the city's civ.

* There's other stuff that can be purchased with Faith. Better to use UniqueType.Religious unit I guess.

* Add string to template.properties

* One more space to make unit tests happy

* Better template.properties

* Reinsert trailing space

* Introduce Constants entry for "Cancel"

* Redo ConfirmBuyPopup

* Dev console command to tweak religion pressures

* Translation templates and one test

---------

Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com>
2023-12-13 22:45:46 +02:00
Rémi Dufour
153a90623c
Add new map types (#10695)
* fractal map type

* repeat create fractal until enough land

* small changes and add map types Lakes and Small Continents

* fix for removing land at edges of hexagonal maps

* readability
2023-12-13 22:37:27 +02:00
SeventhM
d2dde08824
Allow arbitrary victory types for the purposes of policies (#10716) 2023-12-13 22:36:37 +02:00
SomeTroglodyte
a24f9d7716
Civilopedia key bindings (#10723)
* Move CivilopediaImageGetters object to own file

* Keyboard bindings for Civilopedia

* Better default key choices

* Change default Key Binding Tab visibility to ON
2023-12-13 22:36:29 +02:00
soggerr
aba77b8350
Fix 'Sleep Until Healed' action missing (#10718)
Sleep until healed check unit injured logic fix
2023-12-13 22:36:20 +02:00
SomeTroglodyte
64a455152a
Great Person Points - Rounding changes, Breakdown UI (#10714)
* Change per-City GPP points math and separate breakdown (producer w/ source doc) from aggregates (consumer ignoring source)

* Change CityScreen GPP list to not do aggregation itself, but show a breakdown on click

* Change "birth" city for GPP to a ***weighted*** random - no Great Mufties from cities not generating any Mufty points!

* Nicer signature for getGreatPersonPointsBreakdown

* Minor warnings linting and template for Sweden's bonus in the breakdown Popup
2023-12-13 22:36:12 +02:00
MioBestWaifu
8b5c358904
Update TradeEvaluation.kt (#10713) 2023-12-13 22:36:02 +02:00
Why-not-now
16893ced68
Added check for belief.type (#10711)
* Added check for belief.type

* Removed check for BeliefType.None

Not needed if check beforehand checks for it

* Update RulesetValidator.kt

* Update Belief.kt

* Update Belief.kt
2023-12-13 22:35:51 +02:00
SomeTroglodyte
9c4ba059ca
(Tool) Tiny helper to load MP saves (from issues for debugging) as hotseat (#10610)
* Linting

* Another button on the "secret" debug tab: Load MP as hotseat

* Remove password wall from Debug Options (but not the Ctrl-Shift gate)
2023-12-13 22:35:38 +02:00
SomeTroglodyte
6d948e97ff
Fix ended Leader Voice not cleared and resumed on un-pause (#10724) 2023-12-13 22:35:17 +02:00
Yair Morgenstern
5f22172e70
Version rollout (#10704)
* Bump version and create initial changelog entry

* Update Latin.properties (#10700)

* Update Spanish.properties (#10692)

* Update Polish.properties (#10687)

* Update Polish.properties

* Fix a typo

* Update Russian (#10685)

* Update Russian.properties

Partial translation

* Update Russian.properties

* Update Turkish.properties (#10683)

* 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 French.properties (#10681)

* Update Italian.properties (#10680)

* Update Brazilian_Portuguese.properties (#10679)

---------

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: Anoant <143289571+Anoant@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: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
2023-12-10 23:08:21 +02:00
SeventhM
06f46a44d8
Allow conditionals for unit actions (#10682) 2023-12-10 22:59:54 +02:00
Yair Morgenstern
69ce160ff9
Added 'relevant city' to conditionals, taking the city from the relevant tile where no city provided directly (#10684) 2023-12-10 22:59:45 +02:00
Will Allen
b3c7143e36
Fix connect road button for when auto unit cycle is turned on (#10696) 2023-12-10 22:59:35 +02:00
PLynx
87b02e49cd
Add resource support to stat gamespeed conditional (#10677)
* Tweaked the stat gamespeed conditional

Tweaked the stat gamespeed conditional to accept the resources

* Changed some names

* Fixed a double limit bug
2023-12-10 22:59:22 +02:00
Will Allen
e9752292eb
Add null check for connect road cross-version saves (#10699)
* Add null checks to fix #10691

* Issue reference unnecessary
2023-12-10 22:59:01 +02:00
Yair Morgenstern
49ddbe4982 Resolved #10703 - Captured military units trigger a notification for the captured unit's civ 2023-12-10 22:48:51 +02:00
Yair Morgenstern
200b764b05 Resolved #10676 - Citezenship policy grants worker even without having cities 2023-12-10 22:37:35 +02:00
Yair Morgenstern
d213c3d78f Resolved #10697 - default white color for city-state types 2023-12-10 22:21:31 +02:00
Yair Morgenstern
0625cb7087 Resolved #10698 - Fixed city-state type coloring 2023-12-10 22:19:54 +02:00
Yair Morgenstern
2ae5a018de Added initial pathfinding tests 2023-12-08 14:48:48 +02:00
Yair Morgenstern
cce678800f Fixed pillage tests 2023-12-08 14:10:56 +02:00
Yair Morgenstern
c483c4329a Console: Added 'unit setmovement' command 2023-12-08 13:45:57 +02:00
Yair Morgenstern
ee8f8a3c89 Fixed compilation error 2023-12-08 13:31:34 +02:00
Yair Morgenstern
aa1b5af19d standardized exploration actions 2023-12-08 13:30:10 +02:00
Yair Morgenstern
fad06b3aec standardized pillage, sleep actions 2023-12-08 13:24:21 +02:00
Yair Morgenstern
840f3c2093 standardized automate action 2023-12-08 12:23:00 +02:00
Yair Morgenstern
2ffec93ae8 invokeUnitAction will take the first *actionable* action, instead of the first one that exists, which may not be actionable 2023-12-08 12:17:07 +02:00
Yair Morgenstern
40283078d4 "Can instantly construct a [improvementFilter] improvement" works with improvementFilter 2023-12-07 23:09:05 +02:00
Yair Morgenstern
2fbe227285 Fixed work boat automation 2023-12-07 23:01:55 +02:00
Yair Morgenstern
1723cc36f1 chore: city settle action readability 2023-12-07 22:49:23 +02:00
Yair Morgenstern
d4f53bf813 Standardized 'add in capital' action 2023-12-07 22:41:27 +02:00
Yair Morgenstern
612545eec5 Standardized 'spread religion' / 'remove heresy' actions 2023-12-07 19:56:34 +02:00
Yair Morgenstern
c4310fb0f9 Standardized 'spread religion' / 'remove heresy' actions 2023-12-07 19:54:46 +02:00
Yair Morgenstern
8f049f45f1 Standardized 'create improvement' uniques - need to remember to deprecate the water improvements! 2023-12-07 19:47:45 +02:00
Yair Morgenstern
7211c04595
Version rollout (#10678)
* Bump version and create initial changelog entry

* Update Spanish.properties (#10675)

* Update Italian.properties (#10673)

* Update French.properties (#10669)

* Update Polish.properties (#10668)

* Update Dutch.properties (#10666)

* Update Dutch.properties

* Update Dutch.properties

* Update Italian.properties

* Update Russian.properties

* Update German.properties

* Update Swedish.properties

* Update Ukrainian.properties

* Update Brazilian_Portuguese.properties

* Update Catalan.properties

* Update Czech.properties

* Update Filipino.properties

* Update Catalan.properties (#10662)

* Update Brazilian_Portuguese.properties (#10661)

---------

Co-authored-by: yairm210 <yairm210@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: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@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>
2023-12-07 10:13:59 +02:00
Why-not-now
530a537d46
Standardised and fixed deprecration warning (#10672)
* Standardised and fixed deprecration warning

* fixed typo

* standardiswd

* lower cased "as of"
2023-12-07 10:09:42 +02:00
SeventhM
d15c3da0e0
Fix not getting unique unit from tile based free unit trigger (#10665) 2023-12-07 10:09:11 +02:00
Will Allen
8363078371
Connect roads automation (#10631)
* Start on road connect feature.

* Rough UI and tile highlighting

- Highlight visible tiles for selected unit red
-- Maybe change this to all explored tiles
- Move action firing inside WorldMapHolder
- Set begin and end tiles

* Serialize Vector2 instead of Tile

* Add road icon

* Much better UI handling

- Tile highlights go away after choosing a tile
- Added restrictions to allowed tile destination choices.
    - Explored
    - Land
    - Passable
- Added two-tap button

* Refactor part of `onTileClicked` for readability

* Band-aid fix null pointer error

* Add RoadConnection icon

* Tentatively working connect road feature

* AStar search implementation

* AStar connect road automation

* Fix worker getting stuck in city tiles

* Heuristic should be between tiles

* Add heuristic to road connect, remove maxSize limit

* Fix predicates

* Cancel automation when worker is force moved off path

* Change valid/highlighted tiles to be friendly or neutral

* Put log back the way it was

* Fix behavior when kicked off path

* Worker no longer wastes movement points

* Workers will progress multiple tiles at a time towards the next build destination.

* Respect civs with certain tiles as roads

* Refractor ForceAutomateRoadConnection -> AutomateRoadConnection

* Connect road UI button only shows for units with UniqueType.BuildImprovements

* Connect road UI button only show when road tech is unlocked

* Add wagon sound

* Fix destination icon, add KeyboardBinding to 'c'

* UI highlight connect road path tiles orange

* Downsample wagon.mp3

* Apply migration patch, idiomatic sequence processing

* Add notifications on success and failure

* Extract movement cost function to be reusable

* Refactor road pathfinding into MapPathing.kt

* Make pathing calls more general for future extendability

* Add UI road connection tile path preview

* Keep road path highlighting when routing to a city tile

* Adjust road pathing cost function

* Path includes pillaged roads

* Repair pillaged roads along path

* Valid road path tiles now include all passable tiles (open borders)
2023-12-07 09:15:12 +02:00
dHannasch
be2cbbf133
Pass-through exclude and filterUniques, respectively (#10649)
* Update BuildingDescriptions.kt

* Update BaseUnitDescriptions.kt

* Update DescriptionHelpers.kt

* Update BuildingDescriptions.kt

* Update DescriptionHelpers.kt
2023-12-07 09:14:33 +02:00
dHannasch
47e6b788af
Add TechManager.isObsolete(unit) (#10659)
* Update TechManager.kt

* Update CityStateFunctions.kt
2023-12-04 20:26:39 +02:00
dHannasch
8a03f9df12
Rename BaseUnit.techsAtWhichNoLongerAvailable() (#10663)
* Update BaseUnit.kt

* Update BaseUnit.kt

* Update RulesetValidator.kt

* Update BaseUnit.kt
2023-12-04 20:26:15 +02:00
Yair Morgenstern
7e869a3616
Version rollout (#10658)
* Bump version and create initial changelog entry

* Update Simplified Chinese (#10652)

* Update Latin.properties (#10642)

* Update Latin.properties

* Update Latin.properties

* Update Brazilian_Portuguese.properties (#10641)

* Update Spanish.properties (#10639)

* Update Spanish.properties

* Update Spanish.properties

* Update Spanish.properties

* Update Polish.properties (#10636)

* Update Polish.properties

* Update Polish.properties

* Update French.properties (#10635)

* Update Italian.properties (#10634)

---------

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: Vitor Gabriel <59321138+Ranbut@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>
2023-12-03 22:26:28 +02:00
dHannasch
155498dc43
Wrap BaseUnit.obsoleteTech into function (#10648)
* Update BaseUnit.kt

* Update BaseUnit.kt

* Update TechManager.kt

* Update BaseUnit.kt

* Update RulesetValidator.kt

* Update BasicTests.kt
2023-12-03 22:26:16 +02:00
SeventhM
f8315de414
Add trigger from building improvements and trigger conditional for building improvements (#10644)
* Add trigger from building improvements and trigger conditional for building improvements

* Classic case of the forgotten import

* Fix improvement triggerables saying they aren't allowed and move the trigger to its own function

* include the tile in the civ trigger

* Update core/src/com/unciv/models/ruleset/unique/UniqueType.kt

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2023-12-03 22:16:31 +02:00
dHannasch
c142d1508c
Add iHasUniques.techColumn() (#10595)
* Update IHasUniques.kt

* Update IHasUniques.kt

* Update IConstruction.kt

* Update IHasUniques.kt

* Update CivInfoTransientCache.kt

* Update UnitUpgradeManager.kt

* Update WonderOverviewTab.kt

* Update IHasUniques.kt

* Update IHasUniques.kt

* Update Ruleset.kt

* Update IHasUniques.kt

* Update IHasUniques.kt

* Update IHasUniques.kt

* Update IHasUniques.kt
2023-12-03 22:14:28 +02:00
Oskar Niesen
b9dd32597d
Fixed trading with city-state through notifications (#10645)
* NotificationActions DiplomacyAction no longer allows trading with city-states

* Added a comment
2023-12-03 22:13:30 +02:00
SomeTroglodyte
96dcd584cf
Dev Console: Lint, crash fix, add Stat (#10656)
* Console: linting

* Console: Commands can control message Color

* Console: `civ add gold -1`

* Console: Typo
2023-12-03 22:12:44 +02:00
SomeTroglodyte
5061b29197
Notification for "Policy branch unlocked" clickable (#10655)
* Ruleset-validate some Unique amounts to be positive

* Add TechAction for tech gained from Ruins

* Allow PolicyPickerScreen to highlight a Policy

* Add the 'PolicyAction' NotificationAction

* Use the new PolicyAction
2023-12-03 22:12:26 +02:00
dHannasch
1f47fff05d
Add iHasUniques.requiredTechs (#10587)
* Update IHasUniques.kt

* Update IHasUniques.kt

* Update IConstruction.kt

* Update IHasUniques.kt
2023-12-02 22:56:00 +02:00
dHannasch
7fae32c595
Add iHasUniques.availableInEra() (#10594)
* Update IHasUniques.kt

* Update IHasUniques.kt

* Update IConstruction.kt

* Update IHasUniques.kt

* Update CivInfoTransientCache.kt

* Update UnitUpgradeManager.kt

* Update WonderOverviewTab.kt

* Update IHasUniques.kt

* Update IHasUniques.kt

* Update CityStateFunctions.kt

* Update CityStateFunctions.kt

* Update IHasUniques.kt

* Update CityStateFunctions.kt

* Update CityStateFunctions.kt

* Update CityStateFunctions.kt

* Update CityStateFunctions.kt
2023-12-02 22:54:52 +02:00