* Refactor: change GameSaver from singleton to single instance pattern & move autosave logic info GameSaver
Singleton just doesn't make sense anymore when we have to `init(..)` with different arguments, then we should just make a normal class out of it
* Fix not correctly checking for missing external files dir
* Refactor: use more appropriate library method
* Add logging for external files dir
* Added more unit tests for uniques; added missing implementations
* This of course shouldn't go here as there is another function for it
* Stylistic changes
* This generates better unique examples
* Reviews
* Reordered for efficiency
* Reverted improvement percentage bonuses applying to tiles
* Unused import directive
* Unused symbols
* Unnecessary constructions
* Redundant constructions
* Some optimizations
* Java interop issues: a package must match a location
* Collection .count() can be replaced with .size
* Class member can be "private"
* Call chain can be simplified
* Simplified conditions
* Proper use of variables
* Assignment styles
* Corrections after the code review
* Corrections after the code review - part 2
* Code review feedback: get them back to public
* Fix of the bad merging
* Code review: Lost spaces found their homes
* Bump version and create initial changelog entry
* Update Polish.properties a little (#6853)
* Add some random translations
* Translate the abbreviaation WLTK as DUK (Dzień Uwielbiania Króla)
* Add antoher random translation
* Update Simplified_Chinese.properties (#6852)
Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Anton <antek@sniec.pl>
Co-authored-by: xk730 <40309144+xk730@users.noreply.github.com>
* Delete Oil WellC.png
Since now offshore platform is back again, the "coastal" oil rig is obsolete now.
* Add files via upload
* Add files via upload
* Add files via upload
* Update HexaRealm.json
* Great General UniqueTyped and improved moddability - draft
* Great General UniqueTyped and improved moddability - reviews
* Great General UniqueTyped and improved moddability - no reason not to cache another
* Integration with JackRainy's solution
* Integration with JackRainy's solution - part 2
* Revert of maxGreatGeneralBonusRadius logic
* Minor refactoring
* Code review: minor refactoring
* Keep the warning for the modders about the obsolete unique
* Code review: Better wording for the unique
Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com>
* Great improvements can again be constructed on forest
This PR fixes a bug where great improvements couldn't be build on
forests/marshes/jungles/etc. It does so by creating a unique which
specifically allows for removing features, and checking for that.
Additionally, we only remove these features when we have the tech to
remove them. For example, you can no longer plonk an Academy down over a
forest without having researched mining.
* Missed the file for vanilla
* Reviews
* Fixed logic
In the repository, this file definitely has Unix line endings (\n). So generating it with \r\n causes it to always show changes, even though there aren't any
Sometime `TextField.cursorPosition` becomes greater than `TextField.text.length` for unknown reasons
In those cases we need to bring the cursor down to its maximum possible position which is `TextField.text.length`
Otherwise we will get `java.lang.StringIndexOutOfBoundsException` thrown from `kotlin.text.substring`
Not knowing the reason why it happens, I followed the libGDX implementation from here:
e03b757cae/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/TextField.java (L689)
And it seems to have fixed the errors we were getting
* Disabled CS buttons when at war; CS keep influence when at war with ally
This PR does two things:
- When you are at war with a city state, you can no longer give them
money, demand stuff, etc.
- When at war with the ally of a city state, your influence is frozen,
and after the end of the conflict set back to its original value.
To implement this last thing, I had to split the getter of `influence`
off of the underlying field, as otherwise when copying over the old
value in `.clone()`, we would copy over -60 when at war, instead of the
original value. Most of the changes in that PR are a result of that.
Also resets the `simulateUntilTurns` variable after completing
simulations
* Updated comment