Commit Graph

9670 Commits

Author SHA1 Message Date
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
Yair Morgenstern
a2f2b1c009
Version rollout (#10334)
* Bump version and create initial changelog entry

* Update Bulgarian.properties (#10333)

* Update Bulgarian.properties

* Update Bulgarian.properties

* Update Bulgarian.properties

typo: thinkToSelect --> thingToSelect

* Update Spanish.properties (#10328)

* Update Spanish.properties

* Update Spanish.properties

* Update Indonesian.properties (#10327)

* Update Finnish.properties (#10326)

* Translate a number of strings to Ukrainian (#10322)

Co-authored-by: Kostiantyn Ko <mormat.iam@gmail.com>

* Update Swedish.properties (#10313)

---------

Co-authored-by: yairm210 <yairm210@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: kensvin <kensvin28@gmail.com>
Co-authored-by: Gekko03 <148203740+Gekko03@users.noreply.github.com>
Co-authored-by: Kostiantyn Ko <test9@mormat.name>
Co-authored-by: Kostiantyn Ko <mormat.iam@gmail.com>
Co-authored-by: Mr-Bajs <93934125+Mr-Bajs@users.noreply.github.com>
2023-10-23 10:08:47 +03:00
SeventhM
b687d84e54
Allow "[stats]" unique on terrains (#10324)
* Allow "[stats]" unique on terrains

* send stateForCondtitionals in method call
2023-10-23 10:02:58 +03:00
PLynx
2dfac21004
Added five new uniques (#10311)
* Added two new Conditional Uniques

These are:
- <when above [amount] gold>
- <when below [amount] gold>

* Added Remove Building unique

It has two parameters: buildingFilter and cityFilter

* Minor example update

* Applied the corrections proposed by SomeTroglodyte

* Update uniques.md

* Slightly changed an unique text

Removed "in" word from the unique

* Updated the Stat Conditional to support more stats

Now supports more stockpileable Stats
- Gold
- Faith
- Culture
- Science

* Added the game speed-adjusted conditionals

Now there are 5 uniques in my pull request

* Integrated the Stat and Resource Conditionals

Requested by @yairm210

* Applied the suggestions of @yairm210

* Applied the suggestions of @yairm210 again

I hope my PR is ready to merge
2023-10-23 10:02:42 +03:00
SomeTroglodyte
482900f07b
Fix android pause (#10318)
* Fix MusicController Pause handling for Android's pause event

* Revert inadvertent instrumentation change
2023-10-16 09:39:20 +03:00
SomeTroglodyte
9efefcce27
PolicyPickerScreen description links to Civilopedia (#10319) 2023-10-15 18:03:43 +03:00
SomeTroglodyte
c6f820b0f2
Remove UniqueTarget.Terrain from UniqueType.Stats as there is no implementation (#10321)
* UniqueType.Stats has no implementation for Terrain, remove UniqueTarget

* Generated Docs
2023-10-15 18:03:30 +03:00
Yair Morgenstern
31f3439f60 4.8.13 2023-10-13 11:48:33 +03:00
Yair Morgenstern
bfa64ea18d
Version rollout (#10312)
* Bump version and create initial changelog entry

* Update Catalan.properties (#10310)

* Fix Manufactory name (#10306)

* Fix Manufactory name

Like, why on earth was it called the same as the factory??

* Update Spanish.properties

* Update Spanish.properties

* Update Japanese.properties (#10269)

* Update Japanese.properties

* Update Japanese.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: North Field <56919414+Harukin1030@users.noreply.github.com>
2023-10-13 11:42:15 +03:00
SeventhM
e587f28a88
Fix auto assign production not working after a building is built (#10299)
* Fix auto assign production not working after a building is built

* Fix issues in online multiplayer and remove validation in addbuiling
2023-10-13 11:38:43 +03:00
SeventhM
3eff519264
Fix consuming resources not being affected by conditionals (#10270)
* Fix consuming resources not being affected by condtionals

* Add requirements from buildings back in

* one too many parenthesis

* Whoops, forgot a bracket

* Fix Iconstruction

* Accidental font regression

* Address suggested changes
2023-10-13 11:37:57 +03:00
SomeTroglodyte
249241247b
Allow games with zero researched techs to be 'before' the Ancient Era (#10309) 2023-10-12 20:38:36 +03:00
SomeTroglodyte
353a2c8153
Minor Fix: VictoryScreenIllustrations (#10298)
* Fix VictoryScreenIllustrations

* Remove obsolete line
2023-10-09 22:31:13 +03:00
SomeTroglodyte
13e3baac74
Split Fonts.kt (#10267)
* Fix font "symbols" not showing

* Move Fonts.kt to sub-package

* Re-sort imports

* Move top-level constants to prepare split

* Split Fonts.kt each existing class to its own file

* Split off FontRulesetIcons

* Linting and comments
2023-10-08 22:03:53 +03:00
SomeTroglodyte
6d4603431b
Fix font "symbols" not showing (#10266) 2023-10-08 21:38:23 +03:00
Yair Morgenstern
6dc7f0ec4c chore: 'use gold' automation from NextTurnAutomation
Cleaned up Tile.kt a bit by moving single-use functions to where they are used
2023-10-08 17:15:53 +03:00
Yair Morgenstern
dd67a7d3df chore: Extract city resource functions from City file 2023-10-08 13:06:48 +03:00
Yair Morgenstern
ee9f735e9f chore: Removed dead functions 2023-10-08 12:56:59 +03:00
Yair Morgenstern
8293d78ec5 chore: Split 'city state civ diplomacy table' from DiplomacyScreen 2023-10-08 12:44:48 +03:00
Yair Morgenstern
9c2a8a6406 chore: Split 'major civ diplomacy table' from DiplomacyScreen 2023-10-08 11:57:58 +03:00
Yair Morgenstern
2bd65f9f42 chore: Extracted all 'next turn' logic from DiplomacyManager to DiplomacyTurnManager 2023-10-08 11:48:33 +03:00
Yair Morgenstern
b2a29f1be2 4.8.12 2023-10-07 22:33:00 +03:00
Yair Morgenstern
e7aef72e93
Version rollout (#10264)
* Bump version and create initial changelog entry

* Update Dutch.properties (#10260)

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update German translation (#10256)

* Update Spanish.properties (#10251)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: EmperorPinguin <99119424+EmperorPinguin@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
2023-10-07 22:18:29 +03:00
Yair Morgenstern
d714b00dd7
Separate unit automation from other actions (#10248)
* Separate unit automation from other actions

* Change field name
2023-10-07 22:02:22 +03:00
Oskar Niesen
a81d5f0837
AI now uses free tech points (#10245)
* AI now uses free tech points

* Refactored chooseTechToResearch

* Reverted combining lists to use a +
2023-10-07 22:00:49 +03:00
SomeTroglodyte
49e2979427
Align ruleset icons in text to font metrics (#10233)
* Try to respect actual font layout, so fontSizeMultiplier works for ruleset icons too

* Replace font-based nation symbol in top bar with statically sized actor

* Reuse getReadonlyPixmap in extractPixmapFromTextureRegion

* Tweak topbar selected civ vertical align to be more pleasing to the human eye

* FasterUIDevelopment missing implementation of FontMetricsCommon

* Address hardcoded pixel coordinates comment

* Readability and comment cleanup

* More readability changes
2023-10-07 22:00:30 +03:00
SomeTroglodyte
5db8489bcb
Tweak FasterUIDevelopment to offer normal Scene2D debugging, and some linting (#10263) 2023-10-07 21:58:19 +03:00
SomeTroglodyte
459b00ee22
Pure package reorg: Widgets (#10261)
* Move AutoScrollPane

* Move BorderedTable

* Move ColorMarkupLabel

* Move ExpanderTab

* Move KeyCapturingButton

* Move LanguageTable

* Move SortableGrid

* Move TabbedPager

* Move TranslatedSelectBox

* Move UncivSlider

* Move UnitGroup

* Move WrappableLabel

* Move ZoomableScrollPane
2023-10-07 19:25:06 +03:00
Yair Morgenstern
8e7a467496 chore: Separated 'declare war' logic from DiplomacyManager 2023-10-05 10:55:17 +03:00
Yair Morgenstern
f5e10b4d44 4.8.11 2023-10-05 10:39:22 +03:00
Yair Morgenstern
7185fea243 chore: Split MapGenerationRandomness from MapGenerator 2023-10-05 10:38:47 +03:00