Commit Graph

10121 Commits

Author SHA1 Message Date
52eae2a3f9 Fix options setting for the notifications scroll visibility being wrong for new installs (#11177) 2024-02-22 17:34:29 +02:00
382d966696 Change EmpireOverviewScreen closing to use the same button and UX as Civilopedia (#11169)
* Centralize a "round X" close button factory with global scope

* Change EmpireOverviewScreen closing to use the same button and UX as Civilopedia
2024-02-22 17:33:26 +02:00
3047c1abad Normalize TNP 'search' links, fix a few broken or incomplete attributions (#11178) 2024-02-22 17:32:07 +02:00
e2df543778 4.10.11 4.10.11 2024-02-20 23:49:28 +02:00
5cba78cd9b Version rollout (#11164)
* Bump version and create initial changelog entry

* Update Simplified Chinese (#11161)

* Update French.properties (#11153)

* Update Indonesian.properties (#11151)

* Update Indonesian.properties

Added translation for vanilla civ introduction.

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Italian.properties (#11150)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: M792003 <158552928+M792003@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2024-02-20 23:43:12 +02:00
23edf07a41 Terraforming! (#11152)
* Terraforming!

* comment

* whoops

* And better tests, that actually output text.

* SomeTrog caught this doc error :)

* Fix natural wonder placement, it better belongs with base terrain
Also, normalize tiles to ruleset after plonking a new terrain

* Out Of Cheese Error, Redo From Start

- Only terrains, no improvements - one problem at a time
- Fit new functional trigger format
- Respect occursOn
- Teleport units out of tiles if they can't pass through (nat wonders for example)
- No need for terrainFeature unique parameter
- Tested with "Turn this tile into a [Grand Mesa] tile <for [0] movement>", "Turn this tile into a [Forest] tile <for [0] movement>" uniques

* Don't allow city tiles to turn into water/wonders etc kudos @SomeTrog
2024-02-20 23:38:23 +02:00
2c96c6f244 ConditionalWhileResearching as suggested by @woo1127 (#11156) 2024-02-20 23:25:16 +02:00
8eadaa9d8e Fix victory focus being ignored (#11158)
* Fix victory focus being ignored

* Move to Civilization
2024-02-20 23:25:06 +02:00
7d17b9296d External links: Right-click and some housecleaning (#11155)
* Right-click external links to copy url

* Add hint about right-clicking links to UI Tips tutorial

* Add wiki link to about and centralize repo/wiki external link bases
2024-02-20 23:24:54 +02:00
17abf7840b Add unique for Personality to avoid building object (#11160)
* Add unique for Personality to avoid building object

* Switch civInfo with city

* Missed a spot

* baseUnitFilter instead of "unitFilter"
2024-02-20 23:23:56 +02:00
b80ab2d3e6 Fix timed uniques without further conditionals not getting type recognized 2024-02-20 14:49:26 +02:00
fc6d913204 Ensure that each uniquetype specified returns a value =- thank you amazing Kotlin compiler :) 2024-02-20 14:03:51 +02:00
3a7401a939 Only allow a trigger-based unit action if the trigger function is not null
Tested with "Adopt [Legalism] <for [0] movement>" - it allows me to click once, adopting the policy, but not a second time since the policy is already adopted thus the trigger function is null
2024-02-20 11:03:07 +02:00
27465425b0 Allow determining *if* a unique can trigger a triggerable effect, *without* actually doing so 2024-02-20 10:52:36 +02:00
d51d032e18 Fix Personality documentation (#11159) 2024-02-20 10:01:34 +02:00
4661ee2496 Fix Maya "Long Count" unlock translations (#11157)
* Mayan Long-Count unlock: Match translation template and existing translations to actual notification

* A TFW run adds another empty line at the end...
2024-02-19 21:48:50 +02:00
d3356c94fd Minor style updates (#11154)
* Properly Calculate Population based on Food Conversion to Prod
Trigger properly when Queue is changed

* Remove triggers

* Missed a trigger

* Add triggers in CityConstructionsTable so we can call cityScreen.update()

* Properly Calculate Population based on Food Conversion to Prod
Trigger properly when Queue is changed

* Remove triggers

* Missed a trigger

* Add triggers in CityConstructionsTable so we can call cityScreen.update()

* Minor style cleanups

* Properly Calculate Population based on Food Conversion to Prod
Trigger properly when Queue is changed

* Remove triggers

* Missed a trigger

* Properly Calculate Population based on Food Conversion to Prod
Trigger properly when Queue is changed

* Remove triggers

* Missed a trigger

* Minor style cleanups
2024-02-19 21:46:57 +02:00
6c87bef1cf 4.10.10 4.10.10 2024-02-17 23:12:03 +02:00
b2bbd8d145 Version rollout (#11149)
* Bump version and create initial changelog entry

* Update Brazilian_Portuguese.properties (#11143)

* Update Italian.properties (#11140)

* Update Italian.properties

* Update Italian.properties

* Fixed mistranslations and made the translation more natural (#11139)

Some of the diplomacy wording are clearly machine translated, so I improved it.

* Update Indonesian.properties (#11136)

* Update Indonesian.properties

Translated some words and fixed some mistranslated words.

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update French.properties (#11135)

* Update Spanish.properties (#11132)

* Update Spanish.properties

* Update Spanish.properties

---------

Co-authored-by: yairm210 <yairm210@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>
Co-authored-by: chenxing61 <70869440+chenxing61@users.noreply.github.com>
Co-authored-by: M792003 <158552928+M792003@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
2024-02-17 23:09:51 +02:00
5b698102ef Don't prematurely round Great person point boni and GPP breakdown UI (#10924)
* GreatPersonPointsBreakdown class and logic use

* Minor comment

* Fix untrue wiki claim that civilopediaText color accepts names

* GreatPersonPointsBreakdown UI available by clicking in the CityStatsTable GPP section

* Two separate assembly lines for two different products of the factory

* One more code-deduplication

* Fix rounding - rounds *up* on x.5

* Clearer display code (but output unchanged)

* Minor comment clarification
2024-02-17 21:45:02 +02:00
7dc398184f Fix creating 105x90 rectangular no-wrap maps (#11144) 2024-02-17 21:43:17 +02:00
cc7b8cd26c Documentation for Personality json (#11138)
* Documentation for Personality json

* whoops, bad link

* Fix inaccurate "double focus" comment

* Fix accidental copy-paste error

* Edit priority text to maybe be clearer
2024-02-17 21:43:05 +02:00
c8a7cf29b6 AutoAssign Population with Food Converts to Production (#11141)
* Properly Calculate Population based on Food Conversion to Prod
Trigger properly when Queue is changed

* Remove triggers

* Missed a trigger

* Add triggers in CityConstructionsTable so we can call cityScreen.update()

* Properly Calculate Population based on Food Conversion to Prod
Trigger properly when Queue is changed

* Remove triggers

* Missed a trigger

* Add triggers in CityConstructionsTable so we can call cityScreen.update()
2024-02-17 21:42:23 +02:00
88df2c26e6 Framework stuff: Preparation for another Warning-Suppression branch (#11128)
* Make source object available to RulesetErrorList.add

* Make ruleset available to RulesetErrorList

* Introduce UniqueTarget.MetaModifier - ModifierHiddenFromUsers won't stay alone

* There was no use of prefix without the unique name - fold

* Introduce UniqueTarget.MetaModifier - doc

* Pass context down even inside UniqueValidator, convenience factory for limited RulesetErrorList's

* Clean up RulesetErrorList.of factory

* Reorder parameters of RulesetErrorList.add
2024-02-17 21:41:37 +02:00
ec1f51dfb8 Allow barb camps to function after giving ruins effects (#11137)
* Allow barb camps to function after giving ruins effects

* Add comment
2024-02-17 21:41:21 +02:00
5730d1b80a Conditional for building in amount of cities (#11101)
* Conditional for building in amount of cities

* fix order of operations

* Deprecate old require in amount cities uniques

* import

* Fix referring to the unique instead of the conditional

* Fix yield message

* I have no clue how this isn't imported, but I'mma assume this translates fine anyways

* Rename text for unique

* revert unique text

* Whoops

* Remove unnecessary puppet check

* Move additional description to it own function

* Split missing city text into its own function

* Move ToDo comment

* flip to be easier to read

* Move onlyAvailable rejections to its own function to be easier to work with

* Add in the word "of"
2024-02-17 21:41:05 +02:00
df7072b550 Clean up console output of unit test runs (#11134)
* Allow tests to discard console output selectively, by default collect and discard unless result is failure

* Fix debug change and a little source clarification
2024-02-16 11:57:42 +02:00
63243fd775 Fix translation placeholder mismatches failing unit tests (#11133) 4.10.9 2024-02-14 19:43:04 +02:00
90eb08734f 4.10.9 2024-02-13 23:45:54 +02:00
80d57afee0 Version rollout (#11131)
* Bump version and create initial changelog entry

* Update Dutch.properties (#11120)

* Update Dutch.properties

* Update Dutch.properties

* Update Polish.properties (#11118)

* Update Finnish.properties (#11117)

* Update French.properties (#11114)

* Update Italian.properties (#11113)

* Update Brazilian_Portuguese.properties (#11112)

* Update Indonesian.properties (#11110)

* Update Indonesian.properties

Translated some untranslated words and fixed some mistranslated words.

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Gekko03 <148203740+Gekko03@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>
Co-authored-by: M792003 <158552928+M792003@users.noreply.github.com>
2024-02-13 23:36:38 +02:00
a7c0df8c0b Initial Civ Personality implementation (#10939)
* Barebones implementation

* Personality Policy branch

* Initial addtions to Victory.Focus based changes

* Have no focus or personality if human

* Add getter/setter for easier access to focuses

* Add scaled value to various areas

* Make getPersonality non null to simplify checks

* Forgot to add in changes to the base class

* Ugly code to add in Personality preferred victory type. Not sure how to make it cleaner

* Fix typo

* Early return Faith building choice

* Change set concatination to listOf

* fix missing equal sign

* vals for getPersonality

* Remove unnecessary parenthesis

* Early return the other buildings as well

* Some linting and renames
2024-02-13 23:27:38 +02:00
eb8fee8edd Autoplay menu cleanup (#11115)
* Minor linting and fix folder-package mismatch

* Actually make AnimatedMenuPopup stay inside the stage in all directions (was done for bottom left only before)

* Proper keyboard bindings for AutoPlay and -menu

* Testing translations

* AutoPlay as widely used term
2024-02-13 23:27:18 +02:00
9f53b7e1ee Key binding categories properly sorted in options popup (#11116)
Delay some of the KeyBindingsTab work until it's viewed
2024-02-13 23:27:00 +02:00
539db00cb6 Workers wake up on tile expansion (#11119)
* Workers wake up on tile expansion

* Only owned workers will wake up
2024-02-13 23:26:04 +02:00
ccea2c88d3 Further Espionage Implementation (#11077)
* Added getSpiesInCity method in EspionageManager

* Expanded stealing technology code

* Spies can now die and revive

* Added basic rigging elections

* Spies rigging elections can now be caught

* Added spy rank

* Players can now move spies to city-states

* Spies at a higher rank steal tech quicker

* EspionageAutomation now sends spies to city-states and to do counter intelligence

* Fixed some EspionageAutomation logic

* Fixed EspionageAutomation error

* Spy.location is now stored as a vector2

* Accounted for the only able to be one spy of a civ in each city

* Spies level up when successfully stealing tech.

* Increased tech steal rate by spy rank

* Increased influence gained by rigging elections

* Added a spy level cap

* Spies no longer get stuck on counter-intelligence action

* Spy automation no longer tries to rig elections in city states that it is at war with

* canMoveTo now checks if the city tile is visible

* Added espionage translations

* Changed automateSpySteal/Rig/Counter intelligence return types

* Simplifies automateSpies in EspionageAutomation

* Added blank lines before titles

* Improved spy being found and killed message phrasing
2024-02-13 23:25:07 +02:00
ed7fd447c2 Wak wak waaaak :(
Worth the investigation but conclusion is sad
2024-02-13 12:09:17 +02:00
6b9c98edc5 Compile to jre 8 target (#11122)
* Allow Java 8 to run this seamlessly, because really, why not?
Resolves #11121
Resolves #11074

* Apparently

* Correct version-to-string
2024-02-12 00:49:08 +02:00
58318cb199 Allow lower-case "all" for all filters 2024-02-10 20:02:59 +02:00
e7a2b94c60 SomeTrog's versioning test - compile on jdk 17 FOR jre 11, includes gradle upgrade (#11111) 4.10.8-jdkTest 2024-02-10 19:44:47 +02:00
a9c367907d Allow combatantFilter for cities to use cityFilter 2024-02-09 12:44:56 +02:00
eb984f06dc 4.10.8 4.10.8 2024-02-09 12:37:42 +02:00
31b7a0f93f Version rollout (#11109)
* Bump version and create initial changelog entry

* Update Simplified_Chinese.properties (#11106)

* Update Spanish.properties (#11093)

* Update Spanish.properties

* Update Spanish.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: AutumnPizazz <114050365+AutumnPizazz@users.noreply.github.com>
Co-authored-by: yetanotherfossman <83962798+yetanotherfossman@users.noreply.github.com>
2024-02-09 12:30:41 +02:00
09413a3182 Add unique for increasing price every time it's built (#11100)
* Add unique for increasing price every time it's built

* Update name to be more accurate

* whoops
2024-02-09 12:19:42 +02:00
0be8fa8e39 Fixed unhappiness effect when at 0 happiness 2024-02-09 12:14:17 +02:00
f8137b8a52 Allow BaseUnit unique functions to return UnitType uniques
Resolves #9135
2024-02-09 12:01:01 +02:00
5568cc08c0 Tweak Overview-Politics-Diagram for a defeated player (#11094)
* Adapt Overview Politics diagram view to show a defeated player a little more intuitively

* Fix lines to defeated civ - each is drawn twice, one for each direction

* Defeated civ has no relations on the table view as well
2024-02-08 21:33:38 +02:00
1ad8c69e60 Patch AlertPopup to correctly close when it cannot find a required asset (#11095) 2024-02-08 21:33:25 +02:00
4aba1c2751 Fix Capture when a teleport was necessary (#11096)
* Fix captured civilian liberation in the had-to-be-teleported case

* Refactor captureOrConvertToWorker to return where the unit ended up, if at all - and harden the captureCivilianUnit else branch a bit

* Minor lint
2024-02-08 21:32:52 +02:00
3a6a64576d Fix mistakes with unavailable unique (#11102) 2024-02-08 21:18:09 +02:00
5e45b95157 fix light/dark mode tooltip in the wiki (#11087) 2024-02-06 11:43:58 +02:00