* Handle subclassing of Events properly
Previously, you could only listen to the exact class
* Add relevant parent classes for the multiplayer events
* Refactor: use the old name as the main name in MultiplayerGameNameChanged event
* Add being able to stop listening to events in the EventBus
* Add tests for EventBus
* Refactor: Extract GameList into standalone file
* Refactor: safeUpdateIf to more generic throttle function
* Refactor: Extract multiplayer UI helper functions into separate file
* Refactor: Extract load/download multiplayer game into logic class from UI
* Make loading a multiplayer game automatically update the in-memory game in OnlineMultiplayer
* Refactor: Extract multiplayer settings into separate object
* Add multiplayer status display
* Fix error with multiplayer games not correctly being cleaned up after successful update
* Prevent loadLatestMultiplayerState() while next turn update is running
* Show "Working..." while waiting for next turn calculations instead of "Waiting for [civ]..."
* Fix race condition while updating online game state
* 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
* Move UncivServer to own module (and jar)
* UncivServer isalive logged
* Separate UncivServer - some wiki hints
* Separate UncivServer - how to build UncivServer.jar
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Create turn notifier for when the game is running for Windows
If playing on Desktop, you often put the game into background, but still want to know if it's your turn. A standard Windows function for that is `FlashWindow` from winuser.h, which is implemented here
* Fix: Use the window from the listener instead of the static one from libGDL
* Only notify if it's the turn of the player that is playing
* Always notify spectators of the next players' turn
* Refactor: Move notifier into GeneralPlatformSpecificHelpers
* Only load Windows DLL when we're actually on Windows
* Background implementation for Unciv server with ktor.
Server ip in settings, able to copy your own ip and copy ip from clipboard for easy sharing, created stub for the client-server data transfer. No actual data storage or server implementation.
* Unciv server round 2 - implementing crud for files and it works!
metadata seems to only be in use for mutex, which is currently unused
That's all for today
* When starting a new multiplayer game the files are correctly saved in the server, and the server can return the files, but the function in the game to retrieve the game info is non-blocking so it doesn't work. Still, progress!
* Changed the Gdx http to basic Java http, as used for Dropbox, and now everything works!!!!
* Documentation for running and using the server
* Better texts, translations, etc
* Trog is right this should be a PUT not POST
* Gradle build tools upgrade
Apparently the magic is rewriting a specific line in the Android build file and downloading Android SDK 30.0.3
* Added wiki change, isn't that nice :)
Upgrading to 7.1 gives us the fun java.lang.NoSuchMethodError: 'void org.apache.commons.compress.archivers.zip.ZipFile.<init>(java.nio.channels.SeekableByteChannel) error so let's not
* Upgrading to LWJGL 3, which is now the default, as of LibGDX 1.10.1
MacOS running problem solved by adding JVM args to desktop build.gradle
Should resolve#5601
* Apparently, keyTyped is ONLY for character keys. Esc and f12 are non-character keys, so we need to change from keyTyped to keyDown.
How does this affect out ctrl combinations? Dunno yet :) I couldn't find any actual uses in code, but it shouldn't be worse than keyTyped
This commit can be cherry-picked into the master branch as a preparation for the move to lwjgl3
Instead of forcing reflection to depend on latest kotlin version, I have a feeling the dependency is due to older mockito depending on older reflection.
Checking the Github actions shows that this doesn't seem to work with the current Github actions due to version confllicts, we'll need to resolve those