Commit Graph

3297 Commits

Author SHA1 Message Date
Timo T
244f9477df
Initial Event Bus implementation & Event-based multiplayer updates (#6826)
* Add EventBus

* Refactor: Extract multiplayer logic into their own classes & make updates event-based instead of throwaway+rebuild
2022-05-22 00:05:33 +02:00
itanasi
a2bc1a1a29
Assign Population Improvements (#6650)
City management UI to allow focusing automatic worker placement

Improvements to worker / specialist assignment routines
2022-05-20 00:12:23 +02:00
Timo T
07593d7034
Fix turn check worker exception (#6867)
AndroidFileHandle uses Gdx.files internally
2022-05-19 13:43:28 +03:00
SomeTroglodyte
3d6a01d633
Build warnings cleanup (#6827) 2022-05-19 02:12:18 +02:00
Yair Morgenstern
f464ac2544 4.1.1 2022-05-18 23:03:29 +03:00
Yair Morgenstern
c990c6338b
Version rollout (#6855)
* 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>
2022-05-18 21:02:55 +03:00
The Bucketeer
08138c5de7
HexaRealm update (#6850)
* 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
2022-05-18 20:46:03 +03:00
Yair Morgenstern
4513ddb75a
Version rollout (#6851)
* Update Filipino.properties (#6842)

* Ukrainian translations (#6840)

* Update Spanish.properties (#6839)

* Update Spanish.properties

* Update Spanish.properties

* Update French.properties (#6836)

* Update Italian.properties (#6835)

* Update Traditional_Chinese.properties (#6833)

* Update Traditional_Chinese.properties

* Update Traditional_Chinese.properties

* Update Traditional_Chinese.properties

* Update Indonesian.properties (#6831)

Co-authored-by: Shann Aurelle Ripalda <shannaurelleg@gmail.com>
Co-authored-by: Jack Rainy <JackRainy@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+ArchDuque-Pancake@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: xk730 <40309144+xk730@users.noreply.github.com>
Co-authored-by: kensvin <63847755+Kensvin28@users.noreply.github.com>
2022-05-18 08:23:28 +03:00
Timo T
5353f3337c
Fix Gdx.files being garbage collected in MultiplayerTurnCheckWorker (#6817)
* Add logging to MultiplayerTurnCheckWorker

* Fix NullPointerException in turn check worker: Gdx.files is null
2022-05-18 07:35:00 +03:00
Jack Rainy
4986505363
Great General typed uniques and improved moddability (#6818)
* 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>
2022-05-18 00:02:53 +03:00
Xander Lenstra
7079619fe2
Great improvements can again be constructed on forest (#6823)
* 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
2022-05-17 20:04:49 +03:00
Timo T
df9b62ff6f
Fix coroutines not being added to desktop:dist (#6822)
* Use kotlin coroutines instead of raw threads (+ refactorings)

Equal to f8e0f572

* Fix coroutine class files not being added to desktop:dist
2022-05-17 08:37:12 -07:00
SomeTroglodyte
8329d56131
Allow generation of "Default" Deciv redux maps (#6821) 2022-05-16 13:03:06 +03:00
Yair Morgenstern
b5a2aa59b6 4.1.0 2022-05-15 20:44:18 +03:00
Yair Morgenstern
01497a14ec
Version rollout (#6820)
* Bump version and create initial changelog entry

* More translations to Brazilian Portuguese (#6814)

* Update Brazilian_Portuguese.properties

* Adding translations to Brazilian Portuguese

* Adding more translations to Brazilian Portuguese

* Adding more Brazilian Portuguese translations

* Update Simplified_Chinese.properties (#6811)

* Update Simplified_Chinese.properties

Fix 2 errors & fill in the space

* Complete translations for Civilopedia

* Update French.properties (#6794)

* Update Indonesian.properties (#6791)

* Update Italian.properties (#6790)

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: André Lucas C. da Silva <andr9310@gmail.com>
Co-authored-by: heipizhu4 <100454479+heipizhu4@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: kensvin <63847755+Kensvin28@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2022-05-15 19:34:50 +03:00
Timo T
e53303b249
Mark Unciv as an application that may use more memory than usual (#6819) 2022-05-15 19:30:48 +03:00
Yair Morgenstern
7ef2bbc56c Revert "Use kotlin coroutines instead of raw threads (+ refactorings) (#6801)"
This reverts commit f8e0f572
2022-05-15 19:20:23 +03:00
Jack Rainy
c4de3530f6
Possibility to liberate a traded city (#6797) 2022-05-15 17:57:29 +03:00
Timo T
f8e0f572e4
Use kotlin coroutines instead of raw threads (+ refactorings) (#6801)
* 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
2022-05-15 00:52:45 +03:00
SomeTroglodyte
816e542e1c
Notifications not scrollable far enough after in-turn notifications got added (#6796) 2022-05-14 23:19:02 +03:00
Yair Morgenstern
e94d109166 4.0.16 2022-05-13 13:00:20 +03:00
Yair Morgenstern
66abc2f779
Version rollout (#6789)
* Bump version and create initial changelog entry

* Update Russian.properties (#6787)

* Update Russian.properties

* Fix translation

* Update Spanish.properties (#6782)

511 - Yes, the double space is intentional

* Add Fastlane_short_description translations (#6781)

Also added Civ V - Vanilla and Civ V - Gods and Kings translation.

* Update German translation (#6778)

* Update French.properties (#6769)

* Update Indonesian.properties (#6768)

* Update Simplified_Chinese.properties (#6766)

* Update Simplified_Chinese.properties

* Make 2 translation together (#1)

* Fetch the latest update
* Update Simplified_Chinese.properties

Correct language defects and ambiguities and fill in gaps

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
Co-authored-by: Xander Lenstra <71121390+xlenstra@users.noreply.github.com>
Co-authored-by: xk730 <40309144+xk730@users.noreply.github.com>

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
Co-authored-by: Xander Lenstra <71121390+xlenstra@users.noreply.github.com>
Co-authored-by: xk730 <40309144+xk730@users.noreply.github.com>

* Update Italian.properties (#6765)

* Update Korean.properties (#6754)

* Update Korean.properties

* Update Korean.properties

* Update Korean.properties

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: deqtodo <94169613+deqtodo@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+ArchDuque-Pancake@users.noreply.github.com>
Co-authored-by: nilleh <72703236+niltok64@users.noreply.github.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: kensvin <63847755+Kensvin28@users.noreply.github.com>
Co-authored-by: heipizhu4 <100454479+heipizhu4@users.noreply.github.com>
Co-authored-by: Xander Lenstra <71121390+xlenstra@users.noreply.github.com>
Co-authored-by: xk730 <40309144+xk730@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Auvergne <97716654+ARPD-release@users.noreply.github.com>
2022-05-13 12:52:53 +03:00
SomeTroglodyte
345ca0ec25
Pedia from mainmenu (#6788)
* Make Civilopedia independent of worldScreen or gameInfo

* Make Civilopedia callable from Main Menu

* Era category for Civilopedia

* Era category for Civilopedia - atlas
2022-05-13 12:36:06 +03:00
Leonard Günther
09b4e82589
Rate limit handling for Dropbox (#6416)
* 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>
2022-05-13 09:16:52 +03:00
Yair Morgenstern
3e63be5376 4.0.15-patch1
Extra images fixed and HexaRealm added :)
2022-05-11 17:58:30 +03:00
The Bucketeer
e9ffe7667c
Proposal to add the current HexaRealm tileset as the built-in tileset. (for serious this time.) (#6756)
* 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
2022-05-11 17:34:46 +03:00
Yair Morgenstern
cd002699f3 4.0.15 2022-05-11 17:22:31 +03:00
Yair Morgenstern
97b8bd106a
Version rollout (#6762)
* Bump version and create initial changelog entry

* Update Simplified_Chinese.properties (#6753)

Correct some translation errors

* Update Romanian.properties (#6748)

* 1

* 2 - most city names don't have a translation

* 3 - more cities

* Update Turkish.properties (#6746)

* Update French.properties (#6738)

* Update Italian.properties (#6734)

* Update Indonesian.properties (#6733)

* Update German translation (#6732)

* Update Filipino.properties (#6729)

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: xk730 <40309144+xk730@users.noreply.github.com>
Co-authored-by: alexban011 <alexban011@gmail.com>
Co-authored-by: omerfaruk-cakmak <32402595+omerfaruk-cakmak@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: kensvin <63847755+Kensvin28@users.noreply.github.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
Co-authored-by: Shann Aurelle Ripalda <shannaurelleg@gmail.com>
2022-05-11 17:05:17 +03:00
alexban011
dc8dadfcab
Fixed proxy issues when starting a new multiplayer game (#6757)
* 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>
2022-05-11 16:58:20 +03:00
Yair Morgenstern
e348a20d2e Extracted policies, religions, nations and promotions to separate png files in order to fit HexaRealm tileset into the main file - see #6756 2022-05-11 16:57:39 +03:00
SomeTroglodyte
eb5e8ae226
Switchable gzipping of saved games (#6735)
* Switchable gzipping of saved games

* Switchable gzipping of saved games - consensus says default off
2022-05-11 16:23:11 +03:00
Xander Lenstra
8fcfbf752b
Improved clarity and moddability of building improvements (#6712)
* Renamed tile.hasUnique, deprecated `Indestructable`, unique for citadels
Also refactored the consumption of (great) people out of UnitActions.

* Reworked when improvements can be build somewhere for more clarity

* Made resources improvable by multiple improvements; Offshore Platform

* Fix compatability

* WIP

* Fixed the tests, but better

* I suppose I might as well update this now that we're a version later
2022-05-11 00:35:21 +02:00
SomeTroglodyte
7b4833741d
Fix missing translatables, again (#6705) 2022-05-11 00:21:38 +03:00
Yair Morgenstern
ba96bea556 4.0.14 2022-05-08 21:42:19 +03:00
Yair Morgenstern
4fe775c0f5
Version rollout (#6726)
* Bump version and create initial changelog entry

* Update Filipino.properties (#6714)

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Romanian.properties (#6713)

* Fixed issue #6649 by checking for internet connection before starting the game if "online multiplayer" is selected
Many thanks to @SomeTroglodyte for most of the code and for explanations

* Revert "Fixed issue #6649 by checking for internet connection before starting the game if "online multiplayer" is selected"

This reverts commit bae7d7c07f.

* some translations

* merging with 4.0.13

* fixed a little error

* fixed github check error

* Update German translation (#6710)

* Update German translation

* Update German translation

* Update German translation

* Update Italian.properties (#6708)

* Update French.properties (#6697)

* Update French.properties

* Update French.properties to 4.0.13

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Shann Aurelle Ripalda <shannaurelleg@gmail.com>
Co-authored-by: alexban011 <alexban011@gmail.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
2022-05-08 21:29:33 +03:00
SomeTroglodyte
3ea9c6503b
Font choice rework (#6670)
* Font choice rework

* Font choice rework - naming

* Font choice rework - fix default font selection
2022-05-08 21:22:23 +03:00
SomeTroglodyte
4b7edca7a8
Rework of the "Creates improvement on a specific tile" Unique (#6687)
* Make Citadel tile takeover a unique

* CreatesOneImprovement unique overhaul step 1

* CreatesOneImprovement unique overhaul - increase highlights alpha

* Fix missing translatables, again

* CreatesOneImprovement unique overhaul - review suggestions

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2022-05-08 21:22:01 +03:00
Jack Rainy
d00b72806b
Leftovers from previous PRs (#6725)
* Leftovers from #6698

* Leftovers from #6718

* Better naming
2022-05-08 21:19:55 +03:00
Timo T
86d5011da1
In-depth serialization improvement, fixes Barbarian Camps revealed by Honor not showing immediately in multiplayer
* Fix Barbarian Camp Spawned notification not revealing the camp on the map in multiplayer

* Fix lastSeenImprovement not being cloned

* Use HashMapVector2 in BarbarianManager

* Fix value not having its class written out for proper deserializing

* Refactor: various code improvements
2022-05-08 12:35:41 +02:00
Yair Morgenstern
806d58074c 4.0.13 2022-05-06 10:15:38 +03:00
Yair Morgenstern
621099b315
Version rollout (#6707)
* Bump version and create initial changelog entry

* Update Filipino.properties (#6703)

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Italian.properties (#6693)

* Update German translation (#6691)

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Shann Aurelle Ripalda <shannaurelleg@gmail.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
2022-05-06 10:07:20 +03:00
Ouaz
822ce5e041
Update healing values in "Injured Units" article (#6704)
- Based on merged commit "Healing parity" (c8be00b)
2022-05-05 21:07:11 +02:00
letstalkaboutdune
035b6528a7
New Demographics Scoreboard (#6645)
* Healing parity

Adjusted healing values for parity with CV

* New Demographics system for victory screen rankings

Added a new game setup checkbox option to use a ranking system on the victory screen which is more in line with the Civ V Demographics window. Created the UI element and game parameter but the demographics screen still needs to be implemented.

Also removed unnecessary comments from adjustments to healing values in a previous update.

* Demographics table init

Beginning to build structure of Demographics rankings table.

* Update VictoryScreen.kt

Attempt at getting more of the Demographics table implemented

* Update VictoryScreen.kt

Continued building the structure of the Demographics table

* Demographics first implementation

Finished first pass of Demographics screen.

* Minor text formatting

Improved some text formatting in code and comments.

* Update MapUnit.kt

Minor comment cleanup.

* SomeTroglodyte's Feedback, pt. 1

Implemented feedback given by SomeTroglodyte in PR #6645.

* Organized into functions

Split up Rankings table creation and Demographics table creation into new functions

* Update template.properties

Fixed missing space.

* Implementing more PR #6645 feedback

Added needed translation templates, used enum class instead of array for headers, moved checkbox to Options -> Display instead of new game

* Implemented rest of PR #6645 feedback

Simplified logic for finding player's rank, value, best/worst civ value, and filtered out defeated civs from the display and calculations

* Dead Civs get 0 in all categories

Added simple check if a civ is dead when computing score. If they are dead then they get 0 and go to the bottom of the scoreboard.

* Update VictoryScreen.kt

Further cleaned up code for better reuse and simpler logic with fewer loops.

* Update CivilizationInfo.kt

Simplified implementation of return 0 for stats when civ is defeated.

* Update CivilizationInfo.kt

Removed commented-out line of code.

* Fixed duplicate rank bug

Adjusted method of determining best and worst civs so that duplicates don't occur.

* Update VictoryScreen.kt

One-lined the handling of logic in buildDemographicsTable()

* Update VictoryScreen.kt

Moved static header row to new function.
2022-05-05 14:42:35 +02:00
MartinP
342367c72c
Fix typo in new translation line (#6692) 2022-05-05 01:23:22 +03:00
Yair Morgenstern
760aace923 4.0.12 2022-05-04 10:56:17 +03:00
Yair Morgenstern
204d80fbe2
Version rollout (#6689)
* Bump version and create initial changelog entry

* Rework German descriptions for F-Droid (#6688)

* Update French.properties (#6678)

* Update German translation (#6674)

* Update Traditional_Chinese.properties (#6673)

* Update Indonesian.properties (#6663)

* Update Simplified_Chinese.properties (#6660)

* Update Simplified_Chinese.properties

* Fix errors

I wonder who translated 'wonder ' into “奇迹”. I bet he/she used machine translating. Pretty annoying

* Update Simplified_Chinese.properties

* Update Simplified_Chinese.properties

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Chia-Hung Ni <jameseses@gmail.com>
Co-authored-by: kensvin <63847755+Kensvin28@users.noreply.github.com>
Co-authored-by: heipizhu4 <100454479+heipizhu4@users.noreply.github.com>
2022-05-04 10:48:41 +03:00
SomeTroglodyte
cec9975b4d
Implement fastlane step 2: Translating (#6643)
* Implement fastlane step 2: Translating

* Placing the Font family Label before the Thread is nicer
2022-05-03 09:16:22 +02:00
heipizhu4
0d80929945
Make 'Followers of this religion" translatable (#6662)
First time editing the template. Is this the correct way to do so?
2022-05-03 08:07:41 +03:00
SomeTroglodyte
515c9bbcae
Show available resources from CityScreen (bottom right info only) (#6667) 2022-05-03 07:59:42 +03:00
Xander Lenstra
c55b14eaa7
Implemented most easy things from comments on moddable victory PR (#6600)
* Implemented most easy things from comments on moddable victory PR
Also added religious victory condition

* Fixed tests

* Fixed compile problems & missing string

* Fixed typo
2022-05-03 07:56:24 +03:00