Commit Graph

6336 Commits

Author SHA1 Message Date
Yair Morgenstern
6dbf240899 Converted "May found a religion" unique to a UnitAction 2023-10-01 12:01:54 +03:00
Yair Morgenstern
de32223c36 Added UnitAction unique type for modder clarity and ruleset validation 2023-10-01 11:12:26 +03:00
Yair Morgenstern
6a2b483640 4.8.9 2023-10-01 10:17:19 +03:00
Yair Morgenstern
736d737abf
Version rollout (#10202)
* Bump version and create initial changelog entry

* Update Spanish.properties (#10201)

I'm not sure about using an  '@' for indicating both grammatical genres.

I mean, the current use is not wrong, but it bothers me that something's genres are feminine/masculine and the article used is the opposite.

On the other side, I don't know if it looks clean, nice or professional to use these variants, not only the '@', but the '/a' as well.
But it really calms my mind.

* Add required Russian translations (#10200)

* Update Bulgarian.properties (#10193)

* Update Italian.properties (#10191)

* Update Italian.properties

* Update Italian.properties

* Update German translation (#10189)

* Update Brazilian_Portuguese.properties (#10188)

* Update Polish.properties (#10186)

* Update Polish.properties

* Update Polish.properties

* Update French.properties (#10185)

* Update Simplified_Chinese.properties (#10184)

6365 rows. The value is wrong. "Units heal 10 health per turn in enemy territory or neutral land"  should translate to "在异国领土和无主的领土上,每回合会恢复10点生命值" and not "在异国领土和无主的领土上,每回合会恢复15点生命值"。

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Nicolas Flamme <nclsf87@gmail.com>
Co-authored-by: Dob <100198047+dobval@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@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: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: liweishu <44702553+liweishu@users.noreply.github.com>
2023-10-01 10:12:46 +03:00
SomeTroglodyte
8f7acf37d2
Pedia pixel units (#10187)
* Display Pixel Unit Art in Civilopedia

* Pixel Unit Art in Civilopedia - Setting UI

* Change FormattedLine.extraImage sizing to apply to longer coordinate

* Pixel Unit Art in Civilopedia - better centering using 'crop to content'
2023-10-01 09:45:02 +03:00
SomeTroglodyte
9ade2fbcc5
Fix top bar layout (#10190)
* Fix topbar layout never going back to default un-moved floating buttons

* Tweak topbar resources layout so the half-moved floating buttons triggers earlier, and swap turns label back to the left
2023-10-01 09:44:19 +03:00
SeventhM
7288b0a442
Apply conditionals for free buildings to the destination city instead of the originating city (#10142)
* Apply conditionals for free buildings to the destination city instead of the originating city

* Attempt 1 at addressing issues

* Forgot matching uniques for cities

* Forgot import

* Remove the intended(?) non functional removal of free buildings on capture
2023-10-01 09:44:05 +03:00
SomeTroglodyte
0f75947d18
City overview restore fixed header (#10197)
* More SortableGrid comments

* Fix City Overview header row

* CityOverviewTab minor lint

* Documentation for the 'Gdx Scene2D debug' option

* Lint - TabbedPager sort imports and some spaces
2023-10-01 09:43:53 +03:00
Yair Morgenstern
6d6dc51bea
Get rid of old religion style actions!!! (#10192)
* Giant refactoring - get rid of old religion style actions!!!

* Added special promotion to replace Great Mosque of Djenne ability

* removed double promotion added my mistake

* Added AI recognition of cities with bonus spread religion charges

* Added "disallowed for pantheon" filtering to new unit actions

* merge unit action changes with religion action changes

* Use new invokeUnitAction function for simplicity

* revert inquisitor unique change used for tests

* separate modifier side effects from old-style side effects

* Use canUSe shorthand for clarity
2023-10-01 09:43:26 +03:00
Yair Morgenstern
2560d73f7d #10183 - Can still spectate AI-only matches in singleplayer 2023-09-28 21:03:47 +03:00
Yair Morgenstern
bb0dca8651 resolved #10183 - New online multiplayer no longer stuck when first player is human spectator 2023-09-28 21:01:16 +03:00
Yair Morgenstern
190d488c06 modding: Mod checker displays *all* unknown uniques 2023-09-28 20:46:31 +03:00
Yair Morgenstern
c14a94fa15 Unify 'get usable unit action uniques' to function 2023-09-28 16:37:35 +03:00
Yair Morgenstern
03e09d85ee refactor: introduced UnitActions.invokeUnitAction() to unify automation logic for unit actions 2023-09-28 15:45:21 +03:00
Yair Morgenstern
d1b2d652e3 reorg: Separated UnitActions into 3 files:
- UnitActionsFromUniques
- UnitActionModifiers
- UnitActions retains actions relevant to all units
2023-09-28 15:30:39 +03:00
Yair Morgenstern
6ffe13e780 "if it hasn't used other actions yet" conditional works with new limited unit actions ("<[amount] times>") - paves the way for real deprecation of religion action shenanigans 2023-09-28 09:25:35 +03:00
Yair Morgenstern
2363269814 AI 'found religion' takes the action from the list of unit actions, so player and AI ability to act are always the same 2023-09-28 09:11:34 +03:00
Yair Morgenstern
45db7ade2e isTriggerable fixed to reinclude timed uniques 2023-09-27 23:25:53 +03:00
Yair Morgenstern
50e0c0f4e0 refactor: unified 'is triggerable' logic 2023-09-27 18:04:48 +03:00
Yair Morgenstern
b6f3c8571f chore: Move files to correct folders 2023-09-27 13:19:13 +03:00
Yair Morgenstern
f69209029d performance: #10173 - Use string-to-type map to initialize type for uniques, this is the major time component of unique creation 2023-09-26 17:44:34 +03:00
Yair Morgenstern
5d22482a56
Version rollout (#10182)
* Bump version and create initial changelog entry

* Update Dutch.properties (#10174)

* Update Turkish.properties (#10171)

* Update Turkish.properties

Almost fully translated up to line 950 with very few lines untranslated to that point.

(do let me know if I did anything wrong I never used github before)
(but I did read the translating text so I did not change things like [amount])

* Update Turkish.properties

Changed a few things and translated up to 1000~

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

* Update Simplified_Chinese (#10168)

* Update Spanish.properties (#10166)

* Update French.properties (#10165)

* Update Polish.properties (#10164)

* Update Italian.properties (#10163)

* Update Brazilian_Portuguese.properties (#10162)

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: TheFighter <95092927+The-Fighter@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@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: Lesiakower <125187776+Lesiakower@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-09-26 17:36:45 +03:00
Yair Morgenstern
9c930347c3 performance: #10173 - Don't need to always create hashsets, don't need linked hash set 2023-09-26 16:56:16 +03:00
Yair Morgenstern
d5dffa928a performance: #10173 - Only check promotion circular references once, not once per promotion 2023-09-26 16:46:05 +03:00
Yair Morgenstern
59af72da3f performance: #10173 - Cache unique parameter validity for the same ruleset 2023-09-26 15:57:28 +03:00
Yair Morgenstern
d62408fd31 performance: Only build strings in ruleset validation when necessary 2023-09-26 14:56:46 +03:00
Oskar Niesen
700e24166a
AI Open Borders Offer fix (#10178)
* Increased declined flags time

* AI now only offers open borders if it has the relevant technologies

* Increased the factor of AIs wanting to fight instead of sign open borders
2023-09-26 14:47:25 +03:00
Oskar Niesen
920d819595
Fix Nuke Notification (#10167)
* Added notifications to Civs that didn't have tiles hit by nuke

* Changed notifications based on if the nuke fails to detonate

* Moved nuke notifications above unit hit notification

* Added translations for new messages

* Moved a line of code back to preserve original order

* Changed notification messages
2023-09-26 14:47:13 +03:00
SomeTroglodyte
1ec83c62bd
Fix City construction context menu changing Puppets (#10180) 2023-09-26 13:24:43 +03:00
Yair Morgenstern
0400bb5f51
Version rollout (#10161)
* Bump version and create initial changelog entry

* Update German translation (#10160)

* Russian.properties (#10156)

* Update Russian.properties

* Update Russian.properties

* Update French.properties (#10149)

* Update Brazilian_Portuguese.properties (#10148)

* Update Polish.properties (#10147)

* Update Italian.properties (#10145)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Anoant <143289571+Anoant@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2023-09-21 15:03:57 +03:00
Oskar Niesen
5fc49f8e22
Added return worker notification (#10140)
* Fixed owner not being notified when a worker is returned

* Changed notification to use a sequence of actions
2023-09-21 15:00:37 +03:00
SomeTroglodyte
4fcbd48662
Reorganize and fix WorldScreenTopBar (#10154)
* Reorganize WorldScreenTopBar and change its update to rebuild the cells instead of tweaking layout

* Fix layout error: filler backgrounds looking too small
2023-09-21 15:00:13 +03:00
SomeTroglodyte
b6db8df484
Allow Space Key to close PlayerReadyScreen (#10155) 2023-09-21 14:59:34 +03:00
Oskar Niesen
5a8f18f726
Liberate civ open borders fix (#10150)
* Liberating a city from a destroyed Civ now gives open borders

* Conquering civ no longer offers open borders to the civ being liberated.
2023-09-21 14:59:22 +03:00
Yair Morgenstern
0d942ac175 Reload images when downloading or removing a mod 2023-09-21 14:58:23 +03:00
Yair Morgenstern
92b71102e1 Fixed mod compatibility autochanges
Tested by forcing a new Deciv game to load with a much older mod version
2023-09-21 14:37:21 +03:00
Yair Morgenstern
ebfdbb8c4a debug: More details for destination tile when failing to move to a tile 2023-09-21 14:17:42 +03:00
Yair Morgenstern
7de4853b54 resolved #10137 - mod checker accepts era for unit type 2023-09-18 10:01:50 +03:00
Yair Morgenstern
6585cc0eb0
Version rollout (#10143)
* Bump version and create initial changelog entry

* Update Catalan.properties (#10138)

* Update Russian.properties (#10136)

* Update Russian.properties

* Update Russian.properties

Corrections of aztecs cities

* Update Polish.properties (#10134)

* Update Dutch.properties (#10133)

* Update Brazilian_Portuguese.properties (#10132)

* Update Bulgarian.properties (#10131)

* Update Spanish.properties (#10129)

* Update Polish.properties (#10128)

* Update Italian.properties (#10123)

* Update French.properties (#10122)

* Update Russian.properties (#10120)

* Update German translation (#10118)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Anoant <143289571+Anoant@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: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Dob <100198047+dobval@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: hotorcelexo <IgorPolyakov@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
2023-09-18 10:00:09 +03:00
Oskar Niesen
cc1624604e
AI diplomatic actions rework (#10071)
* AI now can offer declaration of friendship

* AI now offers open borders

* Added spectator notifications for DoFs and defensive pacts

* AI now wants friendship less as more Civs die

* Re-added spectator notifications that weren't added in the merge

* Replaced min with coerceAtLeast

* Replaced .filter and .count() with .count

* Removed some minus DoF motivation modifiers being in a military focus.

* Fixed AI offering open borders with City-States

* AI now signs defensive pacts

* Increased motivationToAttack weight when determining value of a declaration of friendship

* Removed double trade processing and notifications from Treaties

* Removed commented code

* Added wantsToSignDefensivePact

* Added defensive pact trade evaluation

* Revert "Removed commented code"

This reverts commit 6476a08d26.

* Revert "Removed double trade processing and notifications from Treaties"

This reverts commit 371e8e8a62.

* Changed wantsToSignDefensivePact to use a for loop

* Changed chance to consider offering a defensive pact back to 30%

* Added DeclinedOpenBordersFlag

* Added DeclinedDeclarationOfFriendshipFlag

* Civ AI now has a positive modifier when friends with under 1/4 of alive Civs

* AI values friendship based also on relative strength

* Changed AI valueing of a defensive pact

* AIs not use DeclinedDeclarationOfFriendship flag

* Fixed otherCivNonOverlappingDefensivePacts causing error with unmet Civs
2023-09-18 09:48:22 +03:00
SomeTroglodyte
ae19a7bd0a
Readability helpers for Map of Sets: add, contains (#10116) 2023-09-18 09:46:55 +03:00
SomeTroglodyte
a3d431155d
A "Status" column for City Overview (#10126)
* Avoid the detekt false positive for typed lambda `it` and its comment

* Fix regression of what-is-a-garrison (8952)

* Initial implementation of "Status" column

* "Status" column gets a header icon
2023-09-18 09:46:29 +03:00
SomeTroglodyte
e59426fb03
Generic Widget/Provider framework for sortable grids (#8962)
* City Overview reorg - adding a Column should get easier

* City Overview reorg - patch

* City Overview reorg - SortableGrid Widget

* SortableGrid Widget - cleanup

* Generalize equalizeColumns

* SortableGrid framework - cleaner v2

* Revert file rename to facilitate merge

* Post-merge missed change

* SortableGrid merge fix

* Resolve wildcard import

* Post-merge fix: showOneTimeNotification

* Post-merge fixes

* Post-merge cleanup

* More Post-merge cleanup

* Fix sort (bug symptom: dependence on column click order)

* Tooltip update to "fix" icons if hideIcons=false

* Allow hideIcons control for grid header Tooltip

* Lint String.tr() Kdoc

* Move getComparator() default implementation to interface

* Nicer getComparator() implementations, better sorting for WLTK column

* Fix "Tooltip update to "fix" icons" reverting tooltip color

* Suppress detekt false positives

* Fix merge error
2023-09-13 19:42:22 +03:00
Yair Morgenstern
0be6cd062f 4.8.5 2023-09-13 11:17:57 +03:00
Yair Morgenstern
55809c9b22 Unique deprecation - "Receive free [unit] when you discover [tech]" replaced with trigger + condition, tested 2023-09-13 11:11:37 +03:00
Yair Morgenstern
550e18689a
Version rollout (#10115)
* Bump version and create initial changelog entry

* Update Korean.properties (#10112)

* Update Polish.properties (#10110)

* Update Brazilian_Portuguese.properties (#10109)

* Update Simplified_Chinese (#10108)

* russian (#10106)

* Update Russian.properties

Corrections some cities

* Update Russian.properties

def. pact with..

* Update Spanish.properties (#10105)

* Japanese translation (#10104)

* Randomly chose not translated strings.

* Some more translation

* Some more translation

* Added more translation

* Chinese names

* Update Japanese.properties

Fixed 2 typos

* Update Catalan.properties (#10103)

* Update French.properties (#10102)

* Update German translation (#10099)

* Update Italian.properties (#10098)

* Update Italian.properties (#10097)

Co-authored-by: Tommaso Petrolito <tpetrolito@deloitte.it>

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Yattong the Mackerel <saud2410@naver.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: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: Anoant <143289571+Anoant@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: 有賀 清一 Seiichi Ariga <seiichi.ariga@gmail.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: TommasoPetrolito <tommasouni@gmail.com>
Co-authored-by: Tommaso Petrolito <tpetrolito@deloitte.it>
2023-09-13 10:33:59 +03:00
Oskar Niesen
16d716d794
Removed double notifications and processing of treaties when traded (#10101)
* Removed double notifications and processing of treaties when traded

* Added comment to only processing one side of the trade
2023-09-13 10:28:07 +03:00
SomeTroglodyte
8e3ebc7724
Global Constructions Blacklist (#10061)
* Improved handling of "Nothing" construction

* Suppress "All" entries when you have only one city

* Global Construction Blacklist

* Reviews

* Reviews - missed renames
2023-09-13 10:27:43 +03:00
SomeTroglodyte
8aeae30050
Prevent selling free buildings (#10094)
* A few yield extensions - use in existing code to do later

* Refactor getFreeBuildings to allow hasFreeBuilding not enumerating all

* Prevent selling free buildings - with a little easter egg

* Test translatability

* Shift "Free Building" methods towards preferring object parameters

* Remove easter egg

* Linting and improving Kdoc precision

* Linting and improving Kdoc precision: CityConstructions
2023-09-13 10:27:32 +03:00
SomeTroglodyte
6016754a18
Defense against Circular upgrade paths in mods (#10114)
* Convert stack overflow into explicit exception when a mod has recursive unit upgrade/replaces

* RulesetValidator detects recursive unit upgrade/replaces
2023-09-13 10:26:47 +03:00