* 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
* Refactor: Move classes into their own files
* Handle 404 FileNotFound in UncivServer
* Refactor: Rename method
* Make GameSaver.saveGame throw the exception by default if it is not handled
* Add possibility to work with FileHandles in GameSaver
* Make OnlineMultiplayerGameSaver load the multiplayerServer setting each time it does something
This theoretically makes it unnecessary for the OnlineMultiplayerGameSaver to be re-instantiated each time it is used
* Refactor: Remove duplicated code
* Refactor: Extract NextTurnButton from WorldScreen
* Refactor: Remove WorldScreen-specific code from OptionsPopup
* Use kotlin coroutines everywhere instead of plain threads
This probably also cuts down on our raw thread usage, improving performance, since we now use a cached thread pool (in addition to coroutines being able to reuse threads anyway)
* Improve deep load from notification
* Refactor: Give music download coroutine the proper name
* Make Civilopedia independent of worldScreen or gameInfo
* Make Civilopedia callable from Main Menu
* Era category for Civilopedia
* Era category for Civilopedia - atlas
* Replacements for existing UniqueTypes
* More typed uniques are added
* Migration to the typed uniques
* Minor optimization
* More general approach on UniqueType usage
* Better wording for the UniqueType
* Resolved#6767 - AI will not declare war if it definitely can't take a city
* Not sure what would happen if you try to calculate damage for civilian attacker and don't care to find out
* Added rate limit handling to dropbox
+ some refactor to make the whole file one object
* Added error messages on rate limit reached
+ refactored some popup code to reduce repetition
* Fixed merge error
* Made variables private
* Fixed file upload not working
because of missing override flag for dropbox
* Stop multiplayer refresher if rate limit reached
* Fixed typo
* Various code changes/fixes
- ErrorResponse var name has to be `error` because that's how DropBox's json property is named
- Change FileStorageRateLimitReached exception to store the seconds remaining as its own property instead of in the message
- Use toIntOrNull to avoid setting defaults in two places
* Fixed missed exception message
Co-authored-by: Azzurite <azzurite@gmail.com>
* Ranged units should use ranged strength when defending against ranged attacks.
* Renamed variable plus some minor style cleanup
Co-authored-by: OptimizedForDensity <>
* Create posh
* HexaRealm tile sprites upload (part 1)
* HexaRealm tile sprites upload (part2)
* HexaRealm tile sprites upload (part 3)
* Upload HexaRealm.json
Should have no problem in terms of most of the layering!
* Delete posh
* Delete bana.png
* vpn/proxy issues when creating new mp game
replaced redundant ping with opening a connection to dropbox to fix the proxy issue
* updated error message to include dropbox
* check multiplayerServer url if the user is playing on it
* use `https://content.dropboxapi.com` instead of `https://www.dropbox.com`
* fixed proxy issues on android
if connected to proxy but no internet access it will freeze for a couple seconds (until it finishes the for loop) but it works
* forgot to add the imports
* removed android sdk network check to fix proxy issues
* check for internet now separate from check for multiplayerServer
removed frunctions from PlatformSpecificHelpers__
* added improvements made by touhidurrr
* removed unused imports and replaced setter with property access syntax
Co-authored-by: Md. Touhidur Rahman <46617994+touhidurrr@users.noreply.github.com>