Commit Graph

9788 Commits

Author SHA1 Message Date
bd1a3d4d2a Resolved #10818 - Updating server URL allows checking connection immediately 2023-12-30 20:49:36 +02:00
869154cc73 4.9.13 4.9.13 2023-12-28 23:31:00 +02:00
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
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
783f846761 Remove source compatibility to java 8, in preparation for Gradle 8.5 upgrade
See #10740
2023-12-28 23:07:24 +02:00
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
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
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
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
f1bd13c80c Randomize seed checkbox (#10782)
* randomize seed checkbox working

* don't reseed when checking the box
2023-12-28 22:40:19 +02:00
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
6c8be3c4e5 Civs now have a 50% chance of picking their favored religion (#10825) 2023-12-28 22:38:13 +02:00
54afc5c350 Modders wiki updating (#10688)
* xpForNewUnits is not used anymore

* Adding links to json files

* Redid some tables (TODO)

* Deprecate cannotBeBuiltWith

* Update 2-Civilization-related-JSON-files.md

Standardised uniques link and description
Miscellaneous changes to grammar to be consistent

* First round of amendment

Fixed up some links
Made grammar more consistent
Removed deprecated `effect` from ModOptions.json
Added CityStateTypes.json

* Second round of amendment
Made grammar more consistent
Changed `Optional` header to `Default`
Removed tabs from json code
Changed all stats to a `<stats>`

* Undid accidental replacement

* Undid accidental replacement

* Made list more consistent

* Rewrote policy branch and turns in eras.json

* Third round of amendment

Split stats
Fixed a couple of stuff idk tbh

* Added stats

* Added nationFilter

* Final amendment

* Adding markdown table format based on suggestion

* Fixed errors/suggestions based on reviews

changed building.cost default to be -1
added footnotes for improvements instead of list
removed faith from unit.hurryCostModifier
removed assosciation of nationFilter with civFilter
2023-12-28 22:06:40 +02:00
278288442b Religion button respects "hidden from users" modifier on uniques 2023-12-28 21:58:10 +02:00
af1bf6ed00 Update README.md
Removed "how can I help" line
2023-12-28 08:14:53 +02:00
b9a13b9b7f Update README.md 2023-12-27 19:22:15 +02:00
1cfe9e4076 Returning old function, because LibGDX function is a one-way set
See 0ddf67530f
2023-12-25 22:11:50 +02:00
f8b8cbfa0e 4.9.12 4.9.12 2023-12-25 21:24:17 +02:00
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
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
0ddf67530f @SomeTroglodyte
initialize() calls useImmersiveMode() internally, which would override the system ui visibility we manually set, leading to setting effectively being ignored on startup

Also, we can use LibGDX's builting function, which is more future-proof :)
2023-12-25 20:04:34 +02:00
30c9876e2f Console: Simplified input validation, with exception throwing 2023-12-24 23:51:00 +02:00
46e5d7e245 Console: added 'set player type' command, for scenario setup 2023-12-24 23:13:35 +02:00
f09700396c Scenario list renders correctly 2023-12-23 23:46:35 +02:00
bdd7239e8c Added scenario page to wiki 2023-12-23 23:43:40 +02:00
c3d592393e Added experimental scenarios! 2023-12-23 23:36:14 +02:00
8e2b443427 Add spaces between 'replaces' unit promotion uniques 2023-12-22 11:31:15 +02:00
075b394e82 4.9.11 4.9.11 2023-12-22 11:00:56 +02:00
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
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
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
5f8d2ce340 Make City-state boni display respect hidden from users flags (#10786) 2023-12-22 10:00:21 +02:00
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
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
746918b1d3 Revert "New Citizen Focus Options (#10745)" (#10793)
This reverts commit 07c6728123.
2023-12-22 09:45:45 +02:00
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
ffd5fc62ed Enable Domination to Capture All Capitals (#10769)
* Enable Domination to Capture All Capitals

* Update Text
2023-12-22 09:38:24 +02:00
d1bb563333 One player in each round will be processed even if all players are defeated. (#10788) 2023-12-22 09:38:14 +02:00
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
c08270362e Resolves #10792 - 'unique is requirement for tech' only looks at tech conditional 2023-12-22 09:35:12 +02:00
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
851ab2e7b8 Separate higher-level autosave functions from lower-level file functions 2023-12-19 23:45:12 +02:00
7a28f15106 Revert "Great Person Points - Rounding changes, Breakdown UI (#10714)"
This reverts commit 64a455152a.
2023-12-19 23:10:36 +02:00
1cee3f722e Unit by default not selected on turn start 2023-12-19 23:05:35 +02:00
b04da39799 Added 'upon turn end' trigger 2023-12-19 22:34:34 +02:00
93224f1491 4.9.10-patch1 4.9.10-patch1 2023-12-18 19:40:30 +00:00
77de68cfc5 Fix any tech researched clearing all units from queues (#10777) 2023-12-18 21:40:22 +02:00
75af329b16 4.9.10 4.9.10 2023-12-17 22:33:42 +02:00
08514cbd2e 4.9.10 2023-12-17 22:33:05 +02:00
c0f837628b Resolved #10674 - added mod checker warning that movement uniques do not always work with conditionals 2023-12-17 22:25:30 +02:00