Commit Graph

9500 Commits

Author SHA1 Message Date
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
c9212e19c2
Update README.md - updated build badge 2023-11-05 23:24:42 +02:00
Yair Morgenstern
6c6fe3de1b docs: Added more documentation for uniques 2023-11-05 23:21:51 +02:00
SomeTroglodyte
1f6e27421b
Remove obsolete filtering Unique declaration (#10435) 2023-11-05 20:15:45 +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
927aa8a788 chore: Updated LibGDX to 1.12.1 2023-11-04 23:03:47 +02:00
Framonti
e9b3ec5282
fix flaky tests by properly assigning pop to work on specific tile (#10421) 2023-11-04 21:24:26 +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
e43d870b43 Fastlane fixes 2023-10-30 12:43:28 +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
f9134c90dc @Framonti
This test seems to be flaky - works from my computer but fails sometimes on github
2023-10-30 11:11:11 +02:00
Yair Morgenstern
4d21d657be Fastlane description update and cleanup 2023-10-29 20:14:44 +02:00
Yair Morgenstern
3929988722 4.8.15 2023-10-29 19:26:35 +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
SomeTroglodyte
4b41b5586a
Hack Android NotoSansSymbols font into submission (#10360)
* Linting

* Patch font metrics on Android for weird cases
2023-10-29 18:59:56 +02:00
Oskar Niesen
e214aa78d4
Melee units are now more likely to attack cities (#10363) 2023-10-29 18:59:47 +02:00
Framonti
f27fa7bab6
💚 add tests for city population manager (#10347) 2023-10-29 18:59:38 +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
SomeTroglodyte
bd7db9b21a
Move Future Tech so Nanotechnology isn't covered by lines in Vanilla (not G&K) (#10359) 2023-10-26 08:47:16 +03: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