Commit Graph

9483 Commits

Author SHA1 Message Date
Yair Morgenstern
f52e7d37f4 chore: Split normalizeStart into subfunctions for easier parsing 2023-10-02 12:06:16 +03:00
Yair Morgenstern
f90d8ba267 chore: Separated MapRegionResources with more functions related to placing resources in tiles 2023-10-02 11:38:57 +03:00
Yair Morgenstern
4d81a62b8f chore: Started splitting resource functions into separate class from MapRegions 2023-10-02 11:27:00 +03:00
Yair Morgenstern
1e085eb60a chore: Split MapRegions into class files, first step of refactor 2023-10-02 11:10:48 +03:00
Yair Morgenstern
9386e4a7ce 4.8.9-patch2 2023-10-01 16:04:04 +03:00
Yair Morgenstern
43ff2ac1f5 Fixed unique validation refactor breaks 2023-10-01 15:29:04 +03:00
Yair Morgenstern
c4aeb4d32a chore: Split conditional unique validation to separate function 2023-10-01 15:09:54 +03:00
Yair Morgenstern
6d56fafbbe chore: Split RulesetValidator into subfunctions for easier parsing, and separate class for unique validations 2023-10-01 14:46:45 +03:00
Yair Morgenstern
c15e72c25a Resolved #10194
Problem was that updating the select box was inconsistent
Simplified by
- Separating 'do we have maps' and 'do we have recent maps' logic from the loading of all maps
- Map loading done in one continuous thread not one-per-map
- Only the map-loading thread triggers selectbox load
2023-10-01 14:31:50 +03:00
Yair Morgenstern
ffd77c82d8 4.8.9-patch1 2023-10-01 13:52:00 +03:00
Yair Morgenstern
98ef5186af Revert "Apply conditionals for free buildings to the destination city instead of the originating city (#10142)"
This reverts commit 7288b0a442.
2023-10-01 13:50:02 +03:00
Yair Morgenstern
8f00871044 performance: calculate current settler tile rank once, when comparing to other settlers around on first turn 2023-10-01 13:47:12 +03:00
Yair Morgenstern
ffc3a66707 Converted "May enhance a religion" unique to a UnitAction 2023-10-01 12:11:52 +03:00
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
Framonti
b01353eee7
Test city conquest functions (#10196)
* 💚 add tests covering most city conquest functions

* ♻️ change var to val when values don't change
2023-09-29 16:27:43 +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
30a499b426 4.8.8 2023-09-26 21:50:14 +03:00
Yair Morgenstern
7dfeaf9c06 4.8.8 2023-09-26 17:46:05 +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
46dd1cfc19 Added unitTypes json schema 2023-09-24 12:24:41 +03:00
Yair Morgenstern
f13bb7990f Added techs json schema 2023-09-24 12:15:22 +03:00
Yair Morgenstern
daafa5104f Added tileImprovement json schema 2023-09-24 12:05:00 +03:00
Yair Morgenstern
fc02ac8825 Added nations json schema 2023-09-24 11:55:54 +03:00
Yair Morgenstern
1447056d23 description testing on vscode showed we should remove pattern descriptions 2023-09-22 11:25:43 +03:00