Commit Graph

7253 Commits

Author SHA1 Message Date
Timo T
b59b890ced
Fix multiplayer turn check worker exception (#6915) 2022-05-23 10:48:08 +03:00
Yair Morgenstern
6836038252 4.1.2 2022-05-22 20:40:51 +03:00
Yair Morgenstern
39adaed6b1
Version rollout (#6911)
* Bump version and create initial changelog entry

* Translations to Brazilian Portuguese (#6900)

* More translations to Brazilian Portuguese

* Adding more translations to Brazilian Portuguese

* Translations to Brazilian Portuguese

* Update Russian.properties (#6898)

* Update Spanish.properties (#6885)

* Update Spanish.properties

* Update Spanish.properties

* Update Italian.properties (#6883)

* Update German translation (#6878)

* Update French.properties (#6874)

* Update Traditional_Chinese.properties (#6872)

* Update Filipino.properties (#6864)

* Update Filipino.properties

* Update Filipino.properties

* Update Indonesian.properties (#6863)

* Update Simplified_Chinese.properties (#6861)

* Correct translation of 'keep it'

* Update Simplified_Chinese.properties

Computer fixed :D

* Fix error

Player report . F not only appers here, but also affects the Fortify's F

* Update Traditional_Chinese.properties (#6858)

* Translation rebuild and fix

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: André Lucas C. da Silva <andr9310@gmail.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: Giuseppe D'Addio <41149920+Smashfanful@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: Shann Aurelle Ripalda <shannaurelleg@gmail.com>
Co-authored-by: kensvin <63847755+Kensvin28@users.noreply.github.com>
Co-authored-by: heipizhu4 <100454479+heipizhu4@users.noreply.github.com>
2022-05-22 20:36:49 +03:00
Timo T
fc9668f2d0
Refactor: change GameSaver from singleton to single instance pattern & move autosave logic into GameSaver (#6846)
* 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
2022-05-22 19:51:35 +03:00
SomeTroglodyte
a2c646ef8e
Fix Autocracy Complete including unit test (#6908) 2022-05-22 19:51:05 +03:00
OptimizedForDensity
39bbb2de1c
Fix crashes when a civ does not have a capital (#6889) 2022-05-22 17:00:42 +02:00
SomeTroglodyte
740886c890
Refactor UncivShowableException (#6899) 2022-05-22 13:55:19 +02:00
Xander Lenstra
3754108391
Added more unit tests for uniques; added missing unique implementations (#6886)
* 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
2022-05-22 13:12:10 +03:00
Timo T
f34b97a421
Fix multiplayer turn checker potentially stopping turn checks for everyone that plays that game if a file was not found remotely (#6901) 2022-05-22 00:13:48 -07:00
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
Timo T
91ffa2e185
Fix screens not correctly being dispose()d (#6876) 2022-05-21 23:52:02 +02:00
Timo T
81379078fa
Refactor: Split options into multiple files (#6857)
* Refactor: Move OptionsPopup to own package

* Refactor: Split OptionsPopup into multiple classes

# Conflicts:
#	core/src/com/unciv/ui/options/OptionsPopup.kt
2022-05-21 21:57:06 +03:00
Timo T
a128ea0d59
Fix images not being able to have their size set (#6887)
* Fix images not being able to have their size set

* Small corrections

`> 0f` to include `-0f`
2022-05-21 21:43:30 +03:00
SomeTroglodyte
3e95e3f152
Fix effect of new Beliefs not immediately visible in top bar (#6888)
* Fix effect of new Beliefs not immediately visible in top bar

* Fix effect of new Beliefs not immediately visible - reviews
2022-05-21 21:37:06 +03:00
itanasi
8b9946e65e
Fix Zone of Control (#6891) 2022-05-21 15:24:18 +02:00
Jack Rainy
915f3e694f
A lot of smaller code/performance improvements (#6859)
* 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
2022-05-21 01:41:28 +02:00
Timo T
5d835c762a
Refactor: Extract PickerPane from PickerScreen (#6870)
Refactor: Extract PickerPane from PickerScreen
2022-05-20 21:23:25 +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
Jack Rainy
a272e8e7ba
Correct check for the city connection quest (#6875) 2022-05-19 22:52:55 +02:00
SomeTroglodyte
eb1c874e24
Unify editor style settings (#6862)
Once this is in then we can see what actually happens and argue about specific values :)
2022-05-19 22:36:49 +03:00
Yair Morgenstern
1f3890e2a0 welp these tests kind of existed before 2022-05-19 19:02:57 +03:00
itanasi
8bcb989d0f
Add more comments on Editor Settings (#6869) 2022-05-19 18:03:15 +03:00
SomeTroglodyte
0ced4d96e7
SimpleHttp gets a connection timeout (#6812)
* SimpleHttp gets a connection timeout
2022-05-19 14:30:31 +02:00
Yair Morgenstern
1126a7c996 Added test that improvements can be built on their tiles 2022-05-19 14:27:01 +03:00
Yair Morgenstern
abe9118741 4.1.1-patch2 2022-05-19 13:47:45 +03:00
Timo T
07593d7034
Fix turn check worker exception (#6867)
AndroidFileHandle uses Gdx.files internally
2022-05-19 13:43:28 +03:00
Yair Morgenstern
85ba9c2624 4.1.1-patch1 2022-05-19 13:05:08 +03:00
Xander Lenstra
6dabffb5a9
Fixed a bug blocking special improvements on removable terrain features (#6865) 2022-05-19 13:04:03 +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
Leonard Günther
919812f775
Fixed MP refresher not working after rate limit (#6847) 2022-05-17 20:02:30 +03:00
Xander Lenstra
fa2c5f7cde
Added 'in puppeted cities' cityFilter (#6843)
* Added 'in puppetted cities' cityFilter

* Added to list of unique parameters
2022-05-17 17:43:20 +02: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
Xander Lenstra
7b3a4c741f
Added more unit tests for uniques (#6841) 2022-05-17 15:42:27 +02:00
OptimizedForDensity
88585bcf7d
Fix MayWithdraw modifier calculation (#6829)
* Fix MayWithdraw modifier calculation

* Readability changes

Co-authored-by: OptimizedForDensity <>
2022-05-16 17:37:05 +03:00
SomeTroglodyte
8329d56131
Allow generation of "Default" Deciv redux maps (#6821) 2022-05-16 13:03:06 +03:00
Timo T
68a0e25c9e
Fix uniques.md being generated with wrong line endings (#6825)
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
2022-05-16 09:50:38 +03:00
Md. Touhidur Rahman
96780be1d2
Fix and improve real time autofix while typing on multipleServer URL (#6772)
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
2022-05-15 23:40:55 +02: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
ef08bda50d Revert "Use kotlin coroutines instead of raw threads (+ refactorings) (#6801)"
This reverts commit f8e0f572
2022-05-15 19:21:37 +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