Commit Graph

8988 Commits

Author SHA1 Message Date
Xander Lenstra
3c1f0f7814
Spies in cities that are captured or destroyed now go to the hideout (#9632)
* Spies in cities that are captured or destroyed now go home

* Turned spy flee reason string into enum
2023-06-23 08:50:56 +03:00
Crsi
e1fb0e489d
Moved the default message to the ApiStatusCode enum (MPv2) (#9630) 2023-06-20 13:08:09 +03:00
SomeTroglodyte
ff54bcd493
Prevent mod conflicts better (#9586)
* Tighten mod check severity and selectivity for unit-producing triggered Uniques

* Prettify display of mod check results by suppressing dupes and hiding conditionals from tr()

* Extra confirmation to play with errors, colors, improved handling of mod checkboxes

* Tweaks to improved mod checking in new game
2023-06-19 19:02:09 +03:00
SeventhM
172fee9902
Change the default cost of buildings and the default time of tile improvements (#9621) 2023-06-19 19:01:40 +03:00
Yair Morgenstern
c0e5f9d736 Linked Unit Types and Promotions in Civilopedia 2023-06-19 16:04:35 +03:00
Yair Morgenstern
e987bbbaad Added new unique - "Automatically built in all cities where it is buildable" 2023-06-19 15:40:21 +03:00
Yair Morgenstern
4107e081bd 4.7.2 2023-06-18 18:29:55 +03:00
Yair Morgenstern
4579e37848
Version rollout (#9618)
* Bump version and create initial changelog entry

* Ukrainian translations :flag-ua: (#9615)

* update Simplified_Chinese (#9613)

* Updated Brazilian_Portuguese.properties (#9599)

* Update French.properties (#9597)

* Update Italian.properties (#9595)

* Update Italian.properties

* Update Italian.properties

* Update Polish.properties (#9594)

replaced symbols with polish letters

* Update Polish.properties (#9593)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Jack Rainy <JackRainy@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@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>
2023-06-18 18:26:18 +03:00
Crsi
bd3aa54670
Multiplayer v2: networking stack, dependencies & API definition (#9589)
* Added new ktor dependency for developing multiplayer API v2

* Added the api package, including endpoint implementations, cookie helpers, serializers and structs

* Fixed a bunch of problems related to error handling

* Fixed some API incompatibilities, added getFriends() method

Rename the Api class to ApiV2Wrapper, added a chat room screen

Replaced logging dependency, renamed the endpoint implementations

* Dropped the extra logger to remove dependencies, added the APIv2 class

* Restructured the project to make ApiV2 class the center

* Improved chat handling, added server game detail caching

Added a generic HTTP request wrapper that can retry requests easily

Added a default handler to retry requests after session refreshing

* Updated the API structs based on the new OpenAPI specifications

Switched endpoint implementations to use the new 'request', updated WebSocket structs

* Updated the auth helper, added the UncivNetworkException

Fixed some more issues due to refactoring APIv2 handler

Fixed some issues and some minor incompatibilities with the new API

* Implemented the LobbyBrowserTable, added missing API endpoint

Fixed login and auth issues in the main menu screen

* Added new WebSocket structs for handling invites and friends

Updated the API reference implementation

* Added GET cache, allowed all WS messages to be Events, added missing endpoints

Added func to dispose and refresh OnlineMultiplayer, only show set username for APIv2

* Reworked the ApiV2 class to improve WebSocket handling for every login

Added small game fetch, fixed lobby start, some smaller fixes

* Change the user ID after logging in to fix later in-game issues

Attention: Afterwards, there is restoration of the
previous player ID. Therefore, it won't be possible to
revert back to APIv0 or APIv1 behavior easily (i.e., without
saving the player ID before logging in the first time).

Added serializer class for WebSocket's FriendshipEvent enum

Fixed chat room access and cancelling friendships

* Fixed WebSocket re-connecting, outsourced configs

Updated the RegisterLoginPopup to ask if the user wants to use the new servers

Implemented a self-contained API version check with side-effects

Fixed various problems with WebSocket connections

Don't show kick button for lobby owner, handle network issues during login

* Added English translations for ApiStatusCode, fixed broken APIv1 games for uncivserver.xyz

Fixed subpaths in baseUrl, added server settings button

* Added WS-based Android turn checker, added a new event channel, fixed APIWrapper

Added a logout hook, implemented ensureConnectedWebSocket

Merge branch 'master' into dev

* Throttle auto-reconnect for WS on Android in background, added reload notice for your turn popup

Implemented real pinging with awaiting responses, fixed ping-related problems

* Adapted new getAllChats API, added outstanding friend request list, improved styling

* Added the ApiVersion enum and the ApiV2 storage emulator

* Updated the APIv2 file storage emulator

* Replaced all wildcard imports with named imports
2023-06-18 18:17:59 +03:00
SomeTroglodyte
fa68b8746e
Fix conditionals for trigger upon declaring friendship running twice (#9601) 2023-06-18 18:15:40 +03:00
SomeTroglodyte
123a51a6ef
Publish new mod category workflow (#9606) 2023-06-18 18:15:13 +03:00
SomeTroglodyte
d79c68b273
More keyboard binding work - World, World Menu Popup, WASD (#9598)
* Groundwork for tooltips for user-bindable keys

* WorldScreen keyboard revisited

* WorldScreen menu popup keyboard support

* WorldScreen WASD bindable
2023-06-18 18:11:10 +03:00
Xander Lenstra
5e9059cd1e
Small comment changes in UniqueType.kt (#9617) 2023-06-18 16:35:17 +03:00
Yair Morgenstern
c823989c39 Reverted BFS changes, since they caused significant performance degradation 2023-06-18 01:03:20 +03:00
Yair Morgenstern
298771a72b Revert "Workers try to build roads utilizing existing roads, and railroads overriding existing roads"
This reverts commit e558ebcc59.
2023-06-18 01:01:12 +03:00
Yair Morgenstern
291c546dec Performance improvements
- use existing map for building resource check, instead of iterating over uniques
- remove one retrieval for UniqueMap.addUnique

Idea for future improvement: setTerrainFeatures currently populates a UniqueMap for each tile. MANY tiles share the same set of features...
2023-06-18 00:45:34 +03:00
Yair Morgenstern
ead83b912b Performance improvements
- unit unique check uses map, not array search
2023-06-18 00:25:03 +03:00
Yair Morgenstern
e634423b2f Performance improvements
- containsBuildingUnique uses map, not array search
2023-06-18 00:01:36 +03:00
Yair Morgenstern
51583ab588 Performance improvements
- forCivGetMatchingUniques doesn't toString stateForConditionals if the result would anyway not be cached
2023-06-17 23:59:42 +03:00
Yair Morgenstern
259eeeb56c Performance improvements
- improvementFilter checks map instead of array for textual match
- forCityGetMatchingUniques does not string-serialize conditionals - revealed by flame chart to be significant
2023-06-17 23:47:49 +03:00
Xander Lenstra
639d34e28d
Reordered the region of other global uniques and wrote a few unique tests (#9611) 2023-06-17 20:59:51 +03:00
Yair Morgenstern
6be79671f3 Automated air units no longer lose "automated" state after moving between cities 2023-06-16 11:17:26 +03:00
Yair Morgenstern
7748b3f358 Deprecated "Can start an [amount]-turn golden age" unique 2023-06-16 11:07:48 +03:00
Yair Morgenstern
bc0965e73e Deprecated "Can construct [improvementName]" unique 2023-06-16 11:05:48 +03:00
SomeTroglodyte
7f626083ee
Fix and cache CannotMove unique (#9596) 2023-06-16 10:37:26 +03:00
SomeTroglodyte
ea505e3e97
Fix translation problems due to nested brackets in getDifferences (#9600) 2023-06-16 10:36:24 +03:00
Yair Morgenstern
670a08c0b9 4.7.1 2023-06-15 11:10:23 +03:00
Yair Morgenstern
11c6a88c68
Version rollout (#9592)
* Bump version and create initial changelog entry

* Update Hungarian.properties (#9588)

* Update Spanish.properties (#9582)

* template.properties re-sort, one missing entry (#9581)

* Updated Brazilian_Portuguese.properties (#9578)

* Update French.properties (#9577)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: JurDan | Werewolf Cookie <80947706+JurDan775@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
2023-06-15 10:59:39 +03:00
SomeTroglodyte
ce29aaf472
Improve Alert Popup scrolling (#9559)
* Revert AlertPopup button layout to pre-9513 state

* Fix merge mistake

* AlertPopup - patch

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2023-06-15 10:40:04 +03:00
Yair Morgenstern
c3db8ba971 AI prioritizes its path to buying highly desirable tiles 2023-06-14 09:58:02 +03:00
Yair Morgenstern
b776790556 AI prioritizes work boats, and creates work boats for close non-contiguous cities 2023-06-14 09:48:32 +03:00
Yair Morgenstern
e558ebcc59 Workers try to build roads utilizing existing roads, and railroads overriding existing roads 2023-06-14 09:31:32 +03:00
SomeTroglodyte
46a84c23b0
Make mod categories curated in Json (#9542)
* Dynamic mod categories from online query

* Move Working string to Constants

* Move Mod categories to json

* Move Mod categories to json - UI

* Move Mod categories to json - initial json
2023-06-14 09:12:24 +03:00
SomeTroglodyte
b0a1eed872
Scene2D debug tool (#9579) 2023-06-14 08:20:34 +03:00
SomeTroglodyte
c56644cd6d
Fix vulnerability of new NationPickerPopup icon view (#9587) 2023-06-14 07:28:45 +03:00
SomeTroglodyte
6a387fc7d2
Long press support (#9558)
* Refactor input-related components into own package

* Unified input event system with common routing for keys and gestures

* Minor Linting

* Apply input system to World map right-click

* Replace UnitActionsTable Upgrade info tooltip with UnitUpgradeMenu

* Optimize ShortcutListener's full-stage scan

* Post-merge fixes
2023-06-13 08:58:44 +03:00
SomeTroglodyte
d666c44697
Keyboard bindings - collision check (#9580) 2023-06-13 07:31:02 +03:00
Yair Morgenstern
02d7325576 UnitFilter also matches TechFilter for that unit 2023-06-12 23:13:47 +03:00
Yair Morgenstern
624eefccab 4.7.0-patch1 2023-06-12 23:02:38 +03:00
Yair Morgenstern
c27bb5d74d Revert "Make ExpanderTab "expand" properly (#9522)"
This reverts commit ae74dca074.
2023-06-12 22:54:37 +03:00
Yair Morgenstern
dc030bfbad 4.7.0 2023-06-12 19:25:40 +03:00
Yair Morgenstern
235fe86b72
Version rollout (#9573)
* Bump version and create initial changelog entry

* Updated Brazilian_Portuguese.properties (#9572)

* Update Polish.properties (#9568)

* Update French.properties (#9567)

* Update Italian.properties (#9566)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@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>
2023-06-12 19:14:19 +03:00
Yair Morgenstern
320309aadd Don't kill the multiplayer updater on *pause*, instead on destroy() "exit early" 2023-06-12 18:36:34 +03:00
Yair Morgenstern
61a90a4193 Fixed user-invisible crash on multiplayer updating thread when resuming game 2023-06-12 18:19:45 +03:00
Yair Morgenstern
1bd8c4fde7 Fixed crash when resuming EmpireOverviewScreen 2023-06-12 17:34:56 +03:00
Yair Morgenstern
685df48f5a AI more willing to take happiness risk to create a new city 2023-06-12 12:10:10 +03:00
Yair Morgenstern
71828349df AI only constructs Settler if it already has worker / improvements 2023-06-12 11:27:27 +03:00
Yair Morgenstern
e5232494a0 Improved AI city location picking
Done by ignoring tiles already belonging to another civ / within work range of another city
2023-06-12 10:27:26 +03:00
SomeTroglodyte
404a148cfb
Key bindings - unit actions, world screen and grouped UI (#8986)
* Keyboard Bindings: Simpler Widget

* Keyboard Bindings: Reset binding

* Keyboard Bindings: Simpler Widget - revert opening feature

* Keyboard Bindings Step 6: Unit Actions

* Keyboard Bindings Step 7: Grouped UI

* Keyboard Bindings Step 7: Grouped UI-TFW

* Keyboard Bindings Step 6: Unit Actions - patch

* Keyboard Bindings Step 9: World Screen

* Keyboard Bindings - German

* Keyboard Bindings: Fix merge errors

* Keyboard Bindings: Tiny forgotten things

* Merge fixes
2023-06-12 10:13:57 +03:00
SomeTroglodyte
e109848e28
Nation picker gets an Icon View, keyboard selection, and fixed sort (#9553)
* Nation picker gets an Icon View, keyboard selection, and fixed sort

* Minor linting

* Proper centering in the selection circle

* Fix merge mistakes

* Nation picker Icon View - reviews and layout tweaks
2023-06-12 09:55:25 +03:00