Commit Graph

6499 Commits

Author SHA1 Message Date
SeventhM
a6ac9aa24d
Fix free buildings triggering from conditionals in incorrect places (#10532)
* ignore trigger condtional uniques

* Have UniqueTriggerActivation only add the buildings of its unique

* (minor optimization) move where we find the free building

* Once again I forget about imports
2023-11-22 23:59:53 +02:00
SomeTroglodyte
3604d82fa9
Add a map import tool able to read "Battle for Wesnoth" maps (#10541)
* Add a map import tool able to read "Battle for Wesnoth" maps

* Fix and explain vertical distortion
2023-11-22 23:59:22 +02:00
Sergey
30c4b323ec
Add a setting to forbid closing popups by clicking behind them (#10539)
* Add a setting to forbit closing popups by clicking behind them

* Change default checkbox state to false

* Update template and Russian translation
2023-11-22 23:59:07 +02:00
SomeTroglodyte
8bd2363361
[Linting] Some minor code purity stuff I came across (#10537)
* Centralize shift and control key detection (Unit multiselect now with right-shift too)

* Lint of an ugly curly brace placement - otherwise the original was fine

* Answer open question in comment

* Follow a Gdx 1.12 deprecation

* Another clarifying comment - on ScrollPane's built-in potential surprise that the constructor calls its own overridable public methods
2023-11-22 23:58:57 +02:00
Yair Morgenstern
4c8db02dfd
Initial scenario/dev console, with 1 command :D (#10540)
* Initial console, with 1 command :D

* add/remove city tiles

* add/remove units!

* Added command history, accessible with up and down keys

* 'add promotion' cli command

* 'remove promotion' cli command

* Enumified

* Converted enums into classes - enums are weirdly restricted in all kinds of uncomfortable ways

* Added autocomplete!
2023-11-22 23:41:09 +02:00
Ouaz
810392a55e
[Translation] Add back "general" unit types (#10526)
* Add back "general" unit types

These entries have been removed from translation files, making them untranslated in-game (in Civilopedia articles)

* Revert changes in template.properties

* Fix missing unit type translations

Fix by @SomeTroglodyte
2023-11-21 11:07:19 +02:00
Yair Morgenstern
8dc0db49e7 4.9.0 2023-11-20 23:15:39 +02:00
Yair Morgenstern
052df9c064 Better performance for 'best tile to found city' (minimized canReach calls) @tuvus 2023-11-20 23:08:18 +02:00
Yair Morgenstern
10cb51795c
Version rollout (#10530)
* Bump version and create initial changelog entry

* Update Brazilian_Portuguese.properties (#10528)

* Update French.properties (#10524)

* Update Italian.properties (#10522)

* Update Polish.properties (#10521)

* Update Polish.properties

* Added Fastlane_short_description

* Update Malay.properties (#10520)

Translated line 33 to line 325.
Not at all finished.
This time though I didn't mess up.

---------

Co-authored-by: yairm210 <yairm210@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>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Mikhail <151419244+MetaFBMI@users.noreply.github.com>
2023-11-20 22:52:44 +02:00
PLynx
e67fd6a28b
Add the SellBuilding Unique (#10514)
* Restored the SellBuilding Unique

* Rephrased SellBuilding unique
2023-11-20 22:47:47 +02:00
SeventhM
1744d1271f
Add gain stat modified by speed and improvement speed by filter uniques (#10443)
* Add gain stat modified by speed and improvement speed by filter uniques

* Fix rulesets

* Remove nonfunctional leftover resource text

* Reword improvement unqiue as suggested
2023-11-20 22:47:35 +02:00
Sergey
4adbd2e634
Add a TriggerUponDiscoveringTile unique type (#10523)
* Add a TriggerUponDiscoveringTile unique type

* Add a check for trigger presence
2023-11-20 22:47:17 +02:00
Yair Morgenstern
90767fce9a Resolved #10366 - City centers don't provide resources you don't have tech to extract 2023-11-20 22:47:05 +02:00
SomeTroglodyte
08c3f97f82
Support for Leader voices (#10395)
* Prepare Leader Voices: Framework

* Leader Voices: Hooks and corresponding text field comments

* Leader Voices: wiki

* Leader Voices: oops, comments

* Decouple voice play calls to make global modification easier

* Move voices to own folder and give them a separate volume setting

* Oops, template needed too

* Oops, wiki needed too
2023-11-20 22:21:30 +02:00
Yair Morgenstern
450813fa49 Settlers no longer stuck in endless loops wanting to found cities on tiles they can't reach @tuvus 2023-11-20 22:17:38 +02:00
SomeTroglodyte
987f67d9cd
[code quality] Reorg, clean up and comment a few things (#10527)
* UncivGame is a pure class file again, GUI split off

* Purify GameSettings step 1 - non-multiplayer nested classes

* Purify GameSettings step 2 - multiplayer nested classes

* Purify GameParameters - BaseRuleset to own file

* Rework WindowState to centralize minimum/maximum treatment

* Rename MultiplayerTurnNotifierDesktop to UncivWindowListener

* Clarifications on what the WindowListener actually does (and now the attention-getting does something on non-Windows too)
2023-11-19 23:52:15 +02:00
Yair Morgenstern
2a9ec81523 Resolves #10512 resolves #10425 - Conditional tile checks pre-placement 2023-11-19 23:04:35 +02:00
Yair Morgenstern
f833918177 Resolved #10525 - AI clears inquisitors from city centers to make way for spaceship units 2023-11-19 22:16:54 +02:00
Yair Morgenstern
e6bb9d4d9a More simplification of motivationToAttack 2023-11-19 15:56:21 +02:00
Yair Morgenstern
13d0ea51d5 Separated hasAtLeastMotivationToAttack into separate class, split into subfunctions for main function readability 2023-11-19 15:52:16 +02:00
Yair Morgenstern
62687c2230 Unified errorSeverityForFilter checks into single function, we have a LOT of filters! 2023-11-19 00:10:08 +02:00
Yair Morgenstern
fb1e57668e Added tests for parameters for complex filters, fixed nested complex filter returning 'possible filtering' when it should have been known 2023-11-19 00:06:34 +02:00
Yair Morgenstern
9488aa6415
Version rollout (#10519)
* Bump version and create initial changelog entry

* Update Dutch.properties (#10513)

* Update French.properties (#10506)

* Update Italian.properties (#10504)

* Update Polish.properties (#10502)

* Update Polish.properties

* Update Polish.properties

* Update Polish.properties

* Update Brazilian_Portuguese.properties (#10495)

* Update Catalan.properties (#10479)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@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: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
2023-11-18 22:43:48 +02:00
SomeTroglodyte
98c3c446c5
Allow controlling Android fullscreen from options (#10518) 2023-11-18 22:38:36 +02:00
SomeTroglodyte
0d077ee099
(UX, minor) Change "took tile damage" notification to **select** the poor victim (#10471)
* Change "took tile damage" notification to select the poor victim

* Convenience constructor for NotificationAction:MapUnitAction

* More verbose Kdoc for MapUnitAction
2023-11-18 22:35:41 +02:00
SeventhM
accb62a0ed
Fix unit triggers not triggering/triggering off the wrong units (#10496) 2023-11-18 22:35:01 +02:00
Oskar Niesen
6fe9b7ea7f
AI diplomacy balancing (#10476)
* Merged Original AIDiplomacyBalancing changes to this branch

* Fixed being over supply resulting in the civ not attacking

* Fixed "War with allies" motivation not being added
2023-11-18 22:34:46 +02:00
Framonti
8c9e6b07e0
Test/add tests for cityexpansionmanager (#10510)
* improve error message and add test for precondition checking

* add tests for CityExpansionManager
2023-11-18 22:34:26 +02:00
Yair Morgenstern
167f25cacd Modding: Added "non-[filter]" and multi-value filtering to Tile filter 2023-11-18 22:34:04 +02:00
Yair Morgenstern
ddf8b449b3 Modding: Added "non-[filter]" and multi-value filtering to Improvement filter 2023-11-18 22:30:07 +02:00
Yair Morgenstern
5484576640 Modding: Added "non-[filter]" and multi-value filtering to Terrain filter 2023-11-18 22:27:47 +02:00
Yair Morgenstern
2a862aa895 Modding: Added "non-[filter]" and multi-value filtering to Building filter 2023-11-18 22:23:22 +02:00
Yair Morgenstern
68fd3d74b3 Modding: Added "non-[filter]" and multi-value filtering to Nation and Civ filters 2023-11-18 22:20:47 +02:00
Yair Morgenstern
dc6413d707 Modding: Added "non-[filter]" filtering for unit filters
Cleaned up unit filter validations to match actual filters
2023-11-18 22:16:43 +02:00
Yair Morgenstern
2b0568f025 Modding: Added "[relativeAmount] Air Interception Range" unique 2023-11-18 19:16:33 +02:00
Yair Morgenstern
870c146e34 Resolved #10474 - Add/remove attack images on the tile, even if the attacked unit has meanwhile been killed 2023-11-14 12:52:47 +02:00
Yair Morgenstern
e8b9864287 Resolved #10478 - *internal* tilesets to load are now determined pre-loading, to minimize concurrent modification exceptions 2023-11-14 12:18:05 +02:00
Yair Morgenstern
dfcedb6267 Resolved #10494 - dim resources on tiles not immediately visible 2023-11-14 11:51:03 +02:00
Yair Morgenstern
46e39d7d38
Bump version and create initial changelog entry (#10492)
Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
2023-11-13 22:34:21 +02:00
Yair Morgenstern
643f98b53f Resolves #10486 2023-11-13 22:33:29 +02:00
SomeTroglodyte
0029d08c5b
Patch for on-screen keyboard hiding pedia search results (#10469) 2023-11-13 22:26:49 +02:00
SomeTroglodyte
659a01c166
CrashScreen info improved, allow easier testing of CrashScreen (#10485)
* Drop AndroidTvLauncher - unused

* Additional memory info on Android CrashScreen

* Refactor getModsAndBaseRuleset - reduce clones and put base first

* Add Permanent audiovisual Mods to CrashScreen report

* Add a secret Debug option to intentionally crash Unciv

* Make "Secret" debug OptionsPopup page available on Android w/o physical keyboard

* Add AndroidTvLauncher back in

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2023-11-13 22:26:38 +02:00
SomeTroglodyte
60e2af3bba
Fix "hidden from users" where Nation describes its unique Building (if it replaces an existing one) (#10467)
* Refactor: move UI functions from Building to BuildingDescriptions

* Move Nation "unique building" diff code to BuildingDescriptions, fix hidden ignore, equalize to how BaseUnitDescriptions.getDifferences works

* Fix translation errors for difference description "Lost ability"
2023-11-13 22:19:47 +02:00
SomeTroglodyte
2847f7a8c1
Rivers... Moddable Stats and Civilopedia (#10424)
* River yields moddable and Civilopedia entry

* Improve text and better fresh water explanations

* Map editor exclusion as Unique, for River and previously hardcoded Improvements

* Map editor brush to Civilopedia link, starting locations cleaned

* Some SeventhM input applied

* Reword River/Lakes/Oasis civilopediaText and comments again
2023-11-13 22:18:25 +02:00
Oskar Niesen
22a50c7d2d
Fixed land/sea nukes trying to act like air units (#10470) 2023-11-13 22:18:09 +02:00
SomeTroglodyte
27a783104c
(UX, QOL) World screen top stats row scales down to squeeze into available width (#10473)
* Let WorldScreenTopBarStats scale itself down when content exceeds available width

* Refactor scale mapper functionality into reusable ScalingTableWrapper

* Use ScalingTableWrapper on WorldScreenTopBarResources too

* Oops, they're now equal, but technically it should be prefWidth now, and the comment is moot
2023-11-13 22:17:58 +02:00
SomeTroglodyte
ec148309f7
Allow the "Civ destroyed" Notification to show a location (#10489) 2023-11-13 22:13:37 +02:00
SeventhM
8f1722498b
Fix Multiplayer spectator ids not logging (#10480) 2023-11-13 22:12:36 +02:00
Oskar Niesen
32639f1ff5
Fixed promise not to settle (#10488)
* Settlers now account for the AgreedToNotSettleNearUs

* If the two Civs are at war the AI no longer cares about AgreedToNotSettleNearUs
2023-11-13 22:12:23 +02:00
SomeTroglodyte
cfeed82800
Whitespace linting for opening curly braces and inheritance colon (#10490) 2023-11-13 22:11:55 +02:00